* [PATCH v1] coresight: Drop double check for ACPI companion device
@ 2020-05-29 13:32 Andy Shevchenko
2020-06-01 19:57 ` Mathieu Poirier
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2020-05-29 13:32 UTC (permalink / raw)
To: Mathieu Poirier, Suzuki K Poulose, Mike Leach, linux-kernel,
Alexander Shishkin
Cc: Andy Shevchenko
acpi_dev_get_resources() does perform the NULL pointer check against
ACPI companion device which is given as function parameter. Thus,
there is no need to duplicate this check in the caller.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/hwtracing/coresight/coresight-stm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index b908ca104645..673d2f56ed1e 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -727,8 +727,6 @@ static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res)
struct acpi_device *adev = ACPI_COMPANION(dev);
- if (!adev)
- return -ENODEV;
rc = acpi_dev_get_resources(adev, &res_list, NULL, NULL);
if (rc < 0)
return rc;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] coresight: Drop double check for ACPI companion device
2020-05-29 13:32 [PATCH v1] coresight: Drop double check for ACPI companion device Andy Shevchenko
@ 2020-06-01 19:57 ` Mathieu Poirier
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2020-06-01 19:57 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Suzuki K Poulose, Mike Leach, linux-kernel, Alexander Shishkin
Hi Andy,
On Fri, May 29, 2020 at 04:32:10PM +0300, Andy Shevchenko wrote:
> acpi_dev_get_resources() does perform the NULL pointer check against
> ACPI companion device which is given as function parameter. Thus,
> there is no need to duplicate this check in the caller.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/hwtracing/coresight/coresight-stm.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index b908ca104645..673d2f56ed1e 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -727,8 +727,6 @@ static int acpi_stm_get_stimulus_area(struct device *dev, struct resource *res)
>
> struct acpi_device *adev = ACPI_COMPANION(dev);
>
> - if (!adev)
> - return -ENODEV;
> rc = acpi_dev_get_resources(adev, &res_list, NULL, NULL);
> if (rc < 0)
> return rc;
I have applied your patch.
Thanks,
Mathieu
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-01 19:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 13:32 [PATCH v1] coresight: Drop double check for ACPI companion device Andy Shevchenko
2020-06-01 19:57 ` Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).