[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025070154-cringe-tidings-20f5@gregkh>
Date: Tue, 1 Jul 2025 12:27:38 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Pranav Tyagi <pranav.tyagi03@...il.com>
Cc: linux-kernel@...r.kernel.org, chentao@...inos.cn,
skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linux.dev
Subject: Re: [PATCH] firmware/memmap: use scnprintf() in show funcs
On Fri, Jun 13, 2025 at 07:14:49PM +0530, Pranav Tyagi wrote:
> Replace all snprintf() instances with scnprintf(). snprintf() returns
> the number of bytes that would have been written had there been enough
> space. For sysfs attributes, snprintf() should not be used for the
> show() method. Instead use scnprintf() which returns the number of bytes
> actually written.
for sysfs attributes, sysfs_emit() should be used instead. Why not do
that here?
But what is wrong with the current code? Is it not working properly?
thanks,
greg k-h
Powered by blists - more mailing lists