]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: janz-cmoio: Replace snprintf in show functions with sysfs_emit
authorQing Wang <wangqing@vivo.com>
Fri, 15 Oct 2021 06:49:52 +0000 (23:49 -0700)
committerLee Jones <lee.jones@linaro.org>
Fri, 5 Nov 2021 14:40:27 +0000 (14:40 +0000)
commit0a717014d7fb8bc20ac35de0e92345227b8b947d
tree238947cb8c7df77569068417ee9e4616e918b51c
parent38d900224d873b00735397cf73bd713c22f8782a
mfd: janz-cmoio: Replace snprintf in show functions with sysfs_emit

show() must not use snprintf() when formatting the value to be
returned to user space.

Fix the following coccicheck warning:
drivers/mfd/janz-cmodio.c:157: WARNING: use scnprintf or sprintf.

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Signed-off-by: Qing Wang <wangqing@vivo.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/1634280592-4722-1-git-send-email-wangqing@vivo.com
drivers/mfd/janz-cmodio.c