Re: [PATCH v1] mmc: wbsd: Drop unused assignment of pnp_device_id driver data

Ulf Hansson <[email protected]> Mon, 6 Jul 2026 17:46:34 +0200
Newsgroups org.kernel.vger.linux-mmc,org.kernel.vger.linux-kernel
Message-ID <CAPx+jO8hJ7hYExqPzR3we5mewUZipEG0mSeV9qCafw8Q0VC+_A@mail.gmail.com>
On Wed, Jun 10, 2026 at 10:41 AM Uwe Kleine-König (The Capable Hub)
<[email protected]> wrote:
>
> The driver explicitly sets the .driver_data member of struct
> pnp_device_id to zero without relying on that value. Drop these unused
> assignments.
>
> While touching this array use a named initializer for .id and simplify
> the list terminator.
>
> This patch doesn't modify the compiled array, only its representation in
> source form benefits. The former was confirmed with an x86 build.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
> 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/[email protected]/
> 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/mmc/host/wbsd.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
> index c33a0223ce7f..51706898239e 100644
> --- a/drivers/mmc/host/wbsd.c
> +++ b/drivers/mmc/host/wbsd.c
> @@ -52,9 +52,9 @@
>  #ifdef CONFIG_PNP
>
>  static const struct pnp_device_id pnp_dev_table[] = {
> -       { "WEC0517", 0 },
> -       { "WEC0518", 0 },
> -       { "", 0 },
> +       { .id = "WEC0517" },
> +       { .id = "WEC0518" },
> +       { }
>  };
>
>  MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
>
> base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
> --
> 2.47.3
>