netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ptp_pch: Replace deprecated PCI functions
@ 2024-10-28  9:59 Philipp Stanner
  2024-11-01  1:56 ` Jakub Kicinski
  2024-11-01  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Stanner @ 2024-10-28  9:59 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev, linux-kernel, Philipp Stanner

pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
pcim_iomap_regions_request_all()").

Replace these functions with pcim_iomap_region().

Additionally, pass KBUILD_MODNAME to that function, since the 'name'
parameter should indicate who (i.e., which driver) has requested the
resource.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
 drivers/ptp/ptp_pch.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c
index 33355d5eb033..b8a9a54a176c 100644
--- a/drivers/ptp/ptp_pch.c
+++ b/drivers/ptp/ptp_pch.c
@@ -462,14 +462,14 @@ pch_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		return ret;
 	}
 
-	ret = pcim_iomap_regions(pdev, BIT(IO_MEM_BAR), "1588_regs");
+	/* get the virtual address to the 1588 registers */
+	chip->regs = pcim_iomap_region(pdev, IO_MEM_BAR, KBUILD_MODNAME);
+	ret = PTR_ERR_OR_ZERO(chip->regs);
 	if (ret) {
 		dev_err(&pdev->dev, "could not locate IO memory address\n");
 		return ret;
 	}
 
-	/* get the virtual address to the 1588 registers */
-	chip->regs = pcim_iomap_table(pdev)[IO_MEM_BAR];
 	chip->caps = ptp_pch_caps;
 	chip->ptp_clock = ptp_clock_register(&chip->caps, &pdev->dev);
 	if (IS_ERR(chip->ptp_clock))
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ptp_pch: Replace deprecated PCI functions
  2024-10-28  9:59 [PATCH] ptp_pch: Replace deprecated PCI functions Philipp Stanner
@ 2024-11-01  1:56 ` Jakub Kicinski
  2024-11-01  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-11-01  1:56 UTC (permalink / raw)
  To: Philipp Stanner; +Cc: Richard Cochran, netdev, linux-kernel

On Mon, 28 Oct 2024 10:59:44 +0100 Philipp Stanner wrote:
> Additionally, pass KBUILD_MODNAME to that function, since the 'name'
> parameter should indicate who (i.e., which driver) has requested the
> resource.

Not sure if anyone cares but in theory this could break something.
Let's find out..

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ptp_pch: Replace deprecated PCI functions
  2024-10-28  9:59 [PATCH] ptp_pch: Replace deprecated PCI functions Philipp Stanner
  2024-11-01  1:56 ` Jakub Kicinski
@ 2024-11-01  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-01  2:00 UTC (permalink / raw)
  To: Philipp Stanner; +Cc: richardcochran, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 28 Oct 2024 10:59:44 +0100 you wrote:
> pcim_iomap_regions() and pcim_iomap_table() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()").
> 
> Replace these functions with pcim_iomap_region().
> 
> Additionally, pass KBUILD_MODNAME to that function, since the 'name'
> parameter should indicate who (i.e., which driver) has requested the
> resource.
> 
> [...]

Here is the summary with links:
  - ptp_pch: Replace deprecated PCI functions
    https://git.kernel.org/netdev/net-next/c/9c5649c17737

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-01  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28  9:59 [PATCH] ptp_pch: Replace deprecated PCI functions Philipp Stanner
2024-11-01  1:56 ` Jakub Kicinski
2024-11-01  2:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).