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:17:06 +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: industrialio-trigger: constify device_type
 structures

On 21/01/17 16:59, Bhumika Goyal wrote:
> Declare device_type structure as const as it is only stored in the
> type field of a device structure. This field is of type const, so add
> const to declaration of device_type structure.
> 
> File size before:
>    text	   data	    bss	    dec	    hex	filename
>    5389	    208	     48	   5645	   160d	iio/industrialio-trigger.o
> 
> File size after:
>    text	   data	    bss	    dec	    hex	filename
>    5453	    176	     48	   5677	   162d	iio/industrialio-trigger.o
> 
> Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
Makes sense.

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

Thanks,

Jonathan
> ---
>  drivers/iio/industrialio-trigger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> index 978729f..3257f0e 100644
> --- a/drivers/iio/industrialio-trigger.c
> +++ b/drivers/iio/industrialio-trigger.c
> @@ -487,7 +487,7 @@ static void iio_trig_release(struct device *device)
>  	kfree(trig);
>  }
>  
> -static struct device_type iio_trig_type = {
> +static const struct device_type iio_trig_type = {
>  	.release = iio_trig_release,
>  	.groups = iio_trig_dev_groups,
>  };
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ