diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2025-02-21 09:56:31 +0000 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2025-02-21 11:40:24 +0000 |
commit | cecf6a504137aa238d768ae440a1f6488cb2f436 (patch) | |
tree | 004ae0c38e277a53674ea46da0f423b534234e1e /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 9472fe20d3968743e683bd48dace02b4accd7736 (diff) |
firmware: arm_ffa: Explicitly cast return value from FFA_VERSION before comparison
The return value ver.a0 is unsigned long type and FFA_RET_NOT_SUPPORTED
is a negative value.
Since the return value from the firmware can be just 32-bit even on
64-bit systems as FFA specification mentions it as int32 error code in
w0 register, explicitly casting to s32 ensures correct sign interpretation
when comparing against a signed error code FFA_RET_NOT_SUPPORTED.
Without casting, comparison between unsigned long and a negative
constant could lead to unintended results due to type promotions.
Fixes: 3bbfe9871005 ("firmware: arm_ffa: Add initial Arm FFA driver support")
Reported-by: Andrei Homescu <ahomescu@google.com>
Message-Id: <20250221095633.506678-1-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions