lkml.org 
[lkml]   [2021]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2021-04-09 10:46    [W:0.083 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site