mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
PCI/PTM: Drop pci_enable_ptm() granularity parameter
No pci_enable_ptm() callers supply the "granularity" pointer where the clock granularity would be returned. Drop the unused pci_enable_ptm() parameter. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260224111044.3487873-5-mika.westerberg@linux.intel.com
This commit is contained in:
parent
6de23f81a5
commit
aa8671af0c
|
|
@ -5028,7 +5028,7 @@ static int ice_init(struct ice_pf *pf)
|
|||
}
|
||||
|
||||
if (pf->hw.mac_type == ICE_MAC_E830) {
|
||||
err = pci_enable_ptm(pf->pdev, NULL);
|
||||
err = pci_enable_ptm(pf->pdev);
|
||||
if (err)
|
||||
dev_dbg(dev, "PCIe PTM not supported by PCIe bus/controller\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ static int idpf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
goto err_free;
|
||||
}
|
||||
|
||||
err = pci_enable_ptm(pdev, NULL);
|
||||
err = pci_enable_ptm(pdev);
|
||||
if (err)
|
||||
pci_dbg(pdev, "PCIe PTM is not supported by PCIe bus/controller\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -7123,7 +7123,7 @@ static int igc_probe(struct pci_dev *pdev,
|
|||
if (err)
|
||||
goto err_pci_reg;
|
||||
|
||||
err = pci_enable_ptm(pdev, NULL);
|
||||
err = pci_enable_ptm(pdev);
|
||||
if (err < 0)
|
||||
dev_info(&pdev->dev, "PCIe PTM not supported by PCIe bus/controller\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -960,7 +960,7 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev,
|
|||
|
||||
mlx5_pci_vsc_init(dev);
|
||||
|
||||
pci_enable_ptm(pdev, NULL);
|
||||
pci_enable_ptm(pdev);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ void pci_ptm_init(struct pci_dev *dev)
|
|||
|
||||
if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT ||
|
||||
pci_pcie_type(dev) == PCI_EXP_TYPE_UPSTREAM)
|
||||
pci_enable_ptm(dev, NULL);
|
||||
pci_enable_ptm(dev);
|
||||
}
|
||||
|
||||
void pci_save_ptm_state(struct pci_dev *dev)
|
||||
|
|
@ -182,15 +182,13 @@ static int __pci_enable_ptm(struct pci_dev *dev)
|
|||
/**
|
||||
* pci_enable_ptm() - Enable Precision Time Measurement
|
||||
* @dev: PCI device
|
||||
* @granularity: pointer to return granularity
|
||||
*
|
||||
* Enable Precision Time Measurement for @dev. If successful and
|
||||
* @granularity is non-NULL, return the Effective Granularity.
|
||||
* Enable Precision Time Measurement for @dev.
|
||||
*
|
||||
* Return: zero if successful, or -EINVAL if @dev lacks a PTM Capability or
|
||||
* is not a PTM Root and lacks an upstream path of PTM-enabled devices.
|
||||
*/
|
||||
int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
|
||||
int pci_enable_ptm(struct pci_dev *dev)
|
||||
{
|
||||
int rc;
|
||||
char clock_desc[8];
|
||||
|
|
@ -201,9 +199,6 @@ int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
|
|||
|
||||
dev->ptm_enabled = 1;
|
||||
|
||||
if (granularity)
|
||||
*granularity = dev->ptm_granularity;
|
||||
|
||||
switch (dev->ptm_granularity) {
|
||||
case 0:
|
||||
snprintf(clock_desc, sizeof(clock_desc), "unknown");
|
||||
|
|
|
|||
|
|
@ -1975,11 +1975,11 @@ struct pci_ptm_debugfs {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_PCIE_PTM
|
||||
int pci_enable_ptm(struct pci_dev *dev, u8 *granularity);
|
||||
int pci_enable_ptm(struct pci_dev *dev);
|
||||
void pci_disable_ptm(struct pci_dev *dev);
|
||||
bool pcie_ptm_enabled(struct pci_dev *dev);
|
||||
#else
|
||||
static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity)
|
||||
static inline int pci_enable_ptm(struct pci_dev *dev)
|
||||
{ return -EINVAL; }
|
||||
static inline void pci_disable_ptm(struct pci_dev *dev) { }
|
||||
static inline bool pcie_ptm_enabled(struct pci_dev *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user