mirror of https://github.com/torvalds/linux.git
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>
This commit is contained in:
parent
8306bcaba0
commit
0115d06355
|
|
@ -144,6 +144,8 @@ int main(int argc, char **argv)
|
||||||
ret = sscanf(index_str, "%d", &index);
|
ret = sscanf(index_str, "%d", &index);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
index &= 0x0f;
|
||||||
if (index > WORKLOAD_TYPE_MAX_INDEX)
|
if (index > WORKLOAD_TYPE_MAX_INDEX)
|
||||||
printf("Invalid workload type index\n");
|
printf("Invalid workload type index\n");
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue