netconsole: Use sysfs_emit() instead of snprintf()
authorBreno Leitao <leitao@debian.org>
Fri, 21 Jul 2023 09:21:44 +0000 (02:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 24 Jul 2023 23:06:20 +0000 (16:06 -0700)
commit9f64b6e459d3eee73ca4ea6226653e008d1c1e61
treeedbb04abff13958a3d422f956316fe20cf2cbca4
parenta097627dcaddb90f55c1780da348bf9b56f6b4bd
netconsole: Use sysfs_emit() instead of snprintf()

According to the sysfs.rst documentation, _show() functions should only
use sysfs_emit() instead of snprintf().

Since snprintf() shouldn't be used in the sysfs _show() path, replace it
by sysfs_emit().

Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230721092146.4036622-1-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/netconsole.c