From: Colin Ian King Date: Fri, 9 Jan 2026 15:44:42 +0000 (+0000) Subject: optee: make read-only array attr static const X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94ea7063fae835e800768d3b0507f0994ef03878;p=thirdparty%2Fkernel%2Flinux.git optee: make read-only array attr static const Don't populate the read-only array attr on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander --- diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c index 97fc5b14db0ce..1758eb7e6e8bd 100644 --- a/drivers/tee/optee/rpc.c +++ b/drivers/tee/optee/rpc.c @@ -43,7 +43,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx, struct i2c_msg msg = { }; size_t i; int ret = -EOPNOTSUPP; - u8 attr[] = { + static const u8 attr[] = { TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT, TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT, TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT,