mei: use sysfs_emit() in tx_queue_limit_show sysfs
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 8 Feb 2021 15:06:49 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Feb 2021 08:30:28 +0000 (09:30 +0100)
Using of snprintf is discouraged in sysfs use the new sysfs_emit() API.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20210208150649.141358-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c

index 9f6682033ed7eb9bda9759504ff5d6a6b5913727..28937b6e7e0ca199ac4e9fc02e289b3b81d24973 100644 (file)
@@ -1026,7 +1026,7 @@ static ssize_t tx_queue_limit_show(struct device *device,
        size = dev->tx_queue_limit;
        mutex_unlock(&dev->device_lock);
 
-       return snprintf(buf, PAGE_SIZE, "%u\n", size);
+       return sysfs_emit(buf, "%u\n", size);
 }
 
 static ssize_t tx_queue_limit_store(struct device *device,