Message ID | 1384939706-6292-4-git-send-email-wangyijing@huawei.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
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); > -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
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. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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.
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);
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(-)