Re: [RESEND PATCH v2] scsi: core: Add 'serial' sysfs attribute for SCSI/SATA

From: Bart Van Assche

Date: Mon Feb 09 2026 - 12:31:48 EST


On 2/5/26 10:00 AM, Igor Pylypiv wrote:
+ return sysfs_emit(buf, "%s\n", buf);

Since many snprintf() variants do not allow to specify the output buffer as input argument, the above seems risky to me. Has it been considered to replace the above statement with the following?

return sysfs_emit_at(buf, strlen(buf), "\n");

Thanks,

Bart.