LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] fix error management in 8250_pci.c pciserial_resume_one
@ 2007-02-13 10:30 Stefano Brivio
  2007-02-13 10:54 ` Russell King
  2007-02-13 11:18 ` Alan
  0 siblings, 2 replies; 3+ messages in thread
From: Stefano Brivio @ 2007-02-13 10:30 UTC (permalink / raw)
  To: linux-kernel, linux-serial

  CC      drivers/serial/8250_pci.o
drivers/serial/8250_pci.c: In function 'pciserial_resume_one':
drivers/serial/8250_pci.c:1830: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result

This patch fixes it.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
---

--- drivers/serial/8250_pci.c.orig	2007-02-13 11:04:03.579805618 +0100
+++ drivers/serial/8250_pci.c	2007-02-13 11:12:52.128454010 +0100
@@ -1819,6 +1819,7 @@
 static int pciserial_resume_one(struct pci_dev *dev)
 {
 	struct serial_private *priv = pci_get_drvdata(dev);
+	int rc;
 
 	pci_set_power_state(dev, PCI_D0);
 	pci_restore_state(dev);
@@ -1827,7 +1828,9 @@
 		/*
 		 * The device may have been disabled.  Re-enable it.
 		 */
-		pci_enable_device(dev);
+		rc = pci_enable_device(dev);
+		if (rc)
+			return rc;
 
 		pciserial_resume_ports(priv);
 	}

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

* Re: [PATCH] fix error management in 8250_pci.c pciserial_resume_one
  2007-02-13 10:30 [PATCH] fix error management in 8250_pci.c pciserial_resume_one Stefano Brivio
@ 2007-02-13 10:54 ` Russell King
  2007-02-13 11:18 ` Alan
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King @ 2007-02-13 10:54 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: linux-kernel, linux-serial

On Tue, Feb 13, 2007 at 11:30:10AM +0100, Stefano Brivio wrote:
>   CC      drivers/serial/8250_pci.o
> drivers/serial/8250_pci.c: In function 'pciserial_resume_one':
> drivers/serial/8250_pci.c:1830: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result
> 
> This patch fixes it.

Oh for god sake, this does not fix anything.  It creates more problems
than it solves.

Next time, check the mailing list archives and you'll see this is not
the first time this has come up.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: [PATCH] fix error management in 8250_pci.c pciserial_resume_one
  2007-02-13 10:30 [PATCH] fix error management in 8250_pci.c pciserial_resume_one Stefano Brivio
  2007-02-13 10:54 ` Russell King
@ 2007-02-13 11:18 ` Alan
  1 sibling, 0 replies; 3+ messages in thread
From: Alan @ 2007-02-13 11:18 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: linux-kernel, linux-serial

On Tue, 13 Feb 2007 11:30:10 +0100
Stefano Brivio <stefano.brivio@polimi.it> wrote:

>   CC      drivers/serial/8250_pci.o
> drivers/serial/8250_pci.c: In function 'pciserial_resume_one':
> drivers/serial/8250_pci.c:1830: warning: ignoring return value of 'pci_enable_device', declared with attribute warn_unused_result
> 
> This patch fixes it.

NAK. as ith the past several times people proposed this. The bug is in
the pci_enable_device header being must_check

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

end of thread, other threads:[~2007-02-13 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 10:30 [PATCH] fix error management in 8250_pci.c pciserial_resume_one Stefano Brivio
2007-02-13 10:54 ` Russell King
2007-02-13 11:18 ` Alan

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).