From c9c15f80e8771c22d4aa162e5c65002cb7fac3d1 Mon Sep 17 00:00:00 2001 From: Lee Susman Date: Tue, 19 Nov 2013 10:49:56 +0200 Subject: [PATCH] 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: Lee Susman --- drivers/scsi/ufs/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/debugfs.c b/drivers/scsi/ufs/debugfs.c index 5028b560509f..95c1ccb0e310 100644 --- a/drivers/scsi/ufs/debugfs.c +++ b/drivers/scsi/ufs/debugfs.c @@ -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);