mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/drv: Convert wedged event string building to seq_buf
event_string[] has a fixed size of WEDGE_STR_LEN (32) bytes. The original scnprintf()-based loop required a manual pre-flight bounds check. Replace the manual bookkeeping with seq_buf, which tracks overflow internally. seq_buf_printf() writes each "method," token into the buffer. On overflow, a warning is issued, len retains the position of the last successful write, so the trailing comma is stripped cleanly without including any partial method name in the uevent payload. Assisted-by: Claude:claude-Sonnet-4.6 Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com> Reviewed-by: Raag Jadav <raag.jadav@intel.com> Link: https://patch.msgid.link/20260823003349.587495-2-mallesh.koujalagi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
ec99b095ae
commit
8a04262e0a
1 changed files with 17 additions and 12 deletions
Loading…
Add table
Add a link
Reference in a new issue