Skip to contentSkip to conversation

acpi: Remove default association from integer maximum values

PATCH In review Sakari Ailus 2 participants 2 messages Aug 25, 2022 – Aug 26, 2022 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: Remove default association from integer maximum values

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")
---
 drivers/acpi/property.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/acpi/property.c +1 -2
index 91d0e75859d37..d4c168ce428ca 100644
@@ -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;					\
 			}						\
Signature · 1 line
2.30.2
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sakari Ailus

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")
Quoted 21 lines
---
 drivers/acpi/property.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/acpi/property.c +1 -3
index 91d0e75859d37..d4c168ce428ca 100644
@@ -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