[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250828201541.931425-1-srinivas.pandruvada@linux.intel.com>
Date: Thu, 28 Aug 2025 13:15:41 -0700
From: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
To: rafael@...nel.org,
daniel.lezcano@...aro.org,
lukasz.luba@....com
Cc: linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: [PATCH v2] 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 <srinivas.pandruvada@...ux.intel.com>
---
v2:
- Removed extra line
.../selftests/thermal/intel/workload_hint/workload_hint_test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
index ba58589a1145..ca2bd03154e4 100644
--- a/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
+++ b/tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
@@ -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
--
2.43.0
Powered by blists - more mailing lists