Re: [PATCH] mfd: kempld-core: constify variables that point to const structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Jun 2018, Julia Lawall wrote:

> Add const to the declaration of various local variables of type
> kempld_platform_data for which the referenced value is always only
> dereferenced or passed to a const parameter, to record the fact that
> kempld_platform_data_generic is declared as const.
> 
> The semantic match that finds this issue is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r@
> identifier i,j;
> @@
> const struct i j = { ... };
> 
> @ok@
> identifier r.i;
> position p;
> @@
> const struct i@p *
> 
> @@
> identifier r.i;
> position p != ok.p;
> @@
> * struct i@p *
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>
> 
> ---
>  drivers/mfd/kempld-core.c |   15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux