Linux CAN drivers development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Vincent Mailhol <mailhol@kernel.org>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-can@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] can: flexcan: Drop unused platform driver data
Date: Thu, 28 May 2026 15:29:53 +0200	[thread overview]
Message-ID: <ahhCjFWJopFbFSg7@monoceros> (raw)
In-Reply-To: <86caae65-e768-494b-8a75-f79ffcd2f5e4@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

Hello Vincent,

On Thu, May 28, 2026 at 01:02:20PM +0200, Vincent Mailhol wrote:
> On 28/05/2026 at 11:45, Uwe Kleine-König (The Capable Hub) wrote:
> > No function in the flexcan driver ever accesses the .driver_data member
> > of its .id_table array as device_get_match_data() returns NULL for
> > non-of platform devices. So drop that unused assignment.
> > 
> > While touching that array, drop the trailing comma after the terminator
> > entry.
> > 
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> > ---
> > Hello,
> > 
> > I found this patch opportunity while working on a cleanup quest that has
> > unifying platform_device_id arrays as first step.
> > 
> > Best regards
> > Uwe
> >  drivers/net/can/flexcan/flexcan-core.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
> > index f5d22c61503f..1871def90fe3 100644
> > --- a/drivers/net/can/flexcan/flexcan-core.c
> > +++ b/drivers/net/can/flexcan/flexcan-core.c
> > @@ -2077,10 +2077,9 @@ MODULE_DEVICE_TABLE(of, flexcan_of_match);
> >  static const struct platform_device_id flexcan_id_table[] = {
> >  	{
> >  		.name = "flexcan-mcf5441x",
> > -		.driver_data = (kernel_ulong_t)&fsl_mcf5441x_devtype_data,
> 
> But now, fsl_mcf5441x_devtype_data becomes unused, right? Should this
> also be dropped?

Indeed. I would have expected that this results in a compiler warning,
but there isn't one for me and I expected that the struct is still
referenced in flexcan_of_match[] but obviously didn't check.

I'll wait with a v2 until the discussion in the neighbour thread in
reply to Marc's review ends.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-05-28 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  9:45 [PATCH v1] can: flexcan: Drop unused platform driver data Uwe Kleine-König (The Capable Hub)
2026-05-28 11:00 ` Marc Kleine-Budde
2026-05-28 13:26   ` Uwe Kleine-König (The Capable Hub)
2026-05-28 11:02 ` Vincent Mailhol
2026-05-28 13:29   ` Uwe Kleine-König (The Capable Hub) [this message]
2026-05-29  0:43 ` kernel test robot
2026-05-29  2:00 ` kernel test robot

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=ahhCjFWJopFbFSg7@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox