From: gregory.clement@free-electrons•com (Gregory CLEMENT)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 05/12] pinctrl: armada-37xx: account for const type of of_device_id.data
Date: Tue, 02 Jan 2018 16:36:19 +0100 [thread overview]
Message-ID: <87y3lgb7d8.fsf@free-electrons.com> (raw)
In-Reply-To: <1514899688-27844-6-git-send-email-Julia.Lawall@lip6.fr> (Julia Lawall's message of "Tue, 2 Jan 2018 14:28:01 +0100")
Hi Julia,
On mar., janv. 02 2018, Julia Lawall <Julia.Lawall@lip6•fr> wrote:
> The data field of an of_device_id structure has type const void *, so
> there is no need for a const-discarding cast when putting const values
> into such a structure.
>
> Done using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6•fr>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons•com>
Thanks,
Gregory
PS: actually the intent was not to do a const-discarding cast it was
just a useless cast! :)
>
> ---
> drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff -u -p a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> @@ -1006,11 +1006,11 @@ static int armada_37xx_pinctrl_register(
> static const struct of_device_id armada_37xx_pinctrl_of_match[] = {
> {
> .compatible = "marvell,armada3710-sb-pinctrl",
> - .data = (void *)&armada_37xx_pin_sb,
> + .data = &armada_37xx_pin_sb,
> },
> {
> .compatible = "marvell,armada3710-nb-pinctrl",
> - .data = (void *)&armada_37xx_pin_nb,
> + .data = &armada_37xx_pin_nb,
> },
> { },
> };
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2018-01-02 15:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 13:27 [PATCH 00/12] account for const type of of_device_id.data Julia Lawall
2018-01-02 13:27 ` [PATCH 01/12] PM / AVS: rockchip-io: " Julia Lawall
2018-01-02 13:27 ` [PATCH 02/12] pinctrl: at91-pio4: " Julia Lawall
2018-01-03 7:58 ` Linus Walleij
2018-01-02 13:27 ` [PATCH 03/12] spi: sirf: " Julia Lawall
2018-01-03 12:15 ` Applied "spi: sirf: account for const type of of_device_id.data" to the spi tree Mark Brown
2018-01-03 12:22 ` Mark Brown
2018-01-02 13:28 ` [PATCH 05/12] pinctrl: armada-37xx: account for const type of of_device_id.data Julia Lawall
2018-01-02 15:36 ` Gregory CLEMENT [this message]
2018-01-03 8:03 ` Linus Walleij
2018-01-02 13:28 ` [PATCH 07/12] i2c: rk3x: " Julia Lawall
2018-01-15 18:24 ` Wolfram Sang
2018-01-17 11:00 ` Heiko Stuebner
2018-01-17 23:12 ` Wolfram Sang
2018-01-02 13:28 ` [PATCH 12/12] power: reset: " Julia Lawall
2018-01-05 13:24 ` Alexandre Belloni
2018-01-09 16:22 ` Sebastian Reichel
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=87y3lgb7d8.fsf@free-electrons.com \
--to=gregory.clement@free-electrons$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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