Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1547138
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Bhumika Goyal <bhumirks@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] drivers: watchdog: pika_wdt: add __ro_after_init to ident |
| Date | Sun, 25 Dec 2016 09:10:01 +0100 |
| Message-ID | <sSc2t-2bl-3@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Qc4AyebcDeMnGiPOwnVnCPOOwbKT7iI72DI0S34ZQGg=; b=QcgaC0yzQ7HDW7eeE78yXw9icHhnoIbaHIFNhsr+hqlAGH7Np3/yMyDmbdr1kUhsIR rZLc2AJXnXkZnMiYKhl81D7BLVRINmVOhbUAgwQhapH4wSIP84o+mJRd4pQNADjIRTxJ /gilXSA62DuTPyWi6PFaivsOi9LmNpgAxcNuDvi8cQ5S4mLDfm7XIxm6SN4ilJvMRsYF SAaxFNg+mMOKUBkXqycFeuDZm8UFTFfMKYr7cxmCKreBB1wL6qt/6JJXoNRy28xBi27W cZb84/YqoLyr4MiecRdkxY1mDcNwPdp5Cse4B8zPAVtr+25X+DIWOWrzK6W7pT0Jbe+/ bldw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Qc4AyebcDeMnGiPOwnVnCPOOwbKT7iI72DI0S34ZQGg=; b=Qs12uNX13pAARXltQWPXhEmNbHCRcziLQd0FugBKg+L+kZQQfciUnqQlagtTBxXfDJ RZHCyNh05+EMKSwnyr7i2rwZjdqDFMZBLF/LMn0E52ajBH7EZXVv2YwuUKG3MOH6JwKf qjtXa0GZ5hFuGBXioFNG9C6U8tiSz6hyUsdNa9HpEikwMetLTgs5rdDdHPt0O8Rqo7Z3 6XQqIMavxfUxcsNvrkeFJLBaZXS4yQ8hSVg/19IOtVpe0eORj5+T2hdV9o8v7hmtUw+M 0STpIXPrxcP0aqwYSrV4yw4CQ8RFP0Nfd+58bYTfuevSvJ0OynkaF48e1uoTGIN/nZX/ EWbQ== |
| X-Gm-Message-State | AIkVDXJgqNSWRD7MvL8qdfyJ59eZsYK5oHJoBeMgeWr1iiS0j+eiPeJrv19kxXDaAMiboQ== |
| X-Received | by 10.84.212.2 with SMTP id d2mr46141736pli.24.1482652834025; Sun, 25 Dec 2016 00:00:34 -0800 (PST) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 26 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | keescook@chromium.org, Bhumika Goyal <bhumirks@gmail.com> |
| X-Original-Date | Sun, 25 Dec 2016 13:30:24 +0530 |
| X-Original-Message-ID | <1482652824-8648-1-git-send-email-bhumirks@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1547138 |
Show key headers only | View raw
The object ident of type watchdog_info structure is not
modified after getting initialized by pikawdt_init. Apart from getting
referenced in init it is also passed as an argument to the function
copy_to_user but this argument is of type const void *. Therefore add
__ro_after_init to its declaration.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/watchdog/pika_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c
index 0cdfee2..e35cf5e 100644
--- a/drivers/watchdog/pika_wdt.c
+++ b/drivers/watchdog/pika_wdt.c
@@ -54,7 +54,7 @@
struct timer_list timer; /* The timer that pings the watchdog */
} pikawdt_private;
-static struct watchdog_info ident = {
+static struct watchdog_info ident __ro_after_init = {
.identity = DRV_NAME,
.options = WDIOF_CARDRESET |
WDIOF_SETTIMEOUT |
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] drivers: watchdog: pika_wdt: add __ro_after_init to ident Bhumika Goyal <bhumirks@gmail.com> - 2016-12-25 09:10 +0100 Re: [PATCH] drivers: watchdog: pika_wdt: add __ro_after_init to ident Guenter Roeck <linux@roeck-us.net> - 2016-12-26 11:40 +0100
csiph-web