Skip to contentSkip to conversation

watchdog: sb_wdog: Make sbwdog_set and sbwdog_pet static

PATCH In review Yue Haibing 3 participants 3 messages Mar 20, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: sb_wdog: Make sbwdog_set and sbwdog_pet static

From: YueHaibing <[email protected]>

Fix sparse warning:

drivers/watchdog/sb_wdog.c:70:6: warning: symbol 'sbwdog_set' was not declared. Should it be static? drivers/watchdog/sb_wdog.c:84:6: warning: symbol 'sbwdog_pet' was not declared. Should it be static?

---
 drivers/watchdog/sb_wdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/sb_wdog.c +2 -2
index 3abae50..8264fced 100644
@@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(sbwd_lock);
  *
  * wdog is the iomem address of the cfg register
  */
-void sbwdog_set(char __iomem *wdog, unsigned long t)
+static void sbwdog_set(char __iomem *wdog, unsigned long t)
 {
 	spin_lock(&sbwd_lock);
 	__raw_writeb(0, wdog);
@@ -81,7 +81,7 @@ void sbwdog_set(char __iomem *wdog, unsigned long t)
  *
  * wdog is the iomem address of the cfg register
  */
-void sbwdog_pet(char __iomem *wdog)
+static void sbwdog_pet(char __iomem *wdog)
 {
 	spin_lock(&sbwd_lock);
 	__raw_writeb(__raw_readb(wdog) | 1, wdog);
Signature · 1 line
2.7.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Yue Haibing

From: YueHaibing <[email protected]>

Fix sparse warning:

drivers/watchdog/sb_wdog.c:70:6: warning: symbol 'sbwdog_set' was not declared. Should it be static? drivers/watchdog/sb_wdog.c:84:6: warning: symbol 'sbwdog_pet' was not declared. Should it be static?

Quoted 30 lines
---
 drivers/watchdog/sb_wdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/sb_wdog.c +2 -2
index 3abae50..8264fced 100644
@@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(sbwd_lock);
  *
  * wdog is the iomem address of the cfg register
  */
-void sbwdog_set(char __iomem *wdog, unsigned long t)
+static void sbwdog_set(char __iomem *wdog, unsigned long t)
 {
 	spin_lock(&sbwd_lock);
 	__raw_writeb(0, wdog);
@@ -81,7 +81,7 @@ void sbwdog_set(char __iomem *wdog, unsigned long t)
  *
  * wdog is the iomem address of the cfg register
  */
-void sbwdog_pet(char __iomem *wdog)
+static void sbwdog_pet(char __iomem *wdog)
 {
 	spin_lock(&sbwd_lock);
 	__raw_writeb(__raw_readb(wdog) | 1, wdog);
Signature · 1 line
2.7.0
Acked-by on v1 1/1
#2 lore raw
In reply to Yue Haibing
Quoted 26 lines · Yue Haibing

From: YueHaibing <[email protected]>

Fix sparse warning:

drivers/watchdog/sb_wdog.c:70:6: warning: symbol 'sbwdog_set' was not declared. Should it be static? drivers/watchdog/sb_wdog.c:84:6: warning: symbol 'sbwdog_pet' was not declared. Should it be static?

---
  drivers/watchdog/sb_wdog.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/sb_wdog.c +1 -1
index 3abae50..8264fced 100644
@@ -67,7 +67,7 @@ static DEFINE_SPINLOCK(sbwd_lock);
   *
   * wdog is the iomem address of the cfg register
   */
-void sbwdog_set(char __iomem *wdog, unsigned long t)
+static void sbwdog_set(char __iomem *wdog, unsigned long t)
  {
  	spin_lock(&sbwd_lock);
  	__raw_writeb(0, wdog);

drivers/watchdog/sb_wdog.c void sbwdog_set(char __iomem *wdog, unsigned long t) · line 87

Quoted 8 lines
drivers/watchdog/sb_wdog.c +1 -1
@@ -81,7 +81,7 @@ void sbwdog_set(char __iomem *wdog, unsigned long t)
   *
   * wdog is the iomem address of the cfg register
   */
-void sbwdog_pet(char __iomem *wdog)
+static void sbwdog_pet(char __iomem *wdog)
  {
  	spin_lock(&sbwd_lock);
  	__raw_writeb(__raw_readb(wdog) | 1, wdog);

Thanks.

Mukesh