diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2019-10-07 15:52:28 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-11-21 02:34:17 +0300 |
commit | 12bcae44bf48595c71898330076576075590e15b (patch) | |
tree | a8dca129d3c92b717f9e27aeee94fe35ad951244 /include/linux/pci.h | |
parent | 6941a0c2bdedfb729fb166091e12d06e4fce177f (diff) | |
download | linux-12bcae44bf48595c71898330076576075590e15b.tar.xz |
PCI/PM: Use pci_WARN() to include device information
Add and use pci_WARN() wrappers so warnings include device information.
Link: https://lore.kernel.org/r/20191017212851.54237-3-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index f9088c89a534..4846306d521c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2400,4 +2400,12 @@ void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); #define pci_info_ratelimited(pdev, fmt, arg...) \ dev_info_ratelimited(&(pdev)->dev, fmt, ##arg) +#define pci_WARN(pdev, condition, fmt, arg...) \ + WARN(condition, "%s %s: " fmt, \ + dev_driver_string(&(pdev)->dev), pci_name(pdev), ##arg) + +#define pci_WARN_ONCE(pdev, condition, fmt, arg...) \ + WARN_ONCE(condition, "%s %s: " fmt, \ + dev_driver_string(&(pdev)->dev), pci_name(pdev), ##arg) + #endif /* LINUX_PCI_H */ |