* [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check
@ 2023-02-04 11:02 Hans de Goede
2023-02-06 13:46 ` Hans de Goede
2023-02-20 14:38 ` Andy Shevchenko
0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2023-02-04 11:02 UTC (permalink / raw)
To: Daniel Scally, Mark Gross, Andy Shevchenko
Cc: Hans de Goede, platform-driver-x86
acpi_evaluate_dsm_typed() already verifies the type is the requested type,
so this error check is a no-op, drop it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/intel/int3472/discrete.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index 96963e30ab6c..f064da74f50a 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -78,14 +78,6 @@ skl_int3472_get_sensor_module_config(struct int3472_discrete_device *int3472)
return ERR_PTR(-ENODEV);
}
- if (obj->string.type != ACPI_TYPE_STRING) {
- dev_err(int3472->dev,
- "Sensor _DSM returned a non-string value\n");
-
- ACPI_FREE(obj);
- return ERR_PTR(-EINVAL);
- }
-
for (i = 0; i < ARRAY_SIZE(int3472_sensor_configs); i++) {
if (!strcmp(int3472_sensor_configs[i].sensor_module_name,
obj->string.pointer))
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check
2023-02-04 11:02 [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check Hans de Goede
@ 2023-02-06 13:46 ` Hans de Goede
2023-02-20 14:38 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-02-06 13:46 UTC (permalink / raw)
To: Daniel Scally, Mark Gross, Andy Shevchenko; +Cc: platform-driver-x86
Hi,
On 2/4/23 12:02, Hans de Goede wrote:
> acpi_evaluate_dsm_typed() already verifies the type is the requested type,
> so this error check is a no-op, drop it.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
I've added this to my review-hans (soon to be for-next) branch now.
Regards,
Hans
> ---
> drivers/platform/x86/intel/int3472/discrete.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
> index 96963e30ab6c..f064da74f50a 100644
> --- a/drivers/platform/x86/intel/int3472/discrete.c
> +++ b/drivers/platform/x86/intel/int3472/discrete.c
> @@ -78,14 +78,6 @@ skl_int3472_get_sensor_module_config(struct int3472_discrete_device *int3472)
> return ERR_PTR(-ENODEV);
> }
>
> - if (obj->string.type != ACPI_TYPE_STRING) {
> - dev_err(int3472->dev,
> - "Sensor _DSM returned a non-string value\n");
> -
> - ACPI_FREE(obj);
> - return ERR_PTR(-EINVAL);
> - }
> -
> for (i = 0; i < ARRAY_SIZE(int3472_sensor_configs); i++) {
> if (!strcmp(int3472_sensor_configs[i].sensor_module_name,
> obj->string.pointer))
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check
2023-02-04 11:02 [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check Hans de Goede
2023-02-06 13:46 ` Hans de Goede
@ 2023-02-20 14:38 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-02-20 14:38 UTC (permalink / raw)
To: Hans de Goede; +Cc: Daniel Scally, Mark Gross, platform-driver-x86
On Sat, Feb 04, 2023 at 12:02:23PM +0100, Hans de Goede wrote:
> acpi_evaluate_dsm_typed() already verifies the type is the requested type,
> so this error check is a no-op, drop it.
Not sure if it's not late...
Reviewed-by: Andy Shevchenko <andy@kernel.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/platform/x86/intel/int3472/discrete.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
> index 96963e30ab6c..f064da74f50a 100644
> --- a/drivers/platform/x86/intel/int3472/discrete.c
> +++ b/drivers/platform/x86/intel/int3472/discrete.c
> @@ -78,14 +78,6 @@ skl_int3472_get_sensor_module_config(struct int3472_discrete_device *int3472)
> return ERR_PTR(-ENODEV);
> }
>
> - if (obj->string.type != ACPI_TYPE_STRING) {
> - dev_err(int3472->dev,
> - "Sensor _DSM returned a non-string value\n");
> -
> - ACPI_FREE(obj);
> - return ERR_PTR(-EINVAL);
> - }
> -
> for (i = 0; i < ARRAY_SIZE(int3472_sensor_configs); i++) {
> if (!strcmp(int3472_sensor_configs[i].sensor_module_name,
> obj->string.pointer))
> --
> 2.39.1
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-20 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-04 11:02 [PATCH] platform/x86: int3472/discrete: Drop unnecessary obj->type == string check Hans de Goede
2023-02-06 13:46 ` Hans de Goede
2023-02-20 14:38 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox