summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2021-02-08 17:06:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-09 09:30:28 +0100
commite666b79e22958564fc23e32bb67ef57b21729067 (patch)
treea4b311296cd7bb0d861a24144237eb09c443213c /drivers/misc/mei
parentb398d53cd421454d64850f8b1f6d609ede9042d9 (diff)
downloadlinux-stable-e666b79e22958564fc23e32bb67ef57b21729067.tar.gz
linux-stable-e666b79e22958564fc23e32bb67ef57b21729067.tar.bz2
linux-stable-e666b79e22958564fc23e32bb67ef57b21729067.zip
mei: use sysfs_emit() in tx_queue_limit_show sysfs
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>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r--drivers/misc/mei/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 9f6682033ed7..28937b6e7e0c 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -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,