From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Bhumika Goyal <bhumirks@gmail.com>,
julia.lawall@lip6.fr, ludovic.desroches@atmel.com,
wsa@the-dreams.de, sonic.zhang@analog.com,
andriy.shevchenko@linux.intel.com,
mika.westerberg@linux.intel.com, jdelvare@suse.com,
patrice.chotard@st.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org,
adi-buildroot-devel@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org, kernel@stlinux.com
Subject: Re: [PATCH] i2c: busses: constify i2c_algorithm structures
Date: Mon, 30 Jan 2017 13:15:54 +0200 [thread overview]
Message-ID: <2babe118-e7fa-c579-d00f-16ddcb466b69@linux.intel.com> (raw)
In-Reply-To: <1485540377-13686-1-git-send-email-bhumirks@gmail.com>
On 01/27/2017 08:06 PM, Bhumika Goyal wrote:
> Declare i2c_algorithm structures as const as they are only stored in the
> algo field of an i2c_adapter structure. This field is of type const, so
> i2c_algorithm structures having this property can be made const too.
> Done using Coccinelle:
>
...
> diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
> index 6d81c56..a62c14c 100644
> --- a/drivers/i2c/busses/i2c-designware-core.c
> +++ b/drivers/i2c/busses/i2c-designware-core.c
> @@ -822,7 +822,7 @@ static u32 i2c_dw_func(struct i2c_adapter *adap)
> return dev->functionality;
> }
>
> -static struct i2c_algorithm i2c_dw_algo = {
> +static const struct i2c_algorithm i2c_dw_algo = {
> .master_xfer = i2c_dw_xfer,
> .functionality = i2c_dw_func,
> };
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
WARNING: multiple messages have this Message-ID (diff)
From: jarkko.nikula@linux.intel.com (Jarkko Nikula)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] i2c: busses: constify i2c_algorithm structures
Date: Mon, 30 Jan 2017 13:15:54 +0200 [thread overview]
Message-ID: <2babe118-e7fa-c579-d00f-16ddcb466b69@linux.intel.com> (raw)
In-Reply-To: <1485540377-13686-1-git-send-email-bhumirks@gmail.com>
On 01/27/2017 08:06 PM, Bhumika Goyal wrote:
> Declare i2c_algorithm structures as const as they are only stored in the
> algo field of an i2c_adapter structure. This field is of type const, so
> i2c_algorithm structures having this property can be made const too.
> Done using Coccinelle:
>
...
> diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
> index 6d81c56..a62c14c 100644
> --- a/drivers/i2c/busses/i2c-designware-core.c
> +++ b/drivers/i2c/busses/i2c-designware-core.c
> @@ -822,7 +822,7 @@ static u32 i2c_dw_func(struct i2c_adapter *adap)
> return dev->functionality;
> }
>
> -static struct i2c_algorithm i2c_dw_algo = {
> +static const struct i2c_algorithm i2c_dw_algo = {
> .master_xfer = i2c_dw_xfer,
> .functionality = i2c_dw_func,
> };
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
next prev parent reply other threads:[~2017-01-30 11:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 18:06 [PATCH] i2c: busses: constify i2c_algorithm structures Bhumika Goyal
2017-01-27 18:06 ` Bhumika Goyal
2017-01-29 10:28 ` Uwe Kleine-König
2017-01-29 10:28 ` Uwe Kleine-König
2017-01-29 10:28 ` Uwe Kleine-König
2017-01-30 9:41 ` Patrice CHOTARD
2017-01-30 9:41 ` Patrice CHOTARD
2017-01-30 11:15 ` Jarkko Nikula [this message]
2017-01-30 11:15 ` Jarkko Nikula
2017-01-31 14:22 ` Jean Delvare
2017-01-31 14:22 ` Jean Delvare
2017-02-06 16:12 ` Ludovic Desroches
2017-02-06 16:12 ` Ludovic Desroches
2017-02-06 16:12 ` Ludovic Desroches
2017-02-09 16:08 ` Wolfram Sang
2017-02-09 16:08 ` Wolfram Sang
2017-02-09 16:08 ` Wolfram Sang
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=2babe118-e7fa-c579-d00f-16ddcb466b69@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhumirks@gmail.com \
--cc=jdelvare@suse.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel@stlinux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=patrice.chotard@st.com \
--cc=sonic.zhang@analog.com \
--cc=wsa@the-dreams.de \
/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.