lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 22 Jan 2017 13:19:31 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Bhumika Goyal <bhumirks@...il.com>, julia.lawall@...6.fr,
        knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: constify iio_info structures

On 21/01/17 17:03, Bhumika Goyal wrote:
> Declare iio_info structures as const as they are only stored in
> the info field of a iio_dev structure. This field is of type const,
> so iio_info structures having similar properties can be made const too.
> 
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>    6944	    792	      0	   7736	   1e38	drivers/iio/adc/ti-ads1015.o
> 
> File size after:
>    text   data	    bss	    dec	    hex	filename
>    7264	    472	      0	   7736	   1e38	drivers/iio/adc/ti-ads1015.o
> 
> Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
Good find.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/adc/ti-ads1015.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
> index cde6f13..422b314 100644
> --- a/drivers/iio/adc/ti-ads1015.c
> +++ b/drivers/iio/adc/ti-ads1015.c
> @@ -472,14 +472,14 @@ static const struct attribute_group ads1115_attribute_group = {
>  	.attrs = ads1115_attributes,
>  };
>  
> -static struct iio_info ads1015_info = {
> +static const struct iio_info ads1015_info = {
>  	.driver_module	= THIS_MODULE,
>  	.read_raw	= ads1015_read_raw,
>  	.write_raw	= ads1015_write_raw,
>  	.attrs          = &ads1015_attribute_group,
>  };
>  
> -static struct iio_info ads1115_info = {
> +static const struct iio_info ads1115_info = {
>  	.driver_module	= THIS_MODULE,
>  	.read_raw	= ads1015_read_raw,
>  	.write_raw	= ads1015_write_raw,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ