scsi: ufs: just use sizeof() for snprintf()
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 28 Mar 2017 13:49:29 +0000 (16:49 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 30 Mar 2017 02:42:21 +0000 (22:42 -0400)
Not much reason to use ARRAY_SIZE() when we know it's for a C string.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c

index 109a7623b561782025300b2c854ca65605288f42..790c19c2162b4dd4a2f60e54e4a64f0913c56c16 100644 (file)
@@ -7880,7 +7880,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
                INIT_WORK(&hba->clk_scaling.resume_work,
                          ufshcd_clk_scaling_resume_work);
 
-               snprintf(wq_name, ARRAY_SIZE(wq_name), "ufs_clkscaling_%d",
+               snprintf(wq_name, sizeof(wq_name), "ufs_clkscaling_%d",
                         host->host_no);
                hba->clk_scaling.workq = create_singlethread_workqueue(wq_name);