From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <avri.altman@wdc.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: Zero utp_upiu_req at the beginning of each command
Date: Wed, 11 Sep 2024 18:32:03 -0700 [thread overview]
Message-ID: <e19fc109-9711-4a3d-9aaf-4a7159946a2b@acm.org> (raw)
In-Reply-To: <20240911053951.4032533-1-avri.altman@wdc.com>
On 9/10/24 10:39 PM, Avri Altman wrote:
> +static void zero_utp_upiu(struct utp_upiu_req *req)
> +{
> + memset(&req->utp_upiu, 0, sizeof(req->utp_upiu));
> +}
Introducing a function that only calls memset() seems like overkill to
me. Please call memset() directly.
> diff --git a/include/uapi/scsi/scsi_bsg_ufs.h b/include/uapi/scsi/scsi_bsg_ufs.h
> index 8c29e498ef98..b0d60d54d6c9 100644
> --- a/include/uapi/scsi/scsi_bsg_ufs.h
> +++ b/include/uapi/scsi/scsi_bsg_ufs.h
> @@ -162,11 +162,13 @@ struct utp_upiu_cmd {
> */
> struct utp_upiu_req {
> struct utp_upiu_header header;
> - union {
> - struct utp_upiu_cmd sc;
> - struct utp_upiu_query qr;
> - struct utp_upiu_query uc;
> - };
> + struct_group(utp_upiu,
> + union {
> + struct utp_upiu_cmd sc;
> + struct utp_upiu_query qr;
> + struct utp_upiu_query uc;
> + };
> + );
> };
Is the above change perhaps independent of the rest of this patch? I
think that this change can be left out.
Thanks,
Bart.
next prev parent reply other threads:[~2024-09-12 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 5:39 Avri Altman
2024-09-12 1:32 ` Bart Van Assche [this message]
2024-09-12 6:51 ` Avri Altman
2024-09-12 2:58 ` kernel test robot
2024-09-12 5:52 ` kernel test robot
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=e19fc109-9711-4a3d-9aaf-4a7159946a2b@acm.org \
--to=bvanassche@acm.org \
--cc=avri.altman@wdc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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
all inboxes | Powered by JetHome®