linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] acpi: Remove default association from integer maximum values
@ 2022-08-25 11:17 Sakari Ailus
  2022-08-26 10:14 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2022-08-25 11:17 UTC (permalink / raw)
  To: linux-acpi
  Cc: linux-kernel, Ard Biesheuvel, sbinding, andriy.shevchenko,
	patches, rafael

Remove the default association from integer maximum value checks. It is
not necessary and has caused a bug in other associations being unnoticed.

Fixes: 923044133367 ("ACPI: property: Unify integer value reading functions")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/acpi/property.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 91d0e75859d37..d4c168ce428ca 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -1046,8 +1046,7 @@ static int acpi_data_prop_read_single(const struct acpi_device_data *data,
 								u8 *: U8_MAX, \
 								u16 *: U16_MAX, \
 								u32 *: U32_MAX, \
-								u64 *: U64_MAX, \
-								default: 0U)) { \
+								u64 *: U64_MAX)) { \
 				ret = -EOVERFLOW;			\
 				break;					\
 			}						\
-- 
2.30.2


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

* Re: [PATCH 1/1] acpi: Remove default association from integer maximum values
  2022-08-25 11:17 [PATCH 1/1] acpi: Remove default association from integer maximum values Sakari Ailus
@ 2022-08-26 10:14 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2022-08-26 10:14 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-acpi, linux-kernel, sbinding, andriy.shevchenko, patches, rafael

On Thu, 25 Aug 2022 at 13:17, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Remove the default association from integer maximum value checks. It is
> not necessary and has caused a bug in other associations being unnoticed.
>
> Fixes: 923044133367 ("ACPI: property: Unify integer value reading functions")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>  drivers/acpi/property.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
> index 91d0e75859d37..d4c168ce428ca 100644
> --- a/drivers/acpi/property.c
> +++ b/drivers/acpi/property.c
> @@ -1046,8 +1046,7 @@ static int acpi_data_prop_read_single(const struct acpi_device_data *data,
>                                                                 u8 *: U8_MAX, \
>                                                                 u16 *: U16_MAX, \
>                                                                 u32 *: U32_MAX, \
> -                                                               u64 *: U64_MAX, \
> -                                                               default: 0U)) { \
> +                                                               u64 *: U64_MAX)) { \
>                                 ret = -EOVERFLOW;                       \
>                                 break;                                  \
>                         }                                               \
> --
> 2.30.2
>

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

end of thread, other threads:[~2022-08-26 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 11:17 [PATCH 1/1] acpi: Remove default association from integer maximum values Sakari Ailus
2022-08-26 10:14 ` Ard Biesheuvel

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).