]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l: rcar_fdp1: use %4.4s to format a 4-byte string
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Mon, 26 Dec 2016 13:31:39 +0000 (11:31 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 3 Feb 2017 13:50:40 +0000 (11:50 -0200)
commita1e1f01a551dea96feb18c6390cdc18e0a019ae3
tree9b722b7ec8ce55abbb0ad51ca8b658ae0d247b58
parente026e5cc6f0e77c9d97255d0df4b92072c899642
[media] v4l: rcar_fdp1: use %4.4s to format a 4-byte string

Using %4s to format f->fmt.pix_mp.pixelformat in fdp1_try_fmt() and
fdp1_s_fmt() may lead to more characters being printed (when the byte
following field pixelformat is not zero).

Add ".4" to the format specifier to limit the number of printed
characters to four. The resulting format specifier "%4.4s" is also used
by other media drivers to print pixelformat value.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Reviewed-by: Kieran Bingham <kieran@bingham.xyz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar_fdp1.c