Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	 "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Adam Radford <aradford@gmail.com>,
	 Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
	Matthew Wilcox <willy@infradead.org>,
	 Hannes Reinecke <hare@suse.com>,
	Finn Thain <fthain@linux-m68k.org>,
	 Michael Schmitz <schmitzmic@gmail.com>,
	Ram Vegesna <ram.vegesna@broadcom.com>,
	 Yihang Li <liyihang9@h-partners.com>,
	Don Brace <don.brace@microchip.com>,
	 HighPoint Linux Team <linux@highpoint-tech.com>,
	Brian King <brking@us.ibm.com>,
	 Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	 Shivasharan S <shivasharan.srikanteshwara@broadcom.com>,
	Chandrakanth patil <chandrakanth.patil@broadcom.com>,
	 Jack Wang <jinpu.wang@cloud.ionos.com>,
	Junrui Luo <moonafterrain@outlook.com>,
	 Kees Cook <kees@kernel.org>, Dave Jiang <dave.jiang@intel.com>,
	 Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	 Lukas Wunner <lukas@wunner.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	 Thomas Gleixner <tglx@kernel.org>,
	Duoming Zhou <duoming@zju.edu.cn>,
	linux-scsi@vger.kernel.org,  linux-kernel@vger.kernel.org,
	target-devel@vger.kernel.org, storagedev@microchip.com,
	 megaraidlinux.pdl@broadcom.com,
	Markus Schneider-Pargmann <msp@baylibre.com>
Subject: Re: [PATCH] scsi: Consistently define pci_device_ids using named initializers
Date: Tue, 9 Jun 2026 17:34:38 +0200	[thread overview]
Message-ID: <aigySpryV0ptiBqr@monoceros> (raw)
In-Reply-To: <20260429101820.3059523-2-u.kleine-koenig@baylibre.com>

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

[Dropping Bradley Grove and Michael Reed from Cc: as their addresses
bounced]

On Wed, Apr 29, 2026 at 12:18:20PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
> 
> The various struct pci_device_id arrays were initialized mostly by one
> of the PCI_DEVICE macros and then list expressions. The latter isn't
> easily readable if you're not into PCI. Using named initializers is more
> explicit and thus easier to parse.
> 
> Also use PCI_DEVICE* helper macros to assign .vendor, .device,
> .subvendor and .subdevice where appropriate and skip explicit
> assignments of 0 (which the compiler takes care of).
> 
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
> 
> This change doesn't introduce changes to the compiled pci_device_id
> arrays. Tested on x86 and arm64.
> 
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> Hello,
> 
> the mentioned follow-up quest allows to do
> 
> 	-	{ PCI_VDEVICE(TTI, 0x3220), .driver_data = (kernel_ulong_t)&hptiop_itl_ops },
> 	+	{ PCI_VDEVICE(TTI, 0x3220), .driver_data_ptr = &hptiop_itl_ops },
> 
> which gets rid of a bunch of casts and so brings a little bit more type
> safety. This patch is a preparation for that.
> 
> I assume a single patch for all of drivers/scsi is fine. If not I can
> split per driver.

Is this patch still on someone's radar?

Best regards
Uwe

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

      reply	other threads:[~2026-06-09 15:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 10:18 [PATCH] scsi: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-06-09 15:34 ` Uwe Kleine-König (The Capable Hub) [this message]

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=aigySpryV0ptiBqr@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=aacraid@microsemi.com \
    --cc=aradford@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=bigeasy@linutronix.de \
    --cc=brking@us.ibm.com \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=dave.jiang@intel.com \
    --cc=don.brace@microchip.com \
    --cc=duoming@zju.edu.cn \
    --cc=fthain@linux-m68k.org \
    --cc=giovanni.cabiddu@intel.com \
    --cc=hare@suse.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@highpoint-tech.com \
    --cc=liyihang9@h-partners.com \
    --cc=lukas@wunner.de \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=moonafterrain@outlook.com \
    --cc=msp@baylibre.com \
    --cc=ram.vegesna@broadcom.com \
    --cc=schmitzmic@gmail.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=storagedev@microchip.com \
    --cc=sumit.saxena@broadcom.com \
    --cc=target-devel@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=willy@infradead.org \
    /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