[-next] watchdog: sb_wdog: Make sbwdog_set and sbwdog_pet static
diff mbox series

Message ID 20190320134250.13348-1-yuehaibing@huawei.com
State Accepted
Headers show
Series
  • [-next] watchdog: sb_wdog: Make sbwdog_set and sbwdog_pet static
Related show

Commit Message

YueHaibing March 20, 2019, 1:42 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

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?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/watchdog/sb_wdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Guenter Roeck March 20, 2019, 2:57 p.m. UTC | #1
On Wed, Mar 20, 2019 at 09:42:50PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> 
> 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?
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sb_wdog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
> index 3abae50..8264fced 100644
> --- a/drivers/watchdog/sb_wdog.c
> +++ b/drivers/watchdog/sb_wdog.c
> @@ -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);
> -- 
> 2.7.0
> 
>
Mukesh Ojha March 20, 2019, 7:27 p.m. UTC | #2
On 3/20/2019 7:12 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> 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?
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/watchdog/sb_wdog.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
> index 3abae50..8264fced 100644
> --- a/drivers/watchdog/sb_wdog.c
> +++ b/drivers/watchdog/sb_wdog.c
> @@ -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);


Acked-by: Mukesh Ojha <mojha@codeaurora.org>


Thanks.

Mukesh

Patch
diff mbox series

diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index 3abae50..8264fced 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -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);