Re: [PATCH] scsi: pmcraid: convert sysfs snprintf to sysfs_emit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/28/22 00:02, Xuezhi Zhang wrote:
Fix the following coccicheck warnings:
drivers/scsi/pmcraid.c:3591:8-16:
WARNING: use scnprintf or sprintf
drivers/scsi/pmcraid.c:3557:8-16:
WARNING: use scnprintf or sprintf
drivers/scsi/pmcraid.c:3496:8-16:
WARNING: use scnprintf or sprintf

I'm not sure the above is sufficient as motivation for this patch. The current code looks fine to me. Why to change the snprintf() calls into sysfs_emit() calls?

@@ -3554,8 +3554,7 @@ static ssize_t pmcraid_show_drv_version(
  	char *buf
  )
  {
-	return snprintf(buf, PAGE_SIZE, "version: %s\n",
-			PMCRAID_DRIVER_VERSION);
+	return sysfs_emt(buf, "version: %s\n", PMCRAID_DRIVER_VERSION);
  }

Something tells me that this patch has not been tested at all - not even compile tested. Are you perhaps checking whether it is possible to get a broken patch in the kernel tree?

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux