[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5331758a-528b-42bc-b57a-5735a8b6e4f8@kernel.org>
Date: Tue, 8 Jul 2025 10:15:02 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Jonathan Velez <jonvelez12345@...il.com>, cassel@...nel.org
Cc: linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org, shuah@...nel.org
Subject: Re: [PATCH] ata: libata-transport: replace scnprintf with sysfs_emit
for simple attributes
On 7/7/25 9:20 PM, Jonathan Velez wrote:
> sprintf, snprintf, and scnprintf do not consider the PAGE_SIZE maximum
> of the temporary buffer used for outputting sysfs content and they may
> overrun the PAGE_SIZE buffer length.
>
> To avoid output defects with the ATA transport class simple attributes,
> scnprintf() was converted to sysfs_emit(). This aligns with the sysfs
> guidance provided in Documentation/filesystems/sysfs.rst.
Nit: please use assertive style (no past tense/passive form)
To avoid output defects with the ATA transport class simple attributes,
use sysfs_emit instead of scnprintf().
>
> Signed-off-by: Jonathan Velez <jonvelez12345@...il.com>
Otherwise, looks good.
Reviewed-by: Damien Le Moal <dlemoal@...nel.org>
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists