media: v4l: Avoid unaligned access warnings when printing 4cc modifiers
Pointers V4L2 pixelformat and dataformat fields in a few packed structs are directly passed to printk family of functions. This could result in an unaligned access albeit no such possibility appears to exist at the moment i.e. this clang warning appears to be a false positive. Address the warning by copying the pixelformat or dataformat value to a local variable first. Reported-by: Nkernel test robot <lkp@intel.com> Fixes: e927e1e0 ("v4l: ioctl: Use %p4cc printk modifier to print FourCC codes") Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
Showing
想要评论请 注册 或 登录