scsi: ufs: Simplify zero-initialization
authorBart Van Assche <bvanassche@acm.org>
Thu, 27 Jul 2023 19:41:18 +0000 (12:41 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 31 Jul 2023 19:17:50 +0000 (15:17 -0400)
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>
Link: https://lore.kernel.org/r/20230727194457.3152309-7-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c

index ca520f2..5e248c6 100644 (file)
@@ -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;