Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Guenter Roeck
On 01/28/2017 07:30 AM, Bhumika Goyal wrote: On Sat, Jan 28, 2017 at 8:57 PM, Guenter Roeck wrote: On 01/27/2017 11:41 PM, Bhumika Goyal wrote: Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is

Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Guenter Roeck
On 01/28/2017 07:30 AM, Bhumika Goyal wrote: On Sat, Jan 28, 2017 at 8:57 PM, Guenter Roeck wrote: On 01/27/2017 11:41 PM, Bhumika Goyal wrote: Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so

Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Guenter Roeck
On 01/27/2017 11:41 PM, Bhumika Goyal wrote: Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: I have a

Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Guenter Roeck
On 01/27/2017 11:41 PM, Bhumika Goyal wrote: Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: I have a

Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Bhumika Goyal
On Sat, Jan 28, 2017 at 8:57 PM, Guenter Roeck wrote: > On 01/27/2017 11:41 PM, Bhumika Goyal wrote: >> >> Declare watchdog_ops structures as const as they are only stored in the >> ops field of a watchdog_device structure. This field is of type const, so >> watchdog_ops

Re: [PATCH] watchdog: constify watchdog_ops structures

2017-01-28 Thread Bhumika Goyal
On Sat, Jan 28, 2017 at 8:57 PM, Guenter Roeck wrote: > On 01/27/2017 11:41 PM, Bhumika Goyal wrote: >> >> Declare watchdog_ops structures as const as they are only stored in the >> ops field of a watchdog_device structure. This field is of type const, so >> watchdog_ops structures having this

[PATCH] watchdog: constify watchdog_ops structures

2017-01-27 Thread Bhumika Goyal
Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@

[PATCH] watchdog: constify watchdog_ops structures

2017-01-27 Thread Bhumika Goyal
Declare watchdog_ops structures as const as they are only stored in the ops field of a watchdog_device structure. This field is of type const, so watchdog_ops structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@