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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200531140756.090f6204@archlinux>
Date:   Sun, 31 May 2020 14:07:56 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] iio: adc: max11100: Constify struct iio_chan_spec

On Tue, 26 May 2020 23:02:18 +0200
Rikard Falkeborn <rikard.falkeborn@...il.com> wrote:

> max11100_channels is not modified and can therefore be made const to
> allow the compiler to put it in read-only memory.
> 
> Before:
>    text    data     bss     dec     hex filename
>    3776    1168       0    4944    1350 drivers/iio/adc/max11100.o
> 
> After:
>    text    data     bss     dec     hex filename
>    3968     976       0    4944    1350 drivers/iio/adc/max11100.o
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
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/max11100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c
> index 3440539cfdba..b121ca78f851 100644
> --- a/drivers/iio/adc/max11100.c
> +++ b/drivers/iio/adc/max11100.c
> @@ -37,7 +37,7 @@ struct max11100_state {
>  	u8 buffer[3] ____cacheline_aligned;
>  };
>  
> -static struct iio_chan_spec max11100_channels[] = {
> +static const struct iio_chan_spec max11100_channels[] = {
>  	{ /* [0] */
>  		.type = IIO_VOLTAGE,
>  		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ