]> git.baikalelectronics.ru Git - kernel.git/commit
sfp: use precision to print non-null terminated strings
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 29 Dec 2017 12:15:12 +0000 (12:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 02:45:32 +0000 (21:45 -0500)
commit786eb2c45601bdb99cee8b57669516eeed1e3dba
treea30b7b392e14346881d970029861af6b36fca00b
parentfda5f43ca44e706e77ffa8b220253a6c033eaa54
sfp: use precision to print non-null terminated strings

Rather than memcpy()'ing the strings and null terminate them, printf
allows non-NULL terminated strings provided the precision is not more
than the size of the buffer.  Use this form to print the basic module
information rather than copying and terminating the strings.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c