ACPI/CPPC: signedness bug in register_pcc_channel()
Subsystems (3)
PATCH 1/1 ACPI/CPPC: signedness bug in register_pcc_channel()
The "pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need it to be signed.
Fixes 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC')
Signed-off-by Dan Carpenter <[email protected]>
drivers/acpi/cppc_acpi.c +1 -1
@@ -302,7 +302,7 @@ err_ret: }EXPORT_SYMBOL_GPL (acpi_get_psd_map); -static int register_pcc_channel (unsigned pcc_subspace_idx) +static int register_pcc_channel (int pcc_subspace_idx) {struct acpi_pcct_subspace *cppc_ss;unsigned int len;
Quoted 11 lines · Dan Carpenter
The "
pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need it to be signed.Fixes 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC')Signed-off-by Dan Carpenter <[email protected]>drivers/acpi/cppc_acpi.c +0
-0
drivers/acpi/cppc_acpi.c err_ret: · line 308
Quoted 8 lines
drivers/acpi/cppc_acpi.c +1
-1@@ -302,7 +302,7 @@ err_ret: }EXPORT_SYMBOL_GPL (acpi_get_psd_map); -static int register_pcc_channel (unsigned pcc_subspace_idx) +static int register_pcc_channel (int pcc_subspace_idx) {struct acpi_pcct_subspace *cppc_ss;unsigned int len;
Acked-by Ashwin Chaugule <[email protected]>
Thanks,
Ashwin.
Rafael J. Wysocki
AppliedQuoted 15 lines · Ashwin Chaugule
Quoted 14 lines · Dan Carpenter
The "
pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need it to be signed.Fixes 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC')Signed-off-by Dan Carpenter <[email protected]>drivers/acpi/cppc_acpi.c +0
-0@@ -302,7 +302,7 @@ err_ret: }EXPORT_SYMBOL_GPL (acpi_get_psd_map);
Quoted 7 lines
drivers/acpi/cppc_acpi.c err_ret: · line 308
Quoted 5 lines
drivers/acpi/cppc_acpi.c +1
-1-static int register_pcc_channel (unsigned pcc_subspace_idx) +static int register_pcc_channel (int pcc_subspace_idx) {struct acpi_pcct_subspace *cppc_ss;unsigned int len;Acked-by Ashwin Chaugule <[email protected]>
Applied, thanks!
Rafael