From: Jonathan Cameron <jic23@kernel.org>
To: Bhumika Goyal <bhumirks@gmail.com>,
knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: Declare event_attrs field of iio_info structure as const
Date: Sat, 1 Oct 2016 12:09:14 +0100 [thread overview]
Message-ID: <743239c7-8341-6fdf-b493-ac98a4853322@kernel.org> (raw)
In-Reply-To: <1475315838-15366-1-git-send-email-bhumirks@gmail.com>
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@gmail.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,
>
next prev parent reply other threads:[~2016-10-01 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-01 9:57 Bhumika Goyal
2016-10-01 11:09 ` Jonathan Cameron [this message]
2016-10-01 11:41 ` Bhumika Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=743239c7-8341-6fdf-b493-ac98a4853322@kernel.org \
--to=jic23@kernel.org \
--cc=bhumirks@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®