From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rijo Thomas <Rijo-john.Thomas@amd.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: Fri, 9 Apr 2021 11:45:41 +0300 [thread overview]
Message-ID: <20210409084541.GE6048@kadam> (raw)
In-Reply-To: <3150feb19421ca6b15202c853215f8b40fe35567.1617615067.git.Rijo-john.Thomas@amd.com>
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
next prev parent reply other threads:[~2021-04-09 8:46 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 [this message]
2021-04-12 10:15 ` Rijo Thomas
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=20210409084541.GE6048@kadam \
--to=dan.carpenter@oracle.com \
--cc=Devaraj.Rangasamy@amd.com \
--cc=Rijo-john.Thomas@amd.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