mcb: use sysfs_emit_at() instead of scnprintf() in show functions
authorAbhinav Ananthu <abhinav.ogl@gmail.com>
Mon, 7 Jul 2025 07:47:20 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2025 12:17:07 +0000 (14:17 +0200)
commit77e49c3588689cf3c9a344c7cc80fb4e61c1375e
treeee729ce6d095d0d00552e14d5914abf9d255c83d
parentd1934ed9803c6a36280fbe5a9e91dd7df432bfe7
mcb: use sysfs_emit_at() instead of scnprintf() in show functions

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@gmail.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Reviewed-by: Johannes Thumshirn <jth@kernel.org>
Link: https://lore.kernel.org/r/20250707074720.40051-2-jth@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mcb/mcb-core.c