summaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_fsl.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2021-12-02 07:05:03 +0100
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-01-04 12:00:12 +0100
commitab0efc068ebf73dcec6198c05b8a8111f0d48aea (patch)
treebeebcc1cd0fb9175f4b6a7cdc921cdec59d33904 /drivers/ata/sata_fsl.c
parentata: ahci: use sysfs_emit() (diff)
downloadlinux-ab0efc068ebf73dcec6198c05b8a8111f0d48aea.tar.xz
linux-ab0efc068ebf73dcec6198c05b8a8111f0d48aea.zip
ata: sata_fsl: use sysfs_emit()
Use sysfs_emit() instead of sprintf() in fsl_sata_intr_coalescing_show() and fsl_sata_rx_watermark_show(). Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r--drivers/ata/sata_fsl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index c5a2c1e9ed6b..ec52511ae60f 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -322,7 +322,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
static ssize_t fsl_sata_intr_coalescing_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
- return sprintf(buf, "%d %d\n",
+ return sysfs_emit(buf, "%d %d\n",
intr_coalescing_count, intr_coalescing_ticks);
}
@@ -357,9 +357,9 @@ static ssize_t fsl_sata_rx_watermark_show(struct device *dev,
spin_lock_irqsave(&host->lock, flags);
rx_watermark = ioread32(csr_base + TRANSCFG);
rx_watermark &= 0x1f;
-
spin_unlock_irqrestore(&host->lock, flags);
- return sprintf(buf, "%d\n", rx_watermark);
+
+ return sysfs_emit(buf, "%d\n", rx_watermark);
}
static ssize_t fsl_sata_rx_watermark_store(struct device *dev,