[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210206144325.25682-1-tomas.winkler@intel.com>
Date: Sat, 6 Feb 2021 16:43:20 +0200
From: Tomas Winkler <tomas.winkler@...el.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@...el.com>,
linux-kernel@...r.kernel.org,
Tomas Winkler <tomas.winkler@...el.com>
Subject: [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs
Using of snprintf is discouraged in sysfs.
For simple u8 it is safe to use sprintf.
Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
---
drivers/misc/mei/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 9f6682033ed7..24a05f45b639 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 sprintf(buf, "%u\n", size);
}
static ssize_t tx_queue_limit_store(struct device *device,
--
2.26.2
Powered by blists - more mailing lists