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: <743239c7-8341-6fdf-b493-ac98a4853322@kernel.org>
Date:   Sat, 1 Oct 2016 12:09:14 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Bhumika Goyal <bhumirks@...il.com>, knaack.h@....de,
        lars@...afoo.de, pmeerw@...erw.net, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: Declare event_attrs field of iio_info structure as
 const

On 01/10/16 10:57, Bhumika Goyal wrote:
> The event_attrs field of iio_info structure is only initialized once
> whenever an object of iio_info is created. After that this field
> is never modified again anywhere in the kernel. So, declare event_attrs
> field of iio_info as a const struct attribute_group.
> Checked for occurences throughout the kernel using grep and
> coccinelle.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Clearly this becomes more interesting when the follow up patches
making ever event_attr group we can constant. 
Looking forward to those ;)


Jonathan
> ---
>  include/linux/iio/iio.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index b4a0679..4591d8e 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -381,7 +381,7 @@ struct iio_dev;
>   **/
>  struct iio_info {
>  	struct module			*driver_module;
> -	struct attribute_group		*event_attrs;
> +	const struct attribute_group	*event_attrs;
>  	const struct attribute_group	*attrs;
>  
>  	int (*read_raw)(struct iio_dev *indio_dev,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ