Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e16a24c authored by Lee Susman's avatar Lee Susman
Browse files

scsi: ufs: fix debugfs tag stats resetting



When attempting to clear ufs tag stats, memset 0 is called with size
of multiples of unsigned int.
This is wrong since each cell in the stats array is of type (u64).
Fix the memset to sizeof(*tag_stats).

Change-Id: Iaeb70616a2160ee9cba4605e7251dc45868d1951
Signed-off-by: default avatarLee Susman <lsusman@codeaurora.org>
parent 76ccdc74
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ static ssize_t ufsdbg_tag_stats_write(struct file *filp,
		pr_debug("%s: Enabling & Resetting UFS tag statistics",
			 __func__);
		memset(ufs_stats->tag_stats, 0,
		       sizeof(unsigned int) * hba->nutrs);
		       sizeof(*ufs_stats->tag_stats) * hba->nutrs);
	}

	spin_unlock_irqrestore(hba->host->host_lock, flags);