Skip to contentSkip to conversation

kernel/watchdog: add missing prototypes for weak functions

PATCH In review Mathieu Malaterre 2 participants 3 messages Jun 6, 2018 – Nov 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/watchdog: add missing prototypes for weak functions

In commit 73ce0511c436 ("kernel/watchdog.c: move hardlockup detector to separate file") two new functions were added ‘watchdog_nmi_enable’ and ‘watchdog_nmi_disable’ the functions were changed from static to weak. In which case expose the function declarations in header file.

Silence the following gcc warnings:

kernel/watchdog.c:109:12: warning: no previous prototype for ‘watchdog_nmi_enable’ [-Wmissing-prototypes] kernel/watchdog.c:115:13: warning: no previous prototype for ‘watchdog_nmi_disable’ [-Wmissing-prototypes]

---
 include/linux/nmi.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/nmi.h +2 -0
index b8d868d23e79..50d143995338 100644
@@ -113,6 +113,8 @@ static inline int hardlockup_detector_perf_init(void) { return 0; }
 void watchdog_nmi_stop(void);
 void watchdog_nmi_start(void);
 int watchdog_nmi_probe(void);
+int watchdog_nmi_enable(unsigned int cpu);
+void watchdog_nmi_disable(unsigned int cpu);
 
 /**
  * touch_nmi_watchdog - restart NMI watchdog timeout.
Signature · 1 line
2.11.0
#1 lore raw

ping ?

Quoted 33 lines · Mathieu Malaterre

In commit 73ce0511c436 ("kernel/watchdog.c: move hardlockup detector to separate file") two new functions were added ‘watchdog_nmi_enable’ and ‘watchdog_nmi_disable’ the functions were changed from static to weak. In which case expose the function declarations in header file.

Silence the following gcc warnings:

kernel/watchdog.c:109:12: warning: no previous prototype for ‘watchdog_nmi_enable’ [-Wmissing-prototypes] kernel/watchdog.c:115:13: warning: no previous prototype for ‘watchdog_nmi_disable’ [-Wmissing-prototypes]

---
 include/linux/nmi.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/nmi.h +2 -1
index b8d868d23e79..50d143995338 100644
@@ -113,6 +113,8 @@ static inline int hardlockup_detector_perf_init(void) { return 0; }
 void watchdog_nmi_stop(void);
 void watchdog_nmi_start(void);
 int watchdog_nmi_probe(void);
+int watchdog_nmi_enable(unsigned int cpu);
+void watchdog_nmi_disable(unsigned int cpu);
 
 /**
  * touch_nmi_watchdog - restart NMI watchdog timeout.
--

2.11.0

#2 lore raw

[tip:core/urgent] watchdog/core: Add missing prototypes for weak functions

In reply to Mathieu Malaterre
watchdog/core: Add missing prototypes for weak functions
Commit-ID:  81bd415c91eb966118d773dddf254aebf3022411
Gitweb:     https://git.kernel.org/tip/81bd415c91eb966118d773dddf254aebf3022411
Author:     Mathieu Malaterre <[email protected]>
AuthorDate: Wed, 6 Jun 2018 21:42:32 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 6 Nov 2018 21:58:00 +0100

watchdog/core: Add missing prototypes for weak functions

The split out of the hard lockup detector exposed two new weak functions, but no prototypes for them, which triggers the build warning:

kernel/watchdog.c:109:12: warning: no previous prototype for ‘watchdog_nmi_enable’ [-Wmissing-prototypes] kernel/watchdog.c:115:13: warning: no previous prototype for ‘watchdog_nmi_disable’ [-Wmissing-prototypes]

Add the prototypes.

Fixes 73ce0511c436 ("kernel/watchdog.c: move hardlockup detector to separate file")
Cc Babu Moger <[email protected]>
---
 include/linux/nmi.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/nmi.h +2 -0
index 08f9247e9827..9003e29cde46 100644
@@ -119,6 +119,8 @@ static inline int hardlockup_detector_perf_init(void) { return 0; }
 void watchdog_nmi_stop(void);
 void watchdog_nmi_start(void);
 int watchdog_nmi_probe(void);
+int watchdog_nmi_enable(unsigned int cpu);
+void watchdog_nmi_disable(unsigned int cpu);
 
 /**
  * touch_nmi_watchdog - restart NMI watchdog timeout.