From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: PCI: pci_restore_state() is returning 0 when it fails
Date: Fri, 13 Nov 2009 21:08:56 +0100 [thread overview]
Message-ID: <200911132108.56691.rjw@sisk.pl> (raw)
In-Reply-To: <4AFD91DD.7000104@linux.vnet.ibm.com>
On Friday 13 November 2009, Breno Leitao wrote:
> Actually pci_restore_state() is returning 0 if the restore process
> fails, instead of a error value.
>
> If it fails, I believe that it should return -EPERM, once that
> it is an invalid operation and probably pci_save_state() wasn't
> called.
I believe this patch will break a number of things.
Does it actually fix any problem you have observed?
Rafael
> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
> ---
> drivers/pci/pci.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 4e4c295..b677ca3 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -857,7 +857,7 @@ pci_restore_state(struct pci_dev *dev)
> u32 val;
>
> if (!dev->state_saved)
> - return 0;
> + return -EPERM;
>
> /* PCI Express register must be restored first */
> pci_restore_pcie_state(dev);
>
next prev parent reply other threads:[~2009-11-13 20:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 17:05 PCI: pci_restore_state() is returning 0 when it fails Breno Leitao
2009-11-13 20:08 ` Rafael J. Wysocki [this message]
2009-11-16 14:13 ` Breno Leitao
2009-11-16 14:49 ` Ben Hutchings
2009-11-23 12:38 ` Breno Leitao
2009-11-23 19:29 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200911132108.56691.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=jbarnes@virtuousgeek.org \
--cc=leitao@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.