Skip to content

Commit

Permalink
qed: Drop useless pci_params.pm_cap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas authored and Jakub Kicinski committed Mar 29, 2024
1 parent 3bcbc67 commit 49d665b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/qlogic/qed/qed.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,6 @@ struct qed_hwfn {
};

struct pci_params {
int pm_cap;

unsigned long mem_start;
unsigned long mem_end;
unsigned int irq;
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/qlogic/qed/qed_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 49d665b

Please sign in to comment.