From: Andi Shyti <andi.shyti@kernel.org>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] i2c: at91: constify at91_twi_pdata
Date: Fri, 30 Jun 2023 00:38:25 +0200 [thread overview]
Message-ID: <20230629223825.27q75s2a3eyiapgy@intel.intel> (raw)
In-Reply-To: <6ac87dcbb660ae892bf8740c78d3eca7625d6db6.1687814664.git.mirq-linux@rere.qmqm.pl>
Hi Michal,
[...]
> -static struct at91_twi_pdata *at91_twi_get_driver_data(
> +static const struct at91_twi_pdata *at91_twi_get_driver_data(
> struct platform_device *pdev)
> {
> if (pdev->dev.of_node) {
> @@ -189,9 +189,9 @@ static struct at91_twi_pdata *at91_twi_get_driver_data(
> match = of_match_node(atmel_twi_dt_ids, pdev->dev.of_node);
> if (!match)
> return NULL;
> - return (struct at91_twi_pdata *)match->data;
> + return match->data;
> }
> - return (struct at91_twi_pdata *) platform_get_device_id(pdev)->driver_data;
> + return (const void *) platform_get_device_id(pdev)->driver_data;
the const's always confuse me... do you get an error here? Is
this cast really needed?
Andi
next prev parent reply other threads:[~2023-06-29 22:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 21:26 [PATCH 1/1] i2c: at91: constify at91_twi_pdata Michał Mirosław
2023-06-29 22:38 ` Andi Shyti [this message]
2023-07-02 10:40 ` Michał Mirosław
2023-07-03 18:23 ` Krzysztof Kozlowski
2023-07-03 20:46 ` Michał Mirosław
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=20230629223825.27q75s2a3eyiapgy@intel.intel \
--to=andi.shyti@kernel.org \
--cc=codrin.ciubotariu@microchip.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
/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