aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorKrzysztof Wilczynski <kw@linux.com>2019-08-26 00:46:16 +0200
committerBjorn Helgaas <bhelgaas@google.com>2019-09-05 13:26:46 -0500
commit7f1c62c443a453deb6eb3515e3c05650ffe0dcf0 (patch)
treebcdf099bdb3fc851d73c6a5dc3d3fb3188e568bf /include/linux/pci.h
parentPCI/IOV: Remove group write permission from sriov_numvfs, sriov_drivers_autoprobe (diff)
downloadlinux-dev-7f1c62c443a453deb6eb3515e3c05650ffe0dcf0.tar.xz
linux-dev-7f1c62c443a453deb6eb3515e3c05650ffe0dcf0.zip
PCI: Add pci_info_ratelimited() to ratelimit PCI separately
Do not use printk_ratelimit() in drivers/pci/pci.c as it shares the rate limiting state with all other callers to the printk_ratelimit(). Add pci_info_ratelimited() (similar to pci_notice_ratelimited() added in the commit a88a7b3eb076 ("vfio: Use dev_printk() when possible")) and use it instead of printk_ratelimit() + pci_info(). Link: https://lore.kernel.org/r/20190825224616.8021-1-kw@linux.com Signed-off-by: Krzysztof Wilczynski <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9e700d9f9f28..f5bab312995d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -2433,4 +2433,7 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type);
#define pci_notice_ratelimited(pdev, fmt, arg...) \
dev_notice_ratelimited(&(pdev)->dev, fmt, ##arg)
+#define pci_info_ratelimited(pdev, fmt, arg...) \
+ dev_info_ratelimited(&(pdev)->dev, fmt, ##arg)
+
#endif /* LINUX_PCI_H */