All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Avri Altman <avri.altman@wdc.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Bart Van Assche <bvanassche@acm.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Stanley Chu <stanley.chu@mediatek.com>,
	Can Guo <quic_cang@quicinc.com>,
	Asutosh Das <quic_asutoshd@quicinc.com>,
	"Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
	Bean Huo <beanhuo@micron.com>,
	Arthur Simchaev <Arthur.Simchaev@wdc.com>
Subject: [PATCH v2 06/12] scsi: ufs: Simplify zero-initialization
Date: Thu, 27 Jul 2023 12:41:18 -0700	[thread overview]
Message-ID: <20230727194457.3152309-7-bvanassche@acm.org> (raw)
In-Reply-To: <20230727194457.3152309-1-bvanassche@acm.org>

Use { } instead of { { 0 }, } to zero-initialize data structures on the
stack. This patch fixes two W=2 warnings.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/core/ufshcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index ca520f2b1820..5e248c60f887 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -7040,7 +7040,7 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,
 static int ufshcd_issue_tm_cmd(struct ufs_hba *hba, int lun_id, int task_id,
 		u8 tm_function, u8 *tm_response)
 {
-	struct utp_task_req_desc treq = { { 0 }, };
+	struct utp_task_req_desc treq = { };
 	enum utp_ocs ocs_value;
 	int err;
 
@@ -7205,7 +7205,7 @@ int ufshcd_exec_raw_upiu_cmd(struct ufs_hba *hba,
 {
 	int err;
 	enum dev_cmd_type cmd_type = DEV_CMD_TYPE_QUERY;
-	struct utp_task_req_desc treq = { { 0 }, };
+	struct utp_task_req_desc treq = { };
 	enum utp_ocs ocs_value;
 	u8 tm_f = be32_to_cpu(req_upiu->header.dword_1) >> 16 & MASK_TM_FUNC;
 

  parent reply	other threads:[~2023-07-27 19:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 19:41 [PATCH v2 00/12] Multiple cleanup patches for the UFS driver Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 01/12] scsi: ufs: Follow the kernel-doc syntax for documenting return values Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 02/12] scsi: ufs: Document all " Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 03/12] scsi: ufs: Fix kernel-doc headers Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 04/12] scsi: ufs: Rename a function argument Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 05/12] scsi: ufs: Minimize #include directives Bart Van Assche
2023-07-27 19:41 ` Bart Van Assche [this message]
2023-07-27 19:41 ` [PATCH v2 07/12] scsi: ufs: Improve type safety Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 08/12] scsi: ufs: Remove a local variable from ufshcd_abort_all() Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 09/12] scsi: ufs: Simplify ufshcd_abort_all() Bart Van Assche
2023-11-15  6:57   ` Peter Wang (王信友)
2023-11-15 19:13     ` Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 10/12] scsi: ufs: Remove a member variable Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 11/12] scsi: ufs: Simplify transfer request header initialization Bart Van Assche
2023-07-28 13:40   ` Avri Altman
2023-08-02 11:25   ` Kumar, Udit
2023-08-02 16:05     ` Bart Van Assche
2023-08-02 16:44       ` Kumar, Udit
2023-08-02 16:46         ` Bart Van Assche
2023-07-27 19:41 ` [PATCH v2 12/12] scsi: ufs: Simplify response header parsing Bart Van Assche
2023-07-28 13:54   ` Avri Altman
2023-07-31 19:19 ` [PATCH v2 00/12] Multiple cleanup patches for the UFS driver Martin K. Petersen
2023-08-08  2:50 ` Martin K. Petersen

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=20230727194457.3152309-7-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=Arthur.Simchaev@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=stanley.chu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.