Re: [PATCH] power: fix pstate number parsing

2022-10-26 Thread Thomas Monjalon
12/10/2022 14:25, Pattan, Reshma: > > > -Original Message- > > From: Markus Theil > > > > +#include > > This is not needed right. > > > #include > > #include > > #include > > @@ -96,7 +97,7 @@ power_read_turbo_pct(uint64_t *outVal) > > > > errno = 0; > > *outVal = (uin

RE: [PATCH] power: fix pstate number parsing

2022-10-12 Thread Pattan, Reshma
> -Original Message- > From: Markus Theil > +#include This is not needed right. > #include > #include > #include > @@ -96,7 +97,7 @@ power_read_turbo_pct(uint64_t *outVal) > > errno = 0; > *outVal = (uint64_t) strtol(val, &endptr, 10); > - if (*endptr != 0 ||

[PATCH] power: fix pstate number parsing

2022-10-12 Thread Markus Theil
From: Markus Theil When converting atoi to strtol in a revision of introducing sysfs support for turbo percentage, a necessary check against '\n' returned by sysfs was not introduced. Fixes: de254dac608e ("power: read P-state turbo percentage from sysfs") Signed-off-by: Markus Theil --- lib/po