1. 23 3月, 2018 5 次提交
    • M
      media: v4l2-ioctl: fix some "too small" warnings · 912d2f82
      Mauro Carvalho Chehab 提交于
      While the code there is right, it produces three false positives:
      	drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383)
      	drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383)
      	drivers/media/v4l2-core/v4l2-ioctl.c:2876 video_usercopy() error: memset() 'parg' too small (128 vs 16383)
      
      Store the ioctl size on a cache var, in order to suppress those.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      912d2f82
    • M
      media: v4l2-tpg-core: avoid buffer overflows · 1a086879
      Mauro Carvalho Chehab 提交于
      Fix the following warnings:
      	drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1146 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8
      	drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1152 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      1a086879
    • M
      media: ov5670: get rid of a series of __be warnings · baa6f19b
      Mauro Carvalho Chehab 提交于
      There are some troubles on this driver with respect to the usage
      of __be16 and __b32 macros:
      
      	drivers/media/i2c/ov5670.c:1857:27: warning: incorrect type in initializer (different base types)
      	drivers/media/i2c/ov5670.c:1857:27:    expected unsigned short [unsigned] [usertype] reg_addr_be
      	drivers/media/i2c/ov5670.c:1857:27:    got restricted __be16 [usertype] <noident>
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1880:16: warning: cast to restricted __be32
      	drivers/media/i2c/ov5670.c:1901:13: warning: incorrect type in assignment (different base types)
      	drivers/media/i2c/ov5670.c:1901:13:    expected unsigned int [unsigned] [usertype] val
      	drivers/media/i2c/ov5670.c:1901:13:    got restricted __be32 [usertype] <noident>
      
      Fix them.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      baa6f19b
    • M
      media: rca: declare formats var as static · 43d1ed08
      Mauro Carvalho Chehab 提交于
      As warned:
      	drivers/media/platform/rockchip/rga/rga.c:210:16: warning: symbol 'formats' was not declared. Should it be static?
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      43d1ed08
    • M
      media: vpss: fix annotations for vpss_regs_base2 · 8395597f
      Mauro Carvalho Chehab 提交于
      Fix those warnings:
      
      	drivers/media/platform/davinci/vpss.c:510:25: warning: incorrect type in argument 1 (different address spaces)
      	drivers/media/platform/davinci/vpss.c:510:25:    expected void volatile [noderef] <asn:2>*addr
      	drivers/media/platform/davinci/vpss.c:510:25:    got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2
      	drivers/media/platform/davinci/vpss.c:520:34: warning: incorrect type in assignment (different address spaces)
      	drivers/media/platform/davinci/vpss.c:520:34:    expected unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2
      	drivers/media/platform/davinci/vpss.c:520:34:    got void [noderef] <asn:2>*
      	drivers/media/platform/davinci/vpss.c:522:54: warning: incorrect type in argument 2 (different address spaces)
      	drivers/media/platform/davinci/vpss.c:522:54:    expected void volatile [noderef] <asn:2>*addr
      	drivers/media/platform/davinci/vpss.c:522:54:    got unsigned int [usertype] *static [toplevel] [assigned] vpss_regs_base2
      
      Weird enough, vpss_regs_base0 and vpss_regs_base1 were
      properly annotated.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      8395597f
  2. 22 3月, 2018 35 次提交