Searched hist:"9 cfbf7a6" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/tty/serial/ |
H A D | serial_core.c | 9cfbf7a6 Mon Aug 24 17:39:33 CDT 2020 Alex Dewar <alex.dewar90@gmail.com> serial: core: don't use snprintf() for formatting sysfs attrs
As per the documentation (Documentation/filesystems/sysfs.rst), snprintf() should not be used for formatting values returned by sysfs.
For all of the instances in serial_core.c, we know that the string will be <PAGE_SIZE in length, so just use sprintf().
Issue identified by Coccinelle.
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Link: https://lore.kernel.org/r/20200824223932.27709-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 9cfbf7a6 Mon Aug 24 17:39:33 CDT 2020 Alex Dewar <alex.dewar90@gmail.com> serial: core: don't use snprintf() for formatting sysfs attrs As per the documentation (Documentation/filesystems/sysfs.rst), snprintf() should not be used for formatting values returned by sysfs. For all of the instances in serial_core.c, we know that the string will be <PAGE_SIZE in length, so just use sprintf(). Issue identified by Coccinelle. Signed-off-by: Alex Dewar <alex.dewar90@gmail.com> Link: https://lore.kernel.org/r/20200824223932.27709-1-alex.dewar90@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|