]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
remoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 8 Aug 2025 12:00:22 +0000 (13:00 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 19 Aug 2025 17:25:56 +0000 (11:25 -0600)
In the struct ti_sci_proc the fields proc_id and host_id are declared as
u8 so cannot be set to nor compared with a macro defined with a value
using 16 bits. Change the macro to only use 8 bits to make the code work
as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/remoteproc/ti_k3_arm64_rproc.c

index d3eb957b2e4957f2dcbf3e7d4a5c8d1983f4dbda..403c6bed2e8c97a5eb79c6d9106d16d64d7b43b8 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include "ti_sci_proc.h"
 
-#define INVALID_ID     0xffff
+#define INVALID_ID     0xff
 
 #define GTC_CNTCR_REG  0x0
 #define GTC_CNTFID0_REG        0x20