From: Mauro Carvalho Chehab Date: Tue, 28 Apr 2015 13:28:13 +0000 (-0300) Subject: [media] saa717x: fix multi-byte read code X-Git-Tag: omap-for-v4.2/fixes-rc1^2~111^2~526 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c7ba4082f903c2df3801a26bf3199544c081830;p=pandora-kernel.git [media] saa717x: fix multi-byte read code As reported by smatch: drivers/media/i2c/saa717x.c:155 saa717x_read() warn: mask and shift to zero drivers/media/i2c/saa717x.c:155 saa717x_read() warn: mask and shift to zero This is done right at saa717x_write(), but the read function is broken. Thankfully, there's just one place at saa717x driver that uses multibyte read (for status report, via printk). Yet, let's fix it. From saa717x_write(), it is clear that the bytes are in little endian: mm1[4] = (value >> 16) & 0xff; mm1[3] = (value >> 8) & 0xff; mm1[2] = value & 0xff; So, the same order should be valid for read too. Compile-tested only. Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed