]> Git Repo - J-linux.git/commitdiff
mei: use sysfs_emit() in tx_queue_limit_show sysfs
authorTomas Winkler <[email protected]>
Mon, 8 Feb 2021 15:06:49 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <[email protected]>
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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,
This page took 0.074392 seconds and 4 git commands to generate.