Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471452 > unrolled thread

[PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2016-08-28 22:50 +0200
Last post2016-09-09 06:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure Julia Lawall <Julia.Lawall@lip6.fr> - 2016-08-28 22:50 +0200
    Re: [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure Guenter Roeck <linux@roeck-us.net> - 2016-09-09 06:30 +0200

#1471452 — [PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2016-08-28 22:50 +0200
Subject[PATCH] watchdog: iTCO_wdt: constify iTCO_wdt_pm structure
Message-ID<sbfbH-6vb-9@gated-at.bofh.it>
iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/watchdog/iTCO_wdt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 54cab18..06fcb6c 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -629,7 +629,7 @@ static int iTCO_wdt_resume_noirq(struct device *dev)
 	return 0;
 }
 
-static struct dev_pm_ops iTCO_wdt_pm = {
+static const struct dev_pm_ops iTCO_wdt_pm = {
 	.suspend_noirq = iTCO_wdt_suspend_noirq,
 	.resume_noirq = iTCO_wdt_resume_noirq,
 };

[toc] | [next] | [standalone]


#1479647

FromGuenter Roeck <linux@roeck-us.net>
Date2016-09-09 06:30 +0200
Message-ID<sflBU-6IG-21@gated-at.bofh.it>
In reply to#1471452
On 08/28/2016 01:26 PM, Julia Lawall wrote:
> iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as
> const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web