Skip to content

Commit 597db6f

Browse files
committed
Merge branch 'pci/dead-code' into next
* pci/dead-code: PCI: Make local functions static PCI: Remove unused alloc_pci_dev() PCI: Remove unused pci_renumber_slot() PCI: Remove unused pcie_aspm_enabled() PCI: Remove unused pci_vpd_truncate() PCI: Remove unused ID-Based Ordering support PCI: Remove unused Optimized Buffer Flush/Fill support PCI: Remove unused Latency Tolerance Reporting support PCI: Removed unused parts of Page Request Interface support Conflicts: drivers/pci/pci.c include/linux/pci.h
2 parents 6b9bd1e + 0b950f0 commit 597db6f

File tree

11 files changed

+82
-530
lines changed

11 files changed

+82
-530
lines changed

drivers/pci/access.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -380,30 +380,6 @@ int pci_vpd_pci22_init(struct pci_dev *dev)
380380
return 0;
381381
}
382382

383-
/**
384-
* pci_vpd_truncate - Set available Vital Product Data size
385-
* @dev: pci device struct
386-
* @size: available memory in bytes
387-
*
388-
* Adjust size of available VPD area.
389-
*/
390-
int pci_vpd_truncate(struct pci_dev *dev, size_t size)
391-
{
392-
if (!dev->vpd)
393-
return -EINVAL;
394-
395-
/* limited by the access method */
396-
if (size > dev->vpd->len)
397-
return -EINVAL;
398-
399-
dev->vpd->len = size;
400-
if (dev->vpd->attr)
401-
dev->vpd->attr->size = size;
402-
403-
return 0;
404-
}
405-
EXPORT_SYMBOL(pci_vpd_truncate);
406-
407383
/**
408384
* pci_cfg_access_lock - Lock PCI config reads/writes
409385
* @dev: pci device struct

drivers/pci/ats.c

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -234,27 +234,6 @@ void pci_disable_pri(struct pci_dev *pdev)
234234
}
235235
EXPORT_SYMBOL_GPL(pci_disable_pri);
236236

237-
/**
238-
* pci_pri_enabled - Checks if PRI capability is enabled
239-
* @pdev: PCI device structure
240-
*
241-
* Returns true if PRI is enabled on the device, false otherwise
242-
*/
243-
bool pci_pri_enabled(struct pci_dev *pdev)
244-
{
245-
u16 control;
246-
int pos;
247-
248-
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
249-
if (!pos)
250-
return false;
251-
252-
pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
253-
254-
return (control & PCI_PRI_CTRL_ENABLE) ? true : false;
255-
}
256-
EXPORT_SYMBOL_GPL(pci_pri_enabled);
257-
258237
/**
259238
* pci_reset_pri - Resets device's PRI state
260239
* @pdev: PCI device structure
@@ -282,67 +261,6 @@ int pci_reset_pri(struct pci_dev *pdev)
282261
return 0;
283262
}
284263
EXPORT_SYMBOL_GPL(pci_reset_pri);
285-
286-
/**
287-
* pci_pri_stopped - Checks whether the PRI capability is stopped
288-
* @pdev: PCI device structure
289-
*
290-
* Returns true if the PRI capability on the device is disabled and the
291-
* device has no outstanding PRI requests, false otherwise. The device
292-
* indicates this via the STOPPED bit in the status register of the
293-
* capability.
294-
* The device internal state can be cleared by resetting the PRI state
295-
* with pci_reset_pri(). This can force the capability into the STOPPED
296-
* state.
297-
*/
298-
bool pci_pri_stopped(struct pci_dev *pdev)
299-
{
300-
u16 control, status;
301-
int pos;
302-
303-
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
304-
if (!pos)
305-
return true;
306-
307-
pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
308-
pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status);
309-
310-
if (control & PCI_PRI_CTRL_ENABLE)
311-
return false;
312-
313-
return (status & PCI_PRI_STATUS_STOPPED) ? true : false;
314-
}
315-
EXPORT_SYMBOL_GPL(pci_pri_stopped);
316-
317-
/**
318-
* pci_pri_status - Request PRI status of a device
319-
* @pdev: PCI device structure
320-
*
321-
* Returns negative value on failure, status on success. The status can
322-
* be checked against status-bits. Supported bits are currently:
323-
* PCI_PRI_STATUS_RF: Response failure
324-
* PCI_PRI_STATUS_UPRGI: Unexpected Page Request Group Index
325-
* PCI_PRI_STATUS_STOPPED: PRI has stopped
326-
*/
327-
int pci_pri_status(struct pci_dev *pdev)
328-
{
329-
u16 status, control;
330-
int pos;
331-
332-
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
333-
if (!pos)
334-
return -EINVAL;
335-
336-
pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
337-
pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status);
338-
339-
/* Stopped bit is undefined when enable == 1, so clear it */
340-
if (control & PCI_PRI_CTRL_ENABLE)
341-
status &= ~PCI_PRI_STATUS_STOPPED;
342-
343-
return status;
344-
}
345-
EXPORT_SYMBOL_GPL(pci_pri_status);
346264
#endif /* CONFIG_PCI_PRI */
347265

348266
#ifdef CONFIG_PCI_PASID

drivers/pci/hotplug/pciehp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
extern bool pciehp_poll_mode;
4444
extern int pciehp_poll_time;
4545
extern bool pciehp_debug;
46-
extern bool pciehp_force;
4746

4847
#define dbg(format, arg...) \
4948
do { \

drivers/pci/hotplug/pciehp_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
bool pciehp_debug;
4242
bool pciehp_poll_mode;
4343
int pciehp_poll_time;
44-
bool pciehp_force;
44+
static bool pciehp_force;
4545

4646
#define DRIVER_VERSION "0.4"
4747
#define DRIVER_AUTHOR "Dan Zink <[email protected]>, Greg Kroah-Hartman <[email protected]>, Dely Sy <[email protected]>"

0 commit comments

Comments
 (0)