Re: [PATCH] pinctrl: qcom: msm: constify gpio_chip structure

2017-08-01 Thread Linus Walleij
On Tue, Jul 11, 2017 at 8:34 PM, Gustavo A. R. Silva wrote: > This structure is only used to copy into other 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] pinctrl: qcom: msm: constify gpio_chip structure

2017-07-11 Thread Gustavo A. R. Silva
Hi Bjorn, Quoting Bjorn Andersson : On Tue 11 Jul 11:34 PDT 2017, Gustavo A. R. Silva wrote: [..] In the following log you can see a significant difference in the code size and data segment, hence in the dec segment. This log is the output "dec" is for "decimal" and is the sum of text, data

Re: [PATCH] pinctrl: qcom: msm: constify gpio_chip structure

2017-07-11 Thread Bjorn Andersson
On Tue 11 Jul 11:34 PDT 2017, Gustavo A. R. Silva wrote: [..] > In the following log you can see a significant difference in the code size > and data segment, hence in the dec segment. This log is the output "dec" is for "decimal" and is the sum of text, data and bss... > of the size command, bef

[PATCH] pinctrl: qcom: msm: constify gpio_chip structure

2017-07-11 Thread Gustavo A. R. Silva
This structure is only used to copy into other 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; posit