All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitriy Monakhov <dmonakhov@sw.ru>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>,
	linux-kernel@vger.kernel.org, jgarzik@pobox.com
Subject: [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming (v2)
Date: Mon, 26 Feb 2007 09:35:50 +0300	[thread overview]
Message-ID: <87vehp4e9l.fsf_-_@sw.ru> (raw)
In-Reply-To: <20070225220114.c449ef95.randy.dunlap@oracle.com> (Randy Dunlap's message of "Sun, 25 Feb 2007 22:01:14 -0800")

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

Randy Dunlap <randy.dunlap@oracle.com> writes:

> On Sat, 24 Feb 2007 00:43:18 +0300 Dmitriy Monakhov wrote:
>
>> Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
>> ata_pci_device_do_resume() can return error code, all callers was updated
>> except this one.
>> 
>> Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
>> ---
>>  drivers/ata/sata_inic162x.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>> 
>> diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
>> index 31b636f..7933043 100644
>> --- a/drivers/ata/sata_inic162x.c
>> +++ b/drivers/ata/sata_inic162x.c
>> @@ -639,7 +639,10 @@ static int inic_pci_device_resume(struct pci_dev *pdev)
>>  	void __iomem *mmio_base = host->iomap[MMIO_BAR];
>>  	int rc;
>>  
>> -	ata_pci_device_do_resume(pdev);
>> +	rc = ata_pci_device_do_resume(pdev);
>> +	if (rc) {
>> +		return rc;
>
> Either (a) don't use the braces when they are not needed, or
> (b) is it possible to add a meaningful message there, or is that
> done elsewhere?
True. Thanks for correcting me here.
It is't realy necessary print err message because ata_pci_device_do_resume()
already done this. So just remove braces.


 Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
 ata_pci_device_do_resume() can return error code, all callers was updated
 except this one.

Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>


[-- Attachment #2: diff-ms-libata-handle-ata_pci_device_do_resume-failure-while-resuming --]
[-- Type: text/plain, Size: 490 bytes --]

diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 31b636f..18ac665 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -639,7 +639,9 @@ static int inic_pci_device_resume(struct pci_dev *pdev)
 	void __iomem *mmio_base = host->iomap[MMIO_BAR];
 	int rc;
 
-	ata_pci_device_do_resume(pdev);
+	rc = ata_pci_device_do_resume(pdev);
+	if (rc)
+		return rc;
 
 	if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
 		printk("XXX\n");

      reply	other threads:[~2007-02-26  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 21:43 [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming Dmitriy Monakhov
2007-02-26  6:01 ` Randy Dunlap
2007-02-26  6:35   ` Dmitriy Monakhov [this message]

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=87vehp4e9l.fsf_-_@sw.ru \
    --to=dmonakhov@sw.ru \
    --cc=dmonakhov@openvz.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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.