Skip to content

Commit

Permalink
scsi: ufs: Remove unnecessary memset for dev_info
Browse files Browse the repository at this point in the history
The whole UFS host instance has been zero-initialized by scsi_host_alloc(),
thus UFS driver does not need to clear "dev_info" member specifically in
ufshcd_device_params_init().

Simply remove the unnecessary code.

Link: https://lore.kernel.org/r/20200522083212.4008-2-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Stanley Chu authored and Martin K. Petersen committed May 27, 2020
1 parent 3be60b5 commit 3a66ae5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/scsi/ufs/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -7267,9 +7267,6 @@ static int ufshcd_device_params_init(struct ufs_hba *hba)
bool flag;
int ret;

/* Clear any previous UFS device information */
memset(&hba->dev_info, 0, sizeof(hba->dev_info));

/* Init check for device descriptor sizes */
ufshcd_init_desc_sizes(hba);

Expand Down

0 comments on commit 3a66ae5

Please sign in to comment.