Skip to content

Commit 0115d06

Browse files
spandruvadarafaeljw
authored andcommitted
thermal: intel: selftests: 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 <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20250828201541.931425-1-srinivas.pandruvada@linux.intel.com [ rjw: Subject cleanup ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8306bca commit 0115d06

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ int main(int argc, char **argv)
144144
ret = sscanf(index_str, "%d", &index);
145145
if (ret < 0)
146146
break;
147+
148+
index &= 0x0f;
147149
if (index > WORKLOAD_TYPE_MAX_INDEX)
148150
printf("Invalid workload type index\n");
149151
else

0 commit comments

Comments
 (0)