Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure

2017-08-02 Thread Linus Walleij
On Wed, Jul 12, 2017 at 12:15 AM, Gustavo A. R. Silva wrote: > This structure is only used to copy into another structure, so declare > it as const. > > This issue was detected using Coccinelle and the following semantic patch: > > @r disable optional_qualifier@ > identifier i; > position p; > @@

Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure

2017-07-16 Thread Gustavo A. R. Silva
On 07/13/2017 12:41 PM, Thor Thayer wrote: On 07/11/2017 05:15 PM, Gustavo A. R. Silva wrote: This structure is only used to copy into another structure, so declare it as const. Signed-off-by: Gustavo A. R. Silva --- drivers/gpio/gpio-altera-a10sr.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure

2017-07-13 Thread Thor Thayer
On 07/11/2017 05:15 PM, Gustavo A. R. Silva wrote: This structure is only used to copy into another structure, so declare it as const. Signed-off-by: Gustavo A. R. Silva --- drivers/gpio/gpio-altera-a10sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/

[PATCH] gpio: altera-a10sr: constify gpio_chip structure

2017-07-11 Thread Gustavo A. R. Silva
This structure is only used to copy into another structure, so declare it as const. This issue was detected using Coccinelle and the following semantic patch: @r disable optional_qualifier@ identifier i; position p; @@ static struct gpio_chip i@p = { ... }; @ok@ identifier r.i; expression e; pos