From: Rijo Thomas <Rijo-john.Thomas@amd.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>,
Mythri Pandeshwara krishna <mythri.pandeshwarakrishna@amd.com>,
op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0
Date: Mon, 12 Apr 2021 15:45:36 +0530 [thread overview]
Message-ID: <b74535f2-b0ab-2463-cac0-ffef8db159af@amd.com> (raw)
In-Reply-To: <20210409084541.GE6048@kadam>
On 09/04/21 2:15 pm, Dan Carpenter wrote:
> 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.
>
Hi Dan,
We do not have any pointers nor do I see a possibility of structure holes, since all data
members are u32 in both struct tee_cmd_load_ta and struct tee_cmd_unload_ta. So, will prefer
to use {0} for now.
Thanks,
Rijo
>
> regards,
> dan carpenter
>
next prev parent reply other threads:[~2021-04-12 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 9:43 [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0 Rijo Thomas
2021-04-09 8:45 ` Dan Carpenter
2021-04-12 10:15 ` Rijo Thomas [this message]
2021-04-12 7:36 ` Jens Wiklander
2021-04-12 10:19 ` Rijo Thomas
2021-04-14 16:46 ` Jens Wiklander
2021-04-14 17:37 ` Rijo Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b74535f2-b0ab-2463-cac0-ffef8db159af@amd.com \
--to=rijo-john.thomas@amd.com \
--cc=Devaraj.Rangasamy@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mythri.pandeshwarakrishna@amd.com \
--cc=op-tee@lists.trustedfirmware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox