• Li Zhijian's avatar
    HID: hid-picolcd*: Convert sprintf() family to sysfs_emit() family · 247481b8
    Li Zhijian authored
    Per filesystems/sysfs.rst, show() should only use sysfs_emit()
    or sysfs_emit_at() when formatting the value to be returned to user space.
    
    coccinelle complains that there are still a couple of functions that use
    snprintf(). Convert them to sysfs_emit().
    
    sprintf() and scnprintf() will be converted as well if they have.
    
    Generally, this patch is generated by
    make coccicheck M=<path/to/file> MODE=patch \
    COCCI=scripts/coccinelle/api/device_attr_show.cocci
    
    No functional change intended
    
    CC: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    CC: "Bruno Prémont" <bonbons@linux-vserver.org>
    CC: Jiri Kosina <jikos@kernel.org>
    CC: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    CC: linux-input@vger.kernel.org
    Signed-off-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
    247481b8
hid-picolcd_fb.c 15.4 KB