linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATH] pci_has_legacy_pm_support add driver and device to WARN
@ 2011-11-20 21:29 David Fries
  2011-11-20 22:31 ` Rafael J. Wysocki
  2011-12-05 19:05 ` Jesse Barnes
  0 siblings, 2 replies; 3+ messages in thread
From: David Fries @ 2011-11-20 21:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: Rafael J. Wysocki, Jesse Barnes, linux-pci

From: David Fries <David@Fries.net>

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 <David@Fries.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-pci@vger.kernel.org
---
 drivers/pci/pci-driver.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 12d1e81..3623d65 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -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;
 }
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATH] pci_has_legacy_pm_support add driver and device to WARN
  2011-11-20 21:29 [PATH] pci_has_legacy_pm_support add driver and device to WARN David Fries
@ 2011-11-20 22:31 ` Rafael J. Wysocki
  2011-12-05 19:05 ` Jesse Barnes
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2011-11-20 22:31 UTC (permalink / raw)
  To: David Fries; +Cc: linux-kernel, Jesse Barnes, linux-pci

On Sunday, November 20, 2011, David Fries wrote:
> From: David Fries <David@Fries.net>
> 
> 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 <David@Fries.net>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: linux-pci@vger.kernel.org
> ---
>  drivers/pci/pci-driver.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 12d1e81..3623d65 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -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;
>  }
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATH] pci_has_legacy_pm_support add driver and device to WARN
  2011-11-20 21:29 [PATH] pci_has_legacy_pm_support add driver and device to WARN David Fries
  2011-11-20 22:31 ` Rafael J. Wysocki
@ 2011-12-05 19:05 ` Jesse Barnes
  1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2011-12-05 19:05 UTC (permalink / raw)
  To: David Fries; +Cc: linux-kernel, Rafael J. Wysocki, linux-pci

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

On Sun, 20 Nov 2011 15:29:46 -0600
David Fries <david@fries.net> wrote:

> From: David Fries <David@Fries.net>
> 
> 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 <David@Fries.net>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: linux-pci@vger.kernel.org
> ---
>  drivers/pci/pci-driver.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 12d1e81..3623d65 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -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.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-05 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-20 21:29 [PATH] pci_has_legacy_pm_support add driver and device to WARN David Fries
2011-11-20 22:31 ` Rafael J. Wysocki
2011-12-05 19:05 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).