Skip to content

Commit 94ea706

Browse files
ColinIanKingjenswi-linaro
authored andcommitted
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 <coking@nvidia.com> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 parent 73503de commit 94ea706

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tee/optee/rpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
4343
struct i2c_msg msg = { };
4444
size_t i;
4545
int ret = -EOPNOTSUPP;
46-
u8 attr[] = {
46+
static const u8 attr[] = {
4747
TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT,
4848
TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT,
4949
TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT,

0 commit comments

Comments
 (0)