[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210409084541.GE6048@kadam>
Date: Fri, 9 Apr 2021 11:45:41 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Rijo Thomas <Rijo-john.Thomas@....com>
Cc: Jens Wiklander <jens.wiklander@...aro.org>,
Devaraj Rangasamy <Devaraj.Rangasamy@....com>,
Mythri Pandeshwara krishna <mythri.pandeshwarakrishna@....com>,
op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes
0
On Mon, Apr 05, 2021 at 03:13:09PM +0530, Rijo Thomas wrote:
> @@ -340,7 +398,8 @@ int handle_open_session(struct tee_ioctl_open_session_arg *arg, u32 *info,
>
> int handle_load_ta(void *data, u32 size, struct tee_ioctl_open_session_arg *arg)
> {
> - struct tee_cmd_load_ta cmd = {0};
> + struct tee_cmd_unload_ta unload_cmd = {0};
> + struct tee_cmd_load_ta load_cmd = {0};
It's better style to write:
struct tee_cmd_unload_ta unload_cmd = {};
It doesn't make a difference in this case, but if the first struct
member is a pointer then {0} can generate a Sparse warning. Or
depending on which bugs your version of GCC has it can affect whether
struct holes are initialized. But mostly it's just the prefered style.
regards,
dan carpenter
Powered by blists - more mailing lists