Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qed: Drop useless pci_params.pm_cap

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.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240325224931.1462051-1-helgaas@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Bjorn Helgaas and committed by
Jakub Kicinski
49d665b8 3bcbc67b

+1 -4
-2
drivers/net/ethernet/qlogic/qed/qed.h
··· 662 662 }; 663 663 664 664 struct pci_params { 665 - int pm_cap; 666 - 667 665 unsigned long mem_start; 668 666 unsigned long mem_end; 669 667 unsigned int irq;
+1 -2
drivers/net/ethernet/qlogic/qed/qed_main.c
··· 323 323 goto err2; 324 324 } 325 325 326 - cdev->pci_params.pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); 327 - if (IS_PF(cdev) && !cdev->pci_params.pm_cap) 326 + if (IS_PF(cdev) && !pdev->pm_cap) 328 327 DP_NOTICE(cdev, "Cannot find power management capability\n"); 329 328 330 329 rc = dma_set_mask_and_coherent(&cdev->pdev->dev, DMA_BIT_MASK(64));