From: Jonathan Cameron <jic23@kernel.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: ak8975: constify ak_def structures
Date: Sat, 09 Jan 2016 17:03:30 +0000 [thread overview]
Message-ID: <56913D62.8080107@kernel.org> (raw)
In-Reply-To: <1452005802-4165-1-git-send-email-Julia.Lawall@lip6.fr>
On 05/01/16 14:56, Julia Lawall wrote:
> The ak_def structures are never modified, so declare them as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
Applied, thanks.
Jonathan
> ---
> drivers/iio/magnetometer/ak8975.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index b13936d..9c5c9ef 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -252,7 +252,7 @@ struct ak_def {
> u8 data_regs[3];
> };
>
> -static struct ak_def ak_def_array[AK_MAX_TYPE] = {
> +static const struct ak_def ak_def_array[AK_MAX_TYPE] = {
> {
> .type = AK8975,
> .raw_to_gauss = ak8975_raw_to_gauss,
> @@ -360,7 +360,7 @@ static struct ak_def ak_def_array[AK_MAX_TYPE] = {
> */
> struct ak8975_data {
> struct i2c_client *client;
> - struct ak_def *def;
> + const struct ak_def *def;
> struct attribute_group attrs;
> struct mutex lock;
> u8 asa[3];
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: ak8975: constify ak_def structures
Date: Sat, 9 Jan 2016 17:03:30 +0000 [thread overview]
Message-ID: <56913D62.8080107@kernel.org> (raw)
In-Reply-To: <1452005802-4165-1-git-send-email-Julia.Lawall@lip6.fr>
On 05/01/16 14:56, Julia Lawall wrote:
> The ak_def structures are never modified, so declare them as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
Applied, thanks.
Jonathan
> ---
> drivers/iio/magnetometer/ak8975.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index b13936d..9c5c9ef 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -252,7 +252,7 @@ struct ak_def {
> u8 data_regs[3];
> };
>
> -static struct ak_def ak_def_array[AK_MAX_TYPE] = {
> +static const struct ak_def ak_def_array[AK_MAX_TYPE] = {
> {
> .type = AK8975,
> .raw_to_gauss = ak8975_raw_to_gauss,
> @@ -360,7 +360,7 @@ static struct ak_def ak_def_array[AK_MAX_TYPE] = {
> */
> struct ak8975_data {
> struct i2c_client *client;
> - struct ak_def *def;
> + const struct ak_def *def;
> struct attribute_group attrs;
> struct mutex lock;
> u8 asa[3];
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-01-09 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 14:56 [PATCH] iio: ak8975: constify ak_def structures Julia Lawall
2016-01-05 14:56 ` Julia Lawall
2016-01-09 17:03 ` Jonathan Cameron [this message]
2016-01-09 17:03 ` Jonathan Cameron
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=56913D62.8080107@kernel.org \
--to=jic23@kernel.org \
--cc=Julia.Lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.