summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2021-12-02 14:56:47 +0900
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-01-04 20:00:12 +0900
commit0667391e191c00fb80d5a227bef977ecb12b5b70 (patch)
tree9163e82aa4aeb7cfde845a60d5adcf4402661579
parent58c541146b6601ad0b12f2a1f8fc925a3a3e0006 (diff)
downloadlinux-0667391e191c00fb80d5a227bef977ecb12b5b70.tar.gz
linux-0667391e191c00fb80d5a227bef977ecb12b5b70.tar.bz2
linux-0667391e191c00fb80d5a227bef977ecb12b5b70.zip
ata: libata-scsi: use sysfs_emit()
Use sysfs_emit() instead of snprintf() in ata_scsi_park_show(). Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
-rw-r--r--drivers/ata/libata-scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 313e9475507b..5f27f5c29907 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -121,7 +121,7 @@ static ssize_t ata_scsi_park_show(struct device *device,
unlock:
spin_unlock_irq(ap->lock);
- return rc ? rc : snprintf(buf, 20, "%u\n", msecs);
+ return rc ? rc : sysfs_emit(buf, "%u\n", msecs);
}
static ssize_t ata_scsi_park_store(struct device *device,