From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, wim@iguana.be, linux@roeck-us.net,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: keescook@chromium.org, Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] drivers: watchdog: booke_wdt: add __ro_after_init to booke_wdt_info
Date: Sat, 24 Dec 2016 21:37:32 +0530 [thread overview]
Message-ID: <1482595652-29029-1-git-send-email-bhumirks@gmail.com> (raw)
The object booke_wdt_info of watchdog_info structure is not
modified after getting initialized by booke_wdt_init. Apart from getting
referenced in init it is also stored in the info field of watchdog_device
structure which is of type const struct watchdog_info *info. So, it
becomes read only after init and therefore add __ro_after_init to it's
declaration.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/watchdog/booke_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 04da4b6..ae034bb 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -192,7 +192,7 @@ static int booke_wdt_set_timeout(struct watchdog_device *wdt_dev,
return 0;
}
-static struct watchdog_info booke_wdt_info = {
+static struct watchdog_info booke_wdt_info __ro_after_init = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
.identity = "PowerPC Book-E Watchdog",
};
--
1.9.1
next reply other threads:[~2016-12-24 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-24 16:07 Bhumika Goyal [this message]
2016-12-24 16:19 ` [PATCH] drivers: watchdog: booke_wdt: add __ro_after_init to booke_wdt_info Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482595652-29029-1-git-send-email-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).