Skip to contentSkip to conversation

qed: Drop useless pci_params.pm_cap

PATCH Applied Bjorn Helgaas 3 participants 3 messages Mar 25, 2024 – Mar 29, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qed: Drop useless pci_params.pm_cap

From: Bjorn Helgaas <[email protected]>

qed_init_pci() used pci_params.pm_cap only to cache the pci_dev.pm_cap. Drop the cache and use pci_dev.pm_cap directly.

---
 drivers/net/ethernet/qlogic/qed/qed.h      | 2 --
 drivers/net/ethernet/qlogic/qed/qed_main.c | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/qlogic/qed/qed.h +0 -2
index 1d719726f72b..b7def3b54937 100644
@@ -662,8 +662,6 @@ struct qed_hwfn {
 };
 
 struct pci_params {
-	int		pm_cap;
-
 	unsigned long	mem_start;
 	unsigned long	mem_end;
 	unsigned int	irq;
drivers/net/ethernet/qlogic/qed/qed_main.c +1 -2
index c278f8893042..408da4312e01 100644
@@ -323,8 +323,7 @@ static int qed_init_pci(struct qed_dev *cdev, struct pci_dev *pdev)
 		goto err2;
 	}
 
-	cdev->pci_params.pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
-	if (IS_PF(cdev) && !cdev->pci_params.pm_cap)
+	if (IS_PF(cdev) && !pdev->pm_cap)
 		DP_NOTICE(cdev, "Cannot find power management capability\n");
 
 	rc = dma_set_mask_and_coherent(&cdev->pdev->dev, DMA_BIT_MASK(64));
Signature · 1 line
2.34.1
#2 lore raw
In reply to Bjorn Helgaas
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Mon, 25 Mar 2024 17:49:31 -0500 you wrote:

From: Bjorn Helgaas <[email protected]>

qed_init_pci() used pci_params.pm_cap only to cache the pci_dev.pm_cap. Drop the cache and use pci_dev.pm_cap directly.

[...]

Here is the summary with links:
- qed: Drop useless pci_params.pm_cap

    https://git.kernel.org/netdev/net-next/c/49d665b8535e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html