[PATCH v3 0/6]

Philipp Stanner posted 6 patches 7 months ago
There is a newer version of this series
.../driver-api/driver-model/devres.rst        |   2 +-
drivers/pci/devres.c                          | 201 +++---------------
drivers/pci/iomap.c                           |  16 --
drivers/pci/pci.c                             |  42 ----
drivers/pci/pci.h                             |   3 -
5 files changed, 32 insertions(+), 232 deletions(-)
[PATCH v3 0/6]
Posted by Philipp Stanner 7 months ago
Changes in v3:
  - Adjust wording for Documentation patch (Randy, Alok)
  - Apply Sathyanarayanan's RBs.

Changes in v2:
  - Drop patch for removing forgotten header. Patch is unrelated. Will
    resend seperately. (Andy)
  - Make docu patch headline "Documentation/driver-api:". There seems to
    be no canonical way, but this style is quite frequent. (Andy)
  - Apply Andy's RBs where applicable.

Howdy,

the great day has finally arrived, I managed to get rid of one of the
big three remaining problems in the PCI devres API (the other two being
MSI having hybrid-devres, too, and the good old pcim_iomap_tablle)!

It turned out that there aren't even that many users of the hybrid API,
where pcim_enable_device() switches certain functions in pci.c into
managed devres mode, which we want to remove.

The affected drivers can be found with:

grep -rlZ "pcim_enable_device" | xargs -0 grep -l "pci_request"

These were:

	ASoC [1]
	alsa [2] 
	cardreader [3]
	cirrus [4]
	i2c [5]
	mmc [6]
	mtd [7]
	mxser [8]
	net [9]
	spi [10]
	vdpa [11]
	vmwgfx [12]

All of those have been merged and are queued up for the merge window.
The only possible exception is vdpa, but it seems to be ramped up right
now; vdpa, however, doesn't even use the hybrid behavior, so that patch
is just for generic cleanup anyways.

With the users of the hybrid feature gone, the feature itself can
finally be burned.

So I'm sending out this series now to probe whether it's judged to be
good enough for the upcoming merge window. If we could take it, we would
make it impossible that anyone adds new users of the hybrid thing.

If it's too late for the merge window, then that's what it is, of
course.

In any case I'm glad we can get rid of most of that legacy stuff now.

Regards,
Philipp

[1] https://lore.kernel.org/all/174657893832.4155013.12131767110464880040.b4-ty@kernel.org/
[2] https://lore.kernel.org/all/8734dy3tvz.wl-tiwai@suse.de/
[3] https://lore.kernel.org/all/20250417091532.26520-2-phasta@kernel.org/ (private confirmation mail from Greg KH)
[4] https://lore.kernel.org/dri-devel/e7c45c099f8981257866396e01a91df1afcfbf97.camel@mailbox.org/
[5] https://lore.kernel.org/all/l26azmnpceka2obq4gtwozziq6lbilb2owx57aajtp3t6jhd3w@llmeikgjvqyh/
[6] https://lore.kernel.org/all/CAPDyKFqqV2VEqi17UHmFE0b9Y+h5q2YaNfHTux8U=7DgF+svEw@mail.gmail.com/
[7] https://lore.kernel.org/all/174591865790.993381.15992314896975862083.b4-ty@bootlin.com/
[8] https://lore.kernel.org/all/20250417081333.20917-2-phasta@kernel.org/ (private confirmation mail from Greg KH)
[9] https://lore.kernel.org/all/174588423950.1081621.6688170836136857875.git-patchwork-notify@kernel.org/
[10] https://lore.kernel.org/all/174492457740.248895.3318833401427095151.b4-ty@kernel.org/
[11] https://lore.kernel.org/all/20250515072724-mutt-send-email-mst@kernel.org/
[12] https://lore.kernel.org/dri-devel/CABQX2QNQbO4dMq-Hi6tvpi7OTwcVfjM62eCr1OGkzF8Phy-Shw@mail.gmail.com/

Philipp Stanner (6):
  PCI: Remove hybrid devres nature from request functions
  Documentation/driver-api: Update pcim_enable_device()
  PCI: Remove pcim_request_region_exclusive()
  PCI: Remove request_flags relict from devres
  PCI: Remove redundant set of request funcs
  PCI: Remove hybrid-devres hazzard warnings from doc

 .../driver-api/driver-model/devres.rst        |   2 +-
 drivers/pci/devres.c                          | 201 +++---------------
 drivers/pci/iomap.c                           |  16 --
 drivers/pci/pci.c                             |  42 ----
 drivers/pci/pci.h                             |   3 -
 5 files changed, 32 insertions(+), 232 deletions(-)

-- 
2.49.0
Re: [PATCH v3 0/6]
Posted by Andy Shevchenko 7 months ago
On Mon, May 19, 2025 at 01:29:54PM +0200, Philipp Stanner wrote:

Just for your info: Subject is clean. Forgot?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v3 0/6]
Posted by Philipp Stanner 7 months ago
On Mon, 2025-05-19 at 14:38 +0300, Andy Shevchenko wrote:
> On Mon, May 19, 2025 at 01:29:54PM +0200, Philipp Stanner wrote:
> 
> Just for your info: Subject is clean. Forgot?
> 

Yup.

checkpatch doesn't detect that, though:

scripts/checkpatch.pl outgoing/pcim/hybrid/pci-rest/v3/v3-000*       (base) 
-----------------------------------------------------------
outgoing/pcim/hybrid/pci-rest/v3/v3-0000-cover-letter.patch
-----------------------------------------------------------
WARNING: 'seperately' may be misspelled - perhaps 'separately'?
#13: 
    resend seperately. (Andy)
           ^^^^^^^^^^

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#67: 
[1] https://lore.kernel.org/all/174657893832.4155013.12131767110464880040.b4-ty@kernel.org/

total: 0 errors, 2 warnings, 0 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

outgoing/pcim/hybrid/pci-rest/v3/v3-0000-cover-letter.patch has style problems, please review.



Maybe someone(tm) should fix that :no_mouth_emoji:

P.
Re: [PATCH v3 0/6]
Posted by Krzysztof Wilczyński 7 months ago
Hello,

> Howdy,
> 
> the great day has finally arrived, I managed to get rid of one of the
> big three remaining problems in the PCI devres API (the other two being
> MSI having hybrid-devres, too, and the good old pcim_iomap_tablle)!
> 
> It turned out that there aren't even that many users of the hybrid API,
> where pcim_enable_device() switches certain functions in pci.c into
> managed devres mode, which we want to remove.

Applied to devres, thank you!

[1/6] PCI: Remove hybrid devres nature from request functions
      https://git.kernel.org/pci/pci/c/51f6aec99cb0
[2/6] Documentation/driver-api: Update pcim_enable_device()
      https://git.kernel.org/pci/pci/c/b4fb90fb9301
[3/6] PCI: Remove pcim_request_region_exclusive()
      https://git.kernel.org/pci/pci/c/8e9987485d9a
[4/6] PCI: Remove exclusive requests flags from _pcim_request_region()
      https://git.kernel.org/pci/pci/c/85826c11e77b
[5/6] PCI: Remove redundant set of request functions
      https://git.kernel.org/pci/pci/c/bcfc67157e41
[6/6] PCI: Remove hybrid-devres usage warnings from kernel-doc 
      https://git.kernel.org/pci/pci/c/90ffe1f093e8

	Krzysztof