pci_has_legacy_pm_support add driver and device to WARN
From: David Fries <[email protected]>
Include the driver name and device in warning when a pci driver supports both legacy pm and new framework as just the stack trace gives no way to identify the driver.
Signed-off-by David Fries <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Jesse Barnes <[email protected]>
--- drivers/pci/pci-driver.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/pci/pci-driver.c +2 -1
@@ -604,7 +604,8 @@ static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)* supported as well. Drivers are supposed to support either the * former, or the latter, but not both at the same time. */ -WARN_ON (ret && drv->driver.pm); +WARN (ret && drv->driver.pm,"driver %s device %04x:%04x\n" , + drv->name, pci_dev->vendor, pci_dev->device);return ret; }
Signature · 1 line
1.7.7.1
Rafael J. Wysocki
Acked-byQuoted 7 lines · David Fries
From: David Fries <[email protected]>
Include the driver name and device in warning when a pci driver supports both legacy pm and new framework as just the stack trace gives no way to identify the driver.
Signed-off-by David Fries <[email protected]>
Quoted 21 lines
Cc Jesse Barnes <[email protected]>--- drivers/pci/pci-driver.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/pci/pci-driver.c +2
-1@@ -604,7 +604,8 @@ static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)* supported as well. Drivers are supposed to support either the * former, or the latter, but not both at the same time. */ -WARN_ON (ret && drv->driver.pm); +WARN (ret && drv->driver.pm,"driver %s device %04x:%04x\n" , + drv->name, pci_dev->vendor, pci_dev->device);return ret; }
Jesse Barnes
AppliedQuoted 19 lines · On Sun, 20 Nov 2011 15:29:46 -0600 David Fries <[email protected]> wrote:
From: David Fries <[email protected]>
Include the driver name and device in warning when a pci driver supports both legacy pm and new framework as just the stack trace gives no way to identify the driver.
Signed-off-by David Fries <[email protected]>Cc Rafael J. Wysocki <[email protected]>Cc Jesse Barnes <[email protected]>--- drivers/pci/pci-driver.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/pci/pci-driver.c +0
-0
drivers/pci/pci-driver.c static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev) · line 611
Quoted 9 lines
drivers/pci/pci-driver.c +2
-1@@ -604,7 +604,8 @@ static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)* supported as well. Drivers are supposed to support either the * former, or the latter, but not both at the same time. */ -WARN_ON (ret && drv->driver.pm); +WARN (ret && drv->driver.pm,"driver %s device %04x:%04x\n" , + drv->name, pci_dev->vendor, pci_dev->device);return ret; }
Applied to linux-next, thanks.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center