selftests/thermel/intel/workload_hint: Mask unsupported types
PATCH v2 1/1 selftests/thermel/intel/workload_hint: Mask unsupported types
The workload hint may contain some other hints which are not defined. So mask out unsupported types. Currently only lower 4 bits of workload type hints are defined.
Signed-off-by Srinivas Pandruvada <[email protected]>
---
v2:
- Removed extra line
.../selftests/thermal/intel/workload_hint/workload_hint_test.c | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c +2 -0
@@ -144,6 +144,8 @@ int main(int argc, char **argv) ret =sscanf (index_str,"%d" , &index);if (ret <0 )break ; + + index &=0x0f ;if (index >WORKLOAD_TYPE_MAX_INDEX )printf ("Invalid workload type index\n" );else
Signature · 1 line
2.43.0
Rafael J. Wysocki
AppliedQuoted 18 lines · Srinivas Pandruvada
The workload hint may contain some other hints which are not defined. So mask out unsupported types. Currently only lower 4 bits of workload type hints are defined.
Signed-off-by Srinivas Pandruvada <[email protected]>---
v2:
- Removed extra line.../selftests/thermal/intel/workload_hint/workload_hint_test.c | 2 ++ 1 file changed, 2 insertions(+)tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c +0
-0
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c int main(int argc, char **argv)
Quoted 9 lines
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c +2
-1@@ -144,6 +144,8 @@ int main(int argc, char **argv) ret =sscanf (index_str,"%d" , &index);if (ret <0 )break ; + + index &=0x0f ;if (index >WORKLOAD_TYPE_MAX_INDEX )printf ("Invalid workload type index\n" );else --
Applied, thanks!