linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops
@ 2017-06-12  6:20 Arvind Yadav
  2017-06-15 17:25 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-12  6:20 UTC (permalink / raw)
  To: linux, wim; +Cc: linux-watchdog, linux-kernel

File size before:
   text	   data	    bss	    dec	    hex	filename
   1282	    388	      1	   1671	    687	drivers/watchdog/bcm47xx_wdt.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   1474	    196	      1	   1671	    687	drivers/watchdog/bcm47xx_wdt.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/watchdog/bcm47xx_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c
index 35725e2..2365828 100644
--- a/drivers/watchdog/bcm47xx_wdt.c
+++ b/drivers/watchdog/bcm47xx_wdt.c
@@ -97,7 +97,7 @@ static int bcm47xx_wdt_restart(struct watchdog_device *wdd,
 	return 0;
 }
 
-static struct watchdog_ops bcm47xx_wdt_hard_ops = {
+static const struct watchdog_ops bcm47xx_wdt_hard_ops = {
 	.owner		= THIS_MODULE,
 	.start		= bcm47xx_wdt_hard_start,
 	.stop		= bcm47xx_wdt_hard_stop,
@@ -168,7 +168,7 @@ static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd,
 				WDIOF_MAGICCLOSE,
 };
 
-static struct watchdog_ops bcm47xx_wdt_soft_ops = {
+static const struct watchdog_ops bcm47xx_wdt_soft_ops = {
 	.owner		= THIS_MODULE,
 	.start		= bcm47xx_wdt_soft_start,
 	.stop		= bcm47xx_wdt_soft_stop,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops
  2017-06-12  6:20 [PATCH] watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops Arvind Yadav
@ 2017-06-15 17:25 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2017-06-15 17:25 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: wim, linux-watchdog, linux-kernel

On Mon, Jun 12, 2017 at 11:50:26AM +0530, Arvind Yadav wrote:
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>    1282	    388	      1	   1671	    687	drivers/watchdog/bcm47xx_wdt.o
> 
> File size After adding 'const':
>    text	   data	    bss	    dec	    hex	filename
>    1474	    196	      1	   1671	    687	drivers/watchdog/bcm47xx_wdt.o
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

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

> ---
>  drivers/watchdog/bcm47xx_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c
> index 35725e2..2365828 100644
> --- a/drivers/watchdog/bcm47xx_wdt.c
> +++ b/drivers/watchdog/bcm47xx_wdt.c
> @@ -97,7 +97,7 @@ static int bcm47xx_wdt_restart(struct watchdog_device *wdd,
>  	return 0;
>  }
>  
> -static struct watchdog_ops bcm47xx_wdt_hard_ops = {
> +static const struct watchdog_ops bcm47xx_wdt_hard_ops = {
>  	.owner		= THIS_MODULE,
>  	.start		= bcm47xx_wdt_hard_start,
>  	.stop		= bcm47xx_wdt_hard_stop,
> @@ -168,7 +168,7 @@ static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd,
>  				WDIOF_MAGICCLOSE,
>  };
>  
> -static struct watchdog_ops bcm47xx_wdt_soft_ops = {
> +static const struct watchdog_ops bcm47xx_wdt_soft_ops = {
>  	.owner		= THIS_MODULE,
>  	.start		= bcm47xx_wdt_soft_start,
>  	.stop		= bcm47xx_wdt_soft_stop,
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-15 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12  6:20 [PATCH] watchdog: bcm47xx_wdt: constify bcm47xx_wdt_hard_ops and bcm47xx_wdt_soft_ops Arvind Yadav
2017-06-15 17:25 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).