Linux block layer
 help / color / mirror / Atom feed
From: "Denis Efremov (Oracle)" <efremov@linux.com>
To: "Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>, "Jens Axboe" <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] floppy: Drop unused pnp driver data
Date: Wed, 10 Jun 2026 14:59:44 +0400	[thread overview]
Message-ID: <6330395a-15a5-43bd-a2fa-69fb24eef76e@linux.com> (raw)
In-Reply-To: <99dbf851ffb99229ea1dcfd8f58e9ee6a1f05349.1781075967.git.u.kleine-koenig@baylibre.com>



On 10/06/2026 11:27, Uwe Kleine-König (The Capable Hub) wrote:
> The pnp_device_id array is only used for module data to support
> auto-loading the floppy module. So the .driver_data member is unused and
> this assignment can be dropped.
> 
> While touching that array, align the coding style to what is used most
> for these.
> 
> This patch doesn't modify the compiled array, only its representation
> in source form benefits. The former was confirmed with x86 and arm64
> builds.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>

Reviewed-by: Denis Efremov (Oracle) <efremov@linux.com>

> ---
> Hello,
> 
> I intend to change struct pnp_device_id and for that it's required that
> .driver_data is not assigned using a list initializer. Instead of
> converting it to a named initializer, drop the assignment as the value
> is unused. So this is both a cleanup and a preparation for a later patch
> series.
> 
> See
> https://lore.kernel.org/all/cover.1779878004.git.u.kleine-koenig@baylibre.com/
> for a more verbose description on the mentioned change to struct
> pnp_device_id (though this is about platform_device_id, but the idea
> here is the same).
> 
> Best regards
> Uwe
> 
>  drivers/block/floppy.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index 0509746f8aed..dca495be0683 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -5012,8 +5012,8 @@ MODULE_LICENSE("GPL");
>  
>  /* This doesn't actually get used other than for module information */
>  static const struct pnp_device_id floppy_pnpids[] = {
> -	{"PNP0700", 0},
> -	{}
> +	{ .id = "PNP0700" },
> +	{ }
>  };
>  
>  MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
> 
> base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c


  reply	other threads:[~2026-06-10 10:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10  7:27 [PATCH v1] floppy: Drop unused pnp driver data Uwe Kleine-König (The Capable Hub)
2026-06-10 10:59 ` Denis Efremov (Oracle) [this message]
2026-06-10 12:28 ` Jens Axboe

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=6330395a-15a5-43bd-a2fa-69fb24eef76e@linux.com \
    --to=efremov@linux.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    /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