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


Groups > linux.kernel > #1720539 > unrolled thread

[PATCH] watchdog: mei_wdt: constify mei_cl_device_id

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-26 08:20 +0200
Last post2017-08-30 05:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] watchdog: mei_wdt: constify mei_cl_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-26 08:20 +0200
    RE: [PATCH] watchdog: mei_wdt: constify mei_cl_device_id "Winkler, Tomas" <tomas.winkler@intel.com> - 2017-08-26 11:40 +0200
    Re: watchdog: mei_wdt: constify mei_cl_device_id Guenter Roeck <linux@roeck-us.net> - 2017-08-30 05:40 +0200

#1720539 — [PATCH] watchdog: mei_wdt: constify mei_cl_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-26 08:20 +0200
Subject[PATCH] watchdog: mei_wdt: constify mei_cl_device_id
Message-ID<uiCBP-64P-5@gated-at.bofh.it>
mei_cl_device_id are not supposed to change at runtime. All functions
working with mei_cl_device_id provided by <linux/mei_cl_bus.h> work
with const mei_cl_device_id. So mark the non-const structs as const.

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

diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
index b29c6fd..ea60b29 100644
--- a/drivers/watchdog/mei_wdt.c
+++ b/drivers/watchdog/mei_wdt.c
@@ -670,7 +670,7 @@ static int mei_wdt_remove(struct mei_cl_device *cldev)
 #define MEI_UUID_WD UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, \
 			    0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB)
 
-static struct mei_cl_device_id mei_wdt_tbl[] = {
+static const struct mei_cl_device_id mei_wdt_tbl[] = {
 	{ .uuid = MEI_UUID_WD, .version = MEI_CL_VERSION_ANY },
 	/* required last entry */
 	{ }
-- 
2.7.4

[toc] | [next] | [standalone]


#1720605

From"Winkler, Tomas" <tomas.winkler@intel.com>
Date2017-08-26 11:40 +0200
Message-ID<uiFJo-7SH-17@gated-at.bofh.it>
In reply to#1720539
> 
> mei_cl_device_id are not supposed to change at runtime. All functions
> working with mei_cl_device_id provided by <linux/mei_cl_bus.h> work with
> const mei_cl_device_id. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Ack.
> ---
>  drivers/watchdog/mei_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c index
> b29c6fd..ea60b29 100644
> --- a/drivers/watchdog/mei_wdt.c
> +++ b/drivers/watchdog/mei_wdt.c
> @@ -670,7 +670,7 @@ static int mei_wdt_remove(struct mei_cl_device
> *cldev)  #define MEI_UUID_WD UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, \
>  			    0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB)
> 
> -static struct mei_cl_device_id mei_wdt_tbl[] = {
> +static const struct mei_cl_device_id mei_wdt_tbl[] = {
>  	{ .uuid = MEI_UUID_WD, .version = MEI_CL_VERSION_ANY },
>  	/* required last entry */
>  	{ }
> --
> 2.7.4

[toc] | [prev] | [next] | [standalone]


#1723008 — Re: watchdog: mei_wdt: constify mei_cl_device_id

FromGuenter Roeck <linux@roeck-us.net>
Date2017-08-30 05:40 +0200
SubjectRe: watchdog: mei_wdt: constify mei_cl_device_id
Message-ID<uk21c-35e-11@gated-at.bofh.it>
In reply to#1720539
On Sat, Aug 26, 2017 at 11:41:06AM +0530, Arvind Yadav wrote:
> mei_cl_device_id are not supposed to change at runtime. All functions
> working with mei_cl_device_id provided by <linux/mei_cl_bus.h> work
> with const mei_cl_device_id. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

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

> ---
>  drivers/watchdog/mei_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/mei_wdt.c b/drivers/watchdog/mei_wdt.c
> index b29c6fd..ea60b29 100644
> --- a/drivers/watchdog/mei_wdt.c
> +++ b/drivers/watchdog/mei_wdt.c
> @@ -670,7 +670,7 @@ static int mei_wdt_remove(struct mei_cl_device *cldev)
>  #define MEI_UUID_WD UUID_LE(0x05B79A6F, 0x4628, 0x4D7F, \
>  			    0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB)
>  
> -static struct mei_cl_device_id mei_wdt_tbl[] = {
> +static const struct mei_cl_device_id mei_wdt_tbl[] = {
>  	{ .uuid = MEI_UUID_WD, .version = MEI_CL_VERSION_ANY },
>  	/* required last entry */
>  	{ }

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web