Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check
       [not found] <1384939706-6292-1-git-send-email-wangyijing@huawei.com>
@ 2013-11-20  9:28 ` Yijing Wang
  2013-11-21  8:30   ` Aaron Lu
  2013-11-22 22:39   ` Tejun Heo
  0 siblings, 2 replies; 5+ messages in thread
From: Yijing Wang @ 2013-11-20  9:28 UTC (permalink / raw)
  To: Bjorn Helgaas, Rafael J. Wysocki, Jean Delvare, Guenter Roeck
  Cc: Yijing Wang, Hanjun Guo, Tejun Heo, linux-ide

Since acpi_bus_get_device() returns plain int and not acpi_status,
ACPI_FAILURE() should not be used for checking its return value.  Fix
that.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org
---
 drivers/ata/libata-zpodd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
index 68f9e32..3d9f82d 100644
--- a/drivers/ata/libata-zpodd.c
+++ b/drivers/ata/libata-zpodd.c
@@ -95,8 +95,7 @@ static bool odd_can_poweroff(struct ata_device *ata_dev)
 	if (!handle)
 		return false;
 
-	status = acpi_bus_get_device(handle, &acpi_dev);
-	if (ACPI_FAILURE(status))
+	if (acpi_bus_get_device(handle, &acpi_dev))
 		return false;
 
 	return acpi_device_can_poweroff(acpi_dev);
-- 
1.7.1



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

* Re: [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check
  2013-11-20  9:28 ` [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check Yijing Wang
@ 2013-11-21  8:30   ` Aaron Lu
  2013-11-22 22:39   ` Tejun Heo
  1 sibling, 0 replies; 5+ messages in thread
From: Aaron Lu @ 2013-11-21  8:30 UTC (permalink / raw)
  To: Yijing Wang
  Cc: Bjorn Helgaas, Rafael J. Wysocki, Jean Delvare, Guenter Roeck,
	Hanjun Guo, Tejun Heo, linux-ide

On 11/20/2013 05:28 PM, Yijing Wang wrote:
> Since acpi_bus_get_device() returns plain int and not acpi_status,
> ACPI_FAILURE() should not be used for checking its return value.  Fix
> that.
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: linux-ide@vger.kernel.org

Acked-by: Aaron Lu <aaron.lu@intel.com>

Thanks,
Aaron

> ---
>  drivers/ata/libata-zpodd.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
> index 68f9e32..3d9f82d 100644
> --- a/drivers/ata/libata-zpodd.c
> +++ b/drivers/ata/libata-zpodd.c
> @@ -95,8 +95,7 @@ static bool odd_can_poweroff(struct ata_device *ata_dev)
>  	if (!handle)
>  		return false;
>  
> -	status = acpi_bus_get_device(handle, &acpi_dev);
> -	if (ACPI_FAILURE(status))
> +	if (acpi_bus_get_device(handle, &acpi_dev))
>  		return false;
>  
>  	return acpi_device_can_poweroff(acpi_dev);
> 


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

* Re: [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check
  2013-11-20  9:28 ` [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check Yijing Wang
  2013-11-21  8:30   ` Aaron Lu
@ 2013-11-22 22:39   ` Tejun Heo
  2013-11-25  1:34     ` Yijing Wang
  1 sibling, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2013-11-22 22:39 UTC (permalink / raw)
  To: Yijing Wang
  Cc: Bjorn Helgaas, Rafael J. Wysocki, Jean Delvare, Guenter Roeck,
	Hanjun Guo, linux-ide

On Wed, Nov 20, 2013 at 4:28 AM, Yijing Wang <wangyijing@huawei.com> wrote:
> Since acpi_bus_get_device() returns plain int and not acpi_status,
> ACPI_FAILURE() should not be used for checking its return value.  Fix
> that.
>
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: linux-ide@vger.kernel.org

Applied to libata/for-3.13-fixes.  Thanks.

-- 
tejun

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

* Re: [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check
  2013-11-22 22:39   ` Tejun Heo
@ 2013-11-25  1:34     ` Yijing Wang
  2013-11-25 15:58       ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Yijing Wang @ 2013-11-25  1:34 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide

On 2013/11/23 6:39, Tejun Heo wrote:
> On Wed, Nov 20, 2013 at 4:28 AM, Yijing Wang <wangyijing@huawei.com> wrote:
>> Since acpi_bus_get_device() returns plain int and not acpi_status,
>> ACPI_FAILURE() should not be used for checking its return value.  Fix
>> that.
>>
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> Cc: Tejun Heo <tj@kernel.org>
>> Cc: linux-ide@vger.kernel.org
> 
> Applied to libata/for-3.13-fixes.  Thanks.

Hi Tejun,
   Sorry for disturb you, this patch has a build warning found by linux-next kbuild test.

All warnings:

   drivers/ata/libata-zpodd.c: In function 'odd_can_poweroff':
>> drivers/ata/libata-zpodd.c:91:14: warning: unused variable 'status' [-Wunused-variable]
     acpi_status status;


So I send a new patch "[PATCH v2] ata: Fix acpi_bus_get_device() return value check" to you,
can you help to update it.


Thanks!
Yijing.



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

* Re: [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check
  2013-11-25  1:34     ` Yijing Wang
@ 2013-11-25 15:58       ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2013-11-25 15:58 UTC (permalink / raw)
  To: Yijing Wang; +Cc: linux-ide

On Mon, Nov 25, 2013 at 09:34:27AM +0800, Yijing Wang wrote:
> On 2013/11/23 6:39, Tejun Heo wrote:
> > On Wed, Nov 20, 2013 at 4:28 AM, Yijing Wang <wangyijing@huawei.com> wrote:
> >> Since acpi_bus_get_device() returns plain int and not acpi_status,
> >> ACPI_FAILURE() should not be used for checking its return value.  Fix
> >> that.
> >>
> >> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> >> Cc: Tejun Heo <tj@kernel.org>
> >> Cc: linux-ide@vger.kernel.org
> > 
> > Applied to libata/for-3.13-fixes.  Thanks.
> 
> Hi Tejun,
>    Sorry for disturb you, this patch has a build warning found by linux-next kbuild test.
> 
> All warnings:
> 
>    drivers/ata/libata-zpodd.c: In function 'odd_can_poweroff':
> >> drivers/ata/libata-zpodd.c:91:14: warning: unused variable 'status' [-Wunused-variable]
>      acpi_status status;
> 
> 
> So I send a new patch "[PATCH v2] ata: Fix acpi_bus_get_device() return value check" to you,
> can you help to update it.

I already fixed it up last week.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2013-11-25 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1384939706-6292-1-git-send-email-wangyijing@huawei.com>
2013-11-20  9:28 ` [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check Yijing Wang
2013-11-21  8:30   ` Aaron Lu
2013-11-22 22:39   ` Tejun Heo
2013-11-25  1:34     ` Yijing Wang
2013-11-25 15:58       ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox