From: Bjorn Helgaas Date: Wed, 31 Jan 2018 16:13:07 +0000 (-0600) Subject: Merge branch 'pci/trivial' into next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=01f095e46ba3a91b06709170c19bc3936e872541;p=linux.git Merge branch 'pci/trivial' into next * pci/trivial: PCI: Clean up whitespace in linux/pci.h, pci/pci.h PCI: Tidy up pci/probe.c comments --- 01f095e46ba3a91b06709170c19bc3936e872541 diff --cc drivers/pci/probe.c index 815c821fe950b,4c62d966d545b..2c673a65d5b0e --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@@ -1058,9 -1061,10 +1061,10 @@@ static int pci_scan_bridge_extend(struc cmax = pci_scan_child_bus(child); if (cmax > subordinate) - dev_warn(&dev->dev, "bridge has subordinate %02x but max busn %02x\n", + pci_warn(dev, "bridge has subordinate %02x but max busn %02x\n", subordinate, cmax); - /* subordinate should equal child->busn_res.end */ + + /* Subordinate should equal child->busn_res.end */ if (subordinate > max) max = subordinate; } else { @@@ -1468,13 -1480,13 +1480,13 @@@ int pci_setup_device(struct pci_dev *de dev->revision = class & 0xff; dev->class = class >> 8; /* upper 3 bytes */ - dev_printk(KERN_DEBUG, &dev->dev, "[%04x:%04x] type %02x class %#08x\n", + pci_printk(KERN_DEBUG, dev, "[%04x:%04x] type %02x class %#08x\n", dev->vendor, dev->device, dev->hdr_type, dev->class); - /* need to have dev->class ready */ + /* Need to have dev->class ready */ dev->cfg_size = pci_cfg_space_size(dev); - /* need to have dev->cfg_size ready */ + /* Need to have dev->cfg_size ready */ set_pcie_thunderbolt(dev); /* "Unknown power state" */ diff --cc include/linux/pci.h index 656989b006669,ff5f5124aaccf..a1e10ba7b6120 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@@ -350,14 -345,12 +345,14 @@@ struct pci_dev #ifdef CONFIG_PCIEASPM struct pcie_link_state *link_state; /* ASPM link state */ + unsigned int ltr_path:1; /* Latency Tolerance Reporting + supported from root to here */ #endif - pci_channel_state_t error_state; /* current connectivity state */ - struct device dev; /* Generic device interface */ + pci_channel_state_t error_state; /* Current connectivity state */ + struct device dev; /* Generic device interface */ - int cfg_size; /* Size of configuration space */ + int cfg_size; /* Size of config space */ /* * Instead of touching interrupt line and base address registers @@@ -2288,19 -2257,7 +2267,19 @@@ static inline bool pci_is_thunderbolt_a return false; } - /* provide the legacy pci_dma_* API */ + /* Provide the legacy pci_dma_* API */ #include +#define pci_printk(level, pdev, fmt, arg...) \ + dev_printk(level, &(pdev)->dev, fmt, ##arg) + +#define pci_emerg(pdev, fmt, arg...) dev_emerg(&(pdev)->dev, fmt, ##arg) +#define pci_alert(pdev, fmt, arg...) dev_alert(&(pdev)->dev, fmt, ##arg) +#define pci_crit(pdev, fmt, arg...) dev_crit(&(pdev)->dev, fmt, ##arg) +#define pci_err(pdev, fmt, arg...) dev_err(&(pdev)->dev, fmt, ##arg) +#define pci_warn(pdev, fmt, arg...) dev_warn(&(pdev)->dev, fmt, ##arg) +#define pci_notice(pdev, fmt, arg...) dev_notice(&(pdev)->dev, fmt, ##arg) +#define pci_info(pdev, fmt, arg...) dev_info(&(pdev)->dev, fmt, ##arg) +#define pci_dbg(pdev, fmt, arg...) dev_dbg(&(pdev)->dev, fmt, ##arg) + #endif /* LINUX_PCI_H */