[PATCH] scsi: ibmvfc: replace snprintf with sysfs_emit
Joe Perches
joe at perches.com
Wed Feb 9 13:06:16 AEDT 2022
On Wed, 2022-02-09 at 08:43 +0800, davidcomponentone at gmail.com wrote:
> From: Yang Guang <yang.guang5 at zte.com.cn>
[]
> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
[]
> @@ -3403,7 +3403,7 @@ static ssize_t ibmvfc_show_host_partition_name(struct device *dev,
> struct Scsi_Host *shost = class_to_shost(dev);
> struct ibmvfc_host *vhost = shost_priv(shost);
>
> - return snprintf(buf, PAGE_SIZE, "%s\n",
> + return sysfs_emit(buf, "%s\n",
> vhost->login_buf->resp.partition_name);
Rewrap please
return sysfs_emit(buf, "%s\n", vhost->login_buf->resp.partition_name);
> }
>
> @@ -3413,7 +3413,7 @@ static ssize_t ibmvfc_show_host_device_name(struct device *dev,
> struct Scsi_Host *shost = class_to_shost(dev);
> struct ibmvfc_host *vhost = shost_priv(shost);
>
> - return snprintf(buf, PAGE_SIZE, "%s\n",
> + return sysfs_emit(buf, "%s\n",
> vhost->login_buf->resp.device_name);
etc...
More information about the Linuxppc-dev
mailing list