[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <2E579B6D-4398-479F-8E18-31E8AEFBFB2A@gmail.com>
Date: Wed, 9 Jul 2025 09:16:56 -0400
From: Jonathan Velez <jonvelez12345@...il.com>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: cassel@...nel.org,
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 Jul 7, 2025, at 9:15 PM, Damien Le Moal <dlemoal@...nel.org> wrote:
>
> 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().
I will amend the commit message and submit V2 of the patch.
>
>>
>> Signed-off-by: Jonathan Velez <jonvelez12345@...il.com>
>
> Otherwise, looks good.
>
> Reviewed-by: Damien Le Moal <dlemoal@...nel.org>
Thank you, I’m considering reviewing the rest of the libata-transport.c module for similar updates. Thoughts?
> --
> Damien Le Moal
> Western Digital Research
Powered by blists - more mailing lists