From: Tomas Winkler <tomas.winkler@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs
Date: Sat, 6 Feb 2021 16:43:20 +0200 [thread overview]
Message-ID: <20210206144325.25682-1-tomas.winkler@intel.com> (raw)
Using of snprintf is discouraged in sysfs.
For simple u8 it is safe to use sprintf.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.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
next reply other threads:[~2021-02-06 14:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 14:43 Tomas Winkler [this message]
2021-02-06 14:43 ` [char-misc-next 2/6] mei: allow clients on bus to communicate in remove callback Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 3/6] mei: add support for client dma capability Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 4/6] mei: hbm: add client dma hbm messages Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 5/6] mei: implement client dma setup Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 6/6] mei: bus: add client dma interface Tomas Winkler
2021-02-06 14:48 ` Greg Kroah-Hartman
2021-02-06 15:04 ` Winkler, Tomas
2021-02-06 16:30 ` Greg Kroah-Hartman
2021-02-07 14:03 ` Winkler, Tomas
2021-02-07 14:33 ` Greg Kroah-Hartman
2021-02-07 19:04 ` Grumbach, Emmanuel
2021-02-06 14:46 ` [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs Greg Kroah-Hartman
2021-02-06 14:58 ` Winkler, Tomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210206144325.25682-1-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox