From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544AbcLYIAg (ORCPT ); Sun, 25 Dec 2016 03:00:36 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33650 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbcLYIAe (ORCPT ); Sun, 25 Dec 2016 03:00:34 -0500 From: Bhumika Goyal 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 Subject: [PATCH] drivers: watchdog: pika_wdt: add __ro_after_init to ident Date: Sun, 25 Dec 2016 13:30:24 +0530 Message-Id: <1482652824-8648-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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