ata: ahci: use sysfs_emit()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 2 Dec 2021 06:02:17 +0000 (15:02 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tue, 4 Jan 2022 11:00:12 +0000 (20:00 +0900)
Use sysfs_emit() instead of sprintf in remapped_nvme_show().

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/ahci.c

index 1e1167e..98d04a7 100644 (file)
@@ -1657,7 +1657,7 @@ static ssize_t remapped_nvme_show(struct device *dev,
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
 
-       return sprintf(buf, "%u\n", hpriv->remapped_nvme);
+       return sysfs_emit(buf, "%u\n", hpriv->remapped_nvme);
 }
 
 static DEVICE_ATTR_RO(remapped_nvme);