RE: [PATCH] edac: Use sysfs_emit_at() in dimmdev_location_show()

From: Zhuo, Qiuxu
Date: Sun Jun 22 2025 - 21:57:32 EST


> From: Abhinav Ananthu <abhinav.ogl@xxxxxxxxx>
> Sent: Friday, June 20, 2025 4:22 AM
> To: bp@xxxxxxxxx
> Cc: Luck, Tony <tony.luck@xxxxxxxxx>; james.morse@xxxxxxx;
> mchehab@xxxxxxxxxx; rric@xxxxxxxxxx; linux-edac@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Abhinav Ananthu <abhinav.ogl@xxxxxxxxx>
> Subject: [PATCH] edac: Use sysfs_emit_at() in dimmdev_location_show()
>
> Replace the use of scnprintf() with sysfs_emit_at() in
> dimmdev_location_show() to format the output into the sysfs buffer.
>
> This change improves clarity and ensures proper bounds checking in line with
> the preferred sysfs_emit() API usage for sysfs 'show'
> functions. The PAGE_SIZE check is now handled internally by the helper.
>
> No functional change intended.
>
> Signed-off-by: Abhinav Ananthu <abhinav.ogl@xxxxxxxxx>

LGTM. Thanks.

Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>