ACPI / scan: Fix and cleanup related to acpi_bus_get_device()
Subsystems (4)
cover ACPI / scan: Fix and cleanup related to acpi_bus_get_device()
Hi All,
One fix and one cleanup related to acpi_bus_get_device() follow:
[1/2] Fix acpi_bus_get_device() check in acpi_match_device() [2/2] Clean up acpi_bus_get_parent()
On top of linux-pm/linux-next.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/2 ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
From: Rafael J. Wysocki <[email protected]>
Since acpi_bus_get_device() returns int and not acpi_status, change acpi_match_device() so that it doesn't apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/acpi/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/scan.c +2 -2
@@ -491,9 +491,9 @@ const struct acpi_device_id *acpi_match_ const struct device *dev) {struct acpi_device *adev; +acpi_handle handle =ACPI_HANDLE (dev); -if (!ids || !ACPI_HANDLE (dev) - ||ACPI_FAILURE (acpi_bus_get_device (ACPI_HANDLE (dev), &adev))) +if (!ids || !handle ||acpi_bus_get_device (handle, &adev))return NULL ;return __acpi_match_device (adev, ids);
Re: [PATCH 1/2] ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
Quoted 8 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Since
acpi_bus_get_device()returns int and notacpi_status, changeacpi_match_device()so that it doesn't applyACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Rafael J. Wysocki <[email protected]>---
I have no objection.
Quoted 25 lines
drivers/acpi/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-3@@ -491,9 +491,9 @@ const struct acpi_device_id *acpi_match_ const struct device *dev) {struct acpi_device *adev; +acpi_handle handle =ACPI_HANDLE (dev); -if (!ids || !ACPI_HANDLE (dev) - ||ACPI_FAILURE (acpi_bus_get_device (ACPI_HANDLE (dev), &adev))) +if (!ids || !handle ||acpi_bus_get_device (handle, &adev))return NULL ;return __acpi_match_device (adev, ids); --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
cover Fix acpi_bus_get_device() check
In reply to Rafael J. WysockiSome functions use ACPI_SUCCESS/FAILURE for checking return value of acpi_bus_get_device().
Following patches change not to apply ACPI_SUCCESS/FAILURE to the return value of acpi_bus_get_device().
[PATCH 1/4] ACPI/PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c [PATCH 2/4] ACPI/dock: Fix acpi_bus_get_device() check in drivers/acpi/ddock.c [PATCH 3/4] PNPACPI: Fix acpi_bus_get_device() check in drivers/pnp/pnpacpi/core.c [PATCH 4/4] GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 33 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Since
acpi_bus_get_device()returns int and notacpi_status, changeacpi_match_device()so that it doesn't applyACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-3@@ -491,9 +491,9 @@ const struct acpi_device_id *acpi_match_ const struct device *dev) {struct acpi_device *adev; +acpi_handle handle =ACPI_HANDLE (dev); -if (!ids || !ACPI_HANDLE (dev) - ||ACPI_FAILURE (acpi_bus_get_device (ACPI_HANDLE (dev), &adev))) +if (!ids || !handle ||acpi_bus_get_device (handle, &adev))return NULL ;return __acpi_match_device (adev, ids); --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/4] Fix acpi_bus_get_device() check
acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/acpi/device_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/device_pm.c +3 -3
@@ -213,7 +213,7 @@ int acpi_pm_device_sleep_state(struct deacpi_handle handle =DEVICE_ACPI_HANDLE (dev);struct acpi_device *adev; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }
@@ -290,7 +290,7 @@ int acpi_pm_device_run_wake(struct devicreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (phys_dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (phys_dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ;
@@ -334,7 +334,7 @@ int acpi_pm_device_sleep_wake(struct devreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }
PATCH RESEND 1/4 ACPI/PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c
I fogot to change subject. So I resend a patch.
---acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/acpi/device_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/device_pm.c +3 -3
@@ -213,7 +213,7 @@ int acpi_pm_device_sleep_state(struct deacpi_handle handle =DEVICE_ACPI_HANDLE (dev);struct acpi_device *adev; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }
@@ -290,7 +290,7 @@ int acpi_pm_device_run_wake(struct devicreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (phys_dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (phys_dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ;
@@ -334,7 +334,7 @@ int acpi_pm_device_sleep_wake(struct devreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }
Re: [RESEND PATCH 1/4] ACPI/PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c
Quoted 1 line · Yasuaki Ishimatsu
I fogot to change subject. So I resend a patch.
I have applied patches [1-3/4] to my bleeding-edge branch, but please note that something (probably your MUA) added a space in front of every line originally starting with a space.
Thanks,
Rafael
Quoted 47 lines
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/acpi/device_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Index:
linux-pm/drivers/acpi/device_pm.c
===================================================================drivers/acpi/device_pm.c +3
-4@@ -213,7 +213,7 @@ int acpi_pm_device_sleep_state(struct deacpi_handle handle =DEVICE_ACPI_HANDLE (dev);struct acpi_device *adev; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }@@ -290,7 +290,7 @@ int acpi_pm_device_run_wake(struct devicreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (phys_dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (phys_dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ;@@ -334,7 +334,7 @@ int acpi_pm_device_sleep_wake(struct devreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; } --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Re: [RESEND PATCH 1/4] ACPI/PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c
Hi Rafael,
Quoted 4 lines · Rafael J. Wysocki
Quoted 1 line · Yasuaki Ishimatsu
I fogot to change subject. So I resend a patch.
I have applied patches [1-3/4] to my bleeding-edge branch,
Thanks.
Quoted 3 lines
but please note that
something (probably your MUA) added a space in front of every line originally starting with a space.
I apologize for bothering you.
Thanks,
Yasuaki Ishimatsu
Quoted 52 lines
Thanks,
RafaelQuoted 47 lines
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/acpi/device_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Index:
linux-pm/drivers/acpi/device_pm.c
===================================================================drivers/acpi/device_pm.c +3
-4@@ -213,7 +213,7 @@ int acpi_pm_device_sleep_state(struct deacpi_handle handle =DEVICE_ACPI_HANDLE (dev);struct acpi_device *adev; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; }@@ -290,7 +290,7 @@ int acpi_pm_device_run_wake(struct devicreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (phys_dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (phys_dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ;@@ -334,7 +334,7 @@ int acpi_pm_device_sleep_wake(struct devreturn -EINVAL ; handle =DEVICE_ACPI_HANDLE (dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &adev))) { +if (!handle ||acpi_bus_get_device (handle, &adev)) {dev_dbg (dev,"ACPI handle without context in %s!\n" , __func__);return -ENODEV ; } --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND PATCH 1/4] ACPI/PM: Fix acpi_bus_get_device() check in drivers/acpi/device_pm.c
Quoted 8 lines · Yasuaki Ishimatsu
Hi Rafael,
Quoted 4 lines · Rafael J. Wysocki
Quoted 1 line · Yasuaki Ishimatsu
I fogot to change subject. So I resend a patch.
I have applied patches [1-3/4] to my bleeding-edge branch,
Quoted 7 lines
Thanks.
Quoted 3 lines
but please note that
something (probably your MUA) added a space in front of every line originally starting with a space.I apologize for bothering you.
No problem.
Thanks,
Rafael
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Re: [PATCH 0/4] Fix acpi_bus_get_device() check
In reply to Yasuaki Ishimatsuacpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_SUCCESS() to the return value of acpi_bus_get_device().
--- drivers/acpi/dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/dock.c +1 -1
@@ -836,7 +836,7 @@ static ssize_t show_docked(struct devicestruct dock_station *dock_station = dev->platform_data; -if (ACPI_SUCCESS (acpi_bus_get_device (dock_station->handle, &tmp))) +if (!acpi_bus_get_device (dock_station->handle, &tmp))return snprintf (buf,PAGE_SIZE ,"1\n" );return snprintf (buf,PAGE_SIZE ,"0\n" ); }
PATCH RESEND 2/4 ACPI/dock: Fix acpi_bus_get_device() check in drivers/acpi/ddock.c
I forgot to change subject. So I resend a patch.
---acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_SUCCESS() to the return value of acpi_bus_get_device().
--- drivers/acpi/dock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/dock.c +1 -1
@@ -836,7 +836,7 @@ static ssize_t show_docked(struct devicestruct dock_station *dock_station = dev->platform_data; -if (ACPI_SUCCESS (acpi_bus_get_device (dock_station->handle, &tmp))) +if (!acpi_bus_get_device (dock_station->handle, &tmp))return snprintf (buf,PAGE_SIZE ,"1\n" );return snprintf (buf,PAGE_SIZE ,"0\n" ); }
Re: [PATCH 0/4] Fix acpi_bus_get_device() check
In reply to Yasuaki Ishimatsuacpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/pnp/pnpacpi/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/pnp/pnpacpi/core.c +5 -5
@@ -90,7 +90,7 @@ static int pnpacpi_set_resources(structpnp_dbg (&dev->dev,"set resources\n" ); handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return -ENODEV ; }
@@ -123,7 +123,7 @@ static int pnpacpi_disable_resources(strdev_dbg (&dev->dev,"disable resources\n" ); handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return 0 ; }
@@ -145,7 +145,7 @@ static bool pnpacpi_can_wakeup(struct pnacpi_handle handle; handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return false; }
@@ -160,7 +160,7 @@ static int pnpacpi_suspend(struct pnp_deint error =0 ; handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return 0 ; }
@@ -197,7 +197,7 @@ static int pnpacpi_resume(struct pnp_devacpi_handle handle =DEVICE_ACPI_HANDLE (&dev->dev);int error =0 ; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return -ENODEV ; }
PATCH RESEND 3/4 PNPACPI: Fix acpi_bus_get_device() check in drivers/pnp/pnpacpi/core.c
I forgot to chnage subject. So I resend a patch.
---acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/pnp/pnpacpi/core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/pnp/pnpacpi/core.c +5 -5
@@ -90,7 +90,7 @@ static int pnpacpi_set_resources(structpnp_dbg (&dev->dev,"set resources\n" ); handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return -ENODEV ; }
@@ -123,7 +123,7 @@ static int pnpacpi_disable_resources(strdev_dbg (&dev->dev,"disable resources\n" ); handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return 0 ; }
@@ -145,7 +145,7 @@ static bool pnpacpi_can_wakeup(struct pnacpi_handle handle; handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return false; }
@@ -160,7 +160,7 @@ static int pnpacpi_suspend(struct pnp_deint error =0 ; handle =DEVICE_ACPI_HANDLE (&dev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return 0 ; }
@@ -197,7 +197,7 @@ static int pnpacpi_resume(struct pnp_devacpi_handle handle =DEVICE_ACPI_HANDLE (&dev->dev);int error =0 ; -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) { +if (!handle ||acpi_bus_get_device (handle, &acpi_dev)) {dev_dbg (&dev->dev,"ACPI device not found in %s!\n" , __func__);return -ENODEV ; }
Re: [PATCH 0/4] Fix acpi_bus_get_device() check
In reply to Yasuaki Ishimatsuacpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drint i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
PATCH RESEND 4/4 GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
I forgot to change subject. So I resend a patch.
---acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drint i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Re: [RESEND PATCH 4/4] GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 9 lines · Yasuaki Ishimatsu
I forgot to change subject. So I resend a patch.
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>
I've tried to apply this to drm-intel-next-queued, but git am didn't really like your patch - it failed to apply. Can you please rebase to the drm-intel-next-queued branch from
git://people.freedesktop.org/~danvet/drm-intel
and please resubmit the patch, preferrably formatted with git format-patch?
Thanks, Daniel
Quoted 16 lines
--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index:
linux-pm/drivers/gpu/drm/i915/intel_opregion.c
===================================================================drivers/gpu/drm/i915/intel_opregion.c +1
-1@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drint i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 4/4 GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Yasuaki Ishimatsu
I forgot to change subject. So I resend a patch.
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>
Quoted 8 lines
I've tried to apply this to drm-intel-next-queued, but git am didn't really like your patch - it failed to apply. Can you please rebase to the drm-intel-next-queued branch from
git://people.freedesktop.org/~danvet/drm-inteland please resubmit the patch, preferrably formatted with git format-patch?
My mailer added a space in the patch. I updated the patch. How abot it?
---acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Re: [UPDATE][PATCH 4/4] GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 41 lines · Yasuaki Ishimatsu
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Yasuaki Ishimatsu
I forgot to change subject. So I resend a patch.
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>Quoted 8 lines
I've tried to apply this to drm-intel-next-queued, but git am didn't really like your patch - it failed to apply. Can you please rebase to the drm-intel-next-queued branch from
git://people.freedesktop.org/~danvet/drm-inteland please resubmit the patch, preferrably formatted with git format-patch?
My mailer added a space in the patch. I updated the patch. How abot it?
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/intel_opregion.c +0
-0
drivers/gpu/drm/i915/intel_opregion.c static void intel_didl_outputs(struct drm_device *dev) · line 353
Quoted 8 lines
drivers/gpu/drm/i915/intel_opregion.c +1
-1@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Oops. My mailer added a space again...
I'll check my mailer again.
Thanks,
Yasuaki Ishimatsu
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [UPDATE][PATCH 4/4] GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 48 lines · Yasuaki Ishimatsu
Quoted 47 lines · Yasuaki Ishimatsu
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Yasuaki Ishimatsu
I forgot to change subject. So I resend a patch.
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>Quoted 8 lines
I've tried to apply this to drm-intel-next-queued, but git am didn't really like your patch - it failed to apply. Can you please rebase to the drm-intel-next-queued branch from
git://people.freedesktop.org/~danvet/drm-inteland please resubmit the patch, preferrably formatted with git format-patch?
My mailer added a space in the patch. I updated the patch. How abot it?
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/intel_opregion.c +1
-1@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;
Quoted 5 lines
drivers/gpu/drm/i915/intel_opregion.c static void intel_didl_outputs(struct drm_device *dev) · line 353
Quoted 2 lines
drivers/gpu/drm/i915/intel_opregion.c +0
-0if (acpi_is_video_device (acpi_dev))Oops. My mailer added a space again...
I'll check my mailer again.
I do not understand why space was added to the patch. So I attached the patch. Please check it.
Thanks,
Yasuaki Ishimatsu
Quoted 10 lines
Thanks,
Yasuaki IshimatsuQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
acpi_bus_get_device() returns int not acpi_status.
The patch change not to apply ACPI_FAILURE() to the return value of acpi_bus_get_device().
--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_opregion.c +1 -1
@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Re: [UPDATE][PATCH 4/4] GPU/i915: Fix acpi_bus_get_device() check in drivers/gpu/drm/i915/intel_opregion.c
Quoted 49 lines · Yasuaki Ishimatsu
Quoted 48 lines · Yasuaki Ishimatsu
Quoted 47 lines · Yasuaki Ishimatsu
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Yasuaki Ishimatsu
I forgot to change subject. So I resend a patch.
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>Quoted 8 lines
I've tried to apply this to drm-intel-next-queued, but git am didn't really like your patch - it failed to apply. Can you please rebase to the drm-intel-next-queued branch from
git://people.freedesktop.org/~danvet/drm-inteland please resubmit the patch, preferrably formatted with git format-patch?
My mailer added a space in the patch. I updated the patch. How abot it?
---
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/intel_opregion.c +1
-1@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_opregion.c static void intel_didl_outputs(struct drm_device *dev) · line 353
Quoted 2 lines
drivers/gpu/drm/i915/intel_opregion.c +0
-0if (acpi_is_video_device (acpi_dev))Oops. My mailer added a space again...
I'll check my mailer again.I do not understand why space was added to the patch. So I attached the patch. Please check it.
Yeah, worked this time. Queued for -next, thanks for the patch. -Daniel
Quoted 44 lines
Thanks,
Yasuaki IshimatsuQuoted 10 lines
Thanks,
Yasuaki IshimatsuQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
acpi_bus_get_device()returns int notacpi_status.The patch change not to apply
ACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Yasuaki Ishimatsu <[email protected]>--- drivers/gpu/drm/i915/intel_opregion.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/intel_opregion.c +1
-1@@ -347,7 +347,7 @@ static void intel_didl_outputs(struct drm_device *dev)int i =0 ; handle =DEVICE_ACPI_HANDLE (&dev->pdev->dev); -if (!handle ||ACPI_FAILURE (acpi_bus_get_device (handle, &acpi_dev))) +if (!handle ||acpi_bus_get_device (handle, &acpi_dev))return ;if (acpi_is_video_device (acpi_dev))
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 1/2] ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
In reply to Rafael J. WysockiQuoted 7 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Since
acpi_bus_get_device()returns int and notacpi_status, changeacpi_match_device()so that it doesn't applyACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Rafael J. Wysocki <[email protected]>
Re: [PATCH 1/2] ACPI / scan: Fix acpi_bus_get_device() check in acpi_match_device()
In reply to Rafael J. WysockiQuoted 18 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Since
acpi_bus_get_device()returns int and notacpi_status, changeacpi_match_device()so that it doesn't applyACPI_FAILURE()to the return value ofacpi_bus_get_device().Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +0
-0@@ -491,9 +491,9 @@ const struct acpi_device_id *acpi_match_ const struct device *dev)
drivers/acpi/scan.c const struct acpi_device_id *acpi_match_ · line 499
Quoted 10 lines
drivers/acpi/scan.c +2
-2{struct acpi_device *adev; +acpi_handle handle =ACPI_HANDLE (dev); -if (!ids || !ACPI_HANDLE (dev) - ||ACPI_FAILURE (acpi_bus_get_device (ACPI_HANDLE (dev), &adev))) +if (!ids || !handle ||acpi_bus_get_device (handle, &adev))return NULL ;return __acpi_match_device (adev, ids);
PATCH 2/2 ACPI / scan: Clean up acpi_bus_get_parent()
In reply to Rafael J. WysockiFrom: Rafael J. Wysocki <[email protected]>
Make acpi_bus_get_parent() more straightforward and remove an unnecessary local variable ret from it.
--- drivers/acpi/scan.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/acpi/scan.c +5 -11
@@ -871,29 +871,23 @@ EXPORT_SYMBOL(acpi_bus_unregister_driver-------------------------------------------------------------------------- */ static struct acpi_device *acpi_bus_get_parent (acpi_handle handle) { +struct acpi_device *device =NULL ;acpi_status status; -int ret; -struct acpi_device *device;/* * Fixed hardware devices do not appear in the namespace and do not * have handles, but we fabricate acpi_devices for them, so we have * to deal with them specially. */ -if (handle ==NULL ) +if (!handle)return acpi_root;do { status =acpi_get_parent (handle, &handle); -if (status ==AE_NULL_ENTRY ) -return NULL ;if (ACPI_FAILURE (status)) -return acpi_root; - - ret =acpi_bus_get_device (handle, &device); -if (ret ==0 ) -return device; - }while (1 ); +return status ==AE_NULL_ENTRY ?NULL : acpi_root; + }while (acpi_bus_get_device (handle, &device)); +return device; } acpi_status
Re: [PATCH 2/2] ACPI / scan: Clean up acpi_bus_get_parent()
Quoted 7 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Make
acpi_bus_get_parent()more straightforward and remove an unnecessary local variable ret from it.Signed-off-by Rafael J. Wysocki <[email protected]>---
Quoted 48 lines
drivers/acpi/scan.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)Index:
test/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +5
-12@@ -871,29 +871,23 @@ EXPORT_SYMBOL(acpi_bus_unregister_driver-------------------------------------------------------------------------- */ static struct acpi_device *acpi_bus_get_parent (acpi_handle handle) { +struct acpi_device *device =NULL ;acpi_status status; -int ret; -struct acpi_device *device;/* * Fixed hardware devices do not appear in the namespace and do not * have handles, but we fabricate acpi_devices for them, so we have * to deal with them specially. */ -if (handle ==NULL ) +if (!handle)return acpi_root;do { status =acpi_get_parent (handle, &handle); -if (status ==AE_NULL_ENTRY ) -return NULL ;if (ACPI_FAILURE (status)) -return acpi_root; - - ret =acpi_bus_get_device (handle, &device); -if (ret ==0 ) -return device; - }while (1 ); +return status ==AE_NULL_ENTRY ?NULL : acpi_root; + }while (acpi_bus_get_device (handle, &device)); +return device; } acpi_status --To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] ACPI / scan: Clean up acpi_bus_get_parent()
In reply to Rafael J. WysockiQuoted 6 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Make
acpi_bus_get_parent()more straightforward and remove an unnecessary local variable ret from it.Signed-off-by Rafael J. Wysocki <[email protected]>
Re: [PATCH 2/2] ACPI / scan: Clean up acpi_bus_get_parent()
In reply to Rafael J. WysockiQuoted 37 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Make
acpi_bus_get_parent()more straightforward and remove an unnecessary local variable ret from it.Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/scan.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)Index:
test/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +2
-5@@ -871,29 +871,23 @@ EXPORT_SYMBOL(acpi_bus_unregister_driver-------------------------------------------------------------------------- */ static struct acpi_device *acpi_bus_get_parent (acpi_handle handle) { +struct acpi_device *device =NULL ;acpi_status status; -int ret; -struct acpi_device *device;/* * Fixed hardware devices do not appear in the namespace and do not * have handles, but we fabricate acpi_devices for them, so we have * to deal with them specially. */ -if (handle ==NULL ) +if (!handle)return acpi_root; do { status = acpi_get_parent(handle, &handle); - if (status == AE_NULL_ENTRY) - return NULL; if (ACPI_FAILURE(status))
drivers/acpi/scan.c EXPORT_SYMBOL(acpi_bus_unregister_driver · line 891
Quoted 10 lines
drivers/acpi/scan.c +3
-6-return acpi_root; - - ret =acpi_bus_get_device (handle, &device); -if (ret ==0 ) -return device; - }while (1 ); +return status ==AE_NULL_ENTRY ?NULL : acpi_root; + }while (acpi_bus_get_device (handle, &device)); +return device; }
Quoted 3 lines
drivers/acpi/scan.c +0
-0acpi_status