* [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming
@ 2007-02-23 21:43 Dmitriy Monakhov
2007-02-26 6:01 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Monakhov @ 2007-02-23 21:43 UTC (permalink / raw)
To: linux-kernel; +Cc: jgarzik
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;
+ }
if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
printk("XXX\n");
--
1.4.4.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming
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 ` [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming (v2) Dmitriy Monakhov
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2007-02-26 6:01 UTC (permalink / raw)
To: Dmitriy Monakhov; +Cc: linux-kernel, jgarzik
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?
> + }
>
> if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
> printk("XXX\n");
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming (v2)
2007-02-26 6:01 ` Randy Dunlap
@ 2007-02-26 6:35 ` Dmitriy Monakhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitriy Monakhov @ 2007-02-26 6:35 UTC (permalink / raw)
To: Randy Dunlap; +Cc: Dmitriy Monakhov, linux-kernel, jgarzik
[-- 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");
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-26 6:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] libata: handle ata_pci_device_do_resume() failure while resuming (v2) Dmitriy Monakhov
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.