1. 16 May, 2018 11 commits
    • Mauro Carvalho Chehab's avatar
      media: atomisp-gc0310: return errors at gc0310_init() · 0015b190
      Mauro Carvalho Chehab authored
      If something wrong gets there, return the error.
      
      Get rid of this warning:
      
        drivers/staging/media/atomisp/i2c/atomisp-gc0310.c: In function 'gc0310_init':
        drivers/staging/media/atomisp/i2c/atomisp-gc0310.c:713:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
          int ret;
              ^~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      0015b190
    • Mauro Carvalho Chehab's avatar
      media: atomisp: ov2680: don't declare unused vars · e5c0680f
      Mauro Carvalho Chehab authored
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function ‘__ov2680_set_exposure’:
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:400:10: warning: variable ‘hts’ set but not used [-Wunused-but-set-variable]
        u16 vts,hts;
                ^~~
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function ‘ov2680_detect’:
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:1164:5: warning: variable ‘revision’ set but not used [-Wunused-but-set-variable]
        u8 revision;
           ^~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      e5c0680f
    • Mauro Carvalho Chehab's avatar
      media: staging: atomisp: Comment out several unused sensor resolutions · db01f7cc
      Mauro Carvalho Chehab authored
      The register settings for several resolutions aren't used
      currently. So, comment them out.
      
      Fix those warnings:
      
      In file included from drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:35:0:
      drivers/staging/media/atomisp/i2c/gc2235.h:340:32: warning: 'gc2235_960_640_30fps' defined but not used [-Wunused-const-variable=]
       static struct gc2235_reg const gc2235_960_640_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/gc2235.h:287:32: warning: 'gc2235_1296_736_30fps' defined but not used [-Wunused-const-variable=]
       static struct gc2235_reg const gc2235_1296_736_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~~~~
      In file included from drivers/staging/media/atomisp/i2c/atomisp-ov2722.c:35:0:
      drivers/staging/media/atomisp/i2c/ov2722.h:999:32: warning: 'ov2722_720p_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov2722_reg const ov2722_720p_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2722.h:787:32: warning: 'ov2722_1M3_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov2722_reg const ov2722_1M3_30fps[] = {
                                      ^~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2722.h:476:32: warning: 'ov2722_VGA_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov2722_reg const ov2722_VGA_30fps[] = {
                                      ^~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2722.h:367:32: warning: 'ov2722_480P_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov2722_reg const ov2722_480P_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2722.h:257:32: warning: 'ov2722_QVGA_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov2722_reg const ov2722_QVGA_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/atomisp-ov2680.c: In function '__ov2680_set_exposure':
      In file included from drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:35:0:
      At top level:
      drivers/staging/media/atomisp/i2c/ov2680.h:736:33: warning: 'ov2680_1616x1082_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:649:33: warning: 'ov2680_1456x1096_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_1456x1096_30fps[]= {
                                       ^~~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:606:33: warning: 'ov2680_1296x976_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_1296x976_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:563:33: warning: 'ov2680_720p_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_720p_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:520:33: warning: 'ov2680_800x600_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_800x600_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:475:33: warning: 'ov2680_720x592_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_720x592_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:433:33: warning: 'ov2680_656x496_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_656x496_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:389:33: warning: 'ov2680_QVGA_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_QVGA_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:346:33: warning: 'ov2680_CIF_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_CIF_30fps[] = {
                                       ^~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov2680.h:301:33: warning: 'ov2680_QCIF_30fps' defined but not used [-Wunused-const-variable=]
        static struct ov2680_reg const ov2680_QCIF_30fps[] = {
                                       ^~~~~~~~~~~~~~~~~
      In file included from drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c:36:0:
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:988:32: warning: 'ov5693_1424x1168_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_1424x1168_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:954:32: warning: 'ov5693_2592x1944_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_2592x1944_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:889:32: warning: 'ov5693_2592x1456_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_2592x1456_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:862:32: warning: 'ov5693_1940x1096' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_1940x1096[] = {
                                      ^~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:796:32: warning: 'ov5693_1636p_30fps' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_1636p_30fps[] = {
                                      ^~~~~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:758:32: warning: 'ov5693_1296x736' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_1296x736[] = {
                                      ^~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:730:32: warning: 'ov5693_976x556' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_976x556[] = {
                                      ^~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:672:32: warning: 'ov5693_736x496' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_736x496[] = {
                                      ^~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:643:32: warning: 'ov5693_192x160' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_192x160[] = {
                                      ^~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:616:32: warning: 'ov5693_368x304' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_368x304[] = {
                                      ^~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:587:32: warning: 'ov5693_336x256' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_336x256[] = {
                                      ^~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:540:32: warning: 'ov5693_1296x976' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_1296x976[] = {
                                      ^~~~~~~~~~~~~~~
      drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:509:32: warning: 'ov5693_654x496' defined but not used [-Wunused-const-variable=]
       static struct ov5693_reg const ov5693_654x496[] = {
                                      ^~~~~~~~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      db01f7cc
    • Mauro Carvalho Chehab's avatar
      media: staging: atomisp-gc2235: don't fill an unused var · d8a665c9
      Mauro Carvalho Chehab authored
      The code with uses the dummy var is commented out. So,
      coment out its definition/initialization.
      
      Fix this warning:
      
        drivers/staging/media/atomisp/i2c/atomisp-gc2235.c: In function 'gc2235_get_intg_factor':
        drivers/staging/media/atomisp/i2c/atomisp-gc2235.c:249:26: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
          u16 reg_val, reg_val_h, dummy;
                                  ^~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      d8a665c9
    • Mauro Carvalho Chehab's avatar
      media: atomisp: ov2680.h: fix identation · 746d60e9
      Mauro Carvalho Chehab authored
      The identation for several tables there are broken.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      746d60e9
    • Mauro Carvalho Chehab's avatar
      media: staging: atomisp: reenable warnings for I2C · 8196b832
      Mauro Carvalho Chehab authored
      When atomisp got merged, there were so many warnings with W=1
      that we simply disabled the ones that were causing troubles.
      
      Since then, several changes got applied to atomisp, and the
      number of warnings are a way smaller than it used to be.
      
      So, let's reenable warnings there and fix the issues.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      8196b832
    • Mauro Carvalho Chehab's avatar
      media: staging: atomisp: get rid of __KERNEL macros · 313c5197
      Mauro Carvalho Chehab authored
      There's no sense for a Kernel driver to have __KERNEL macros
      on it.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      313c5197
    • Shaokun Zhang's avatar
      media: atomisp: fix misleading addr information · 22457cb2
      Shaokun Zhang authored
      IA_CSS_ERROR shows the ddr_buffer_addr as a decimal value with a '0x'
      prefix, which is somewhat misleading.
      
      Let's fix it to print hexadecimal, as was intended.
      
      Fixes: 158aeefc("[media] atomisp: Add __printf validation and fix fallout")
      
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarShaokun Zhang <zhangshaokun@hisilicon.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      22457cb2
    • YueHaibing's avatar
      media: staging: atomisp: Using module_pci_driver · 0de3d73b
      YueHaibing authored
      Remove boilerplate code by using macro module_pci_driver.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      0de3d73b
    • Colin Ian King's avatar
      media: atomisp: fix spelling mistake: "diregard" -> "disregard" · e6c023af
      Colin Ian King authored
      Trivial fix to spelling mistake in ia_css_print message text
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      e6c023af
    • Mauro Carvalho Chehab's avatar
      media: dvb_ca_en50221: prevent using slot_info for Spectre attacs · 4f5ab5d7
      Mauro Carvalho Chehab authored
      slot can be controlled by user-space, hence leading to
      a potential exploitation of the Spectre variant 1 vulnerability,
      as warned by smatch:
      	drivers/media/dvb-core/dvb_ca_en50221.c:1479 dvb_ca_en50221_io_write() warn: potential spectre issue 'ca->slot_info' (local cap)
      Acked-by: default avatar"Jasmin J." <jasmin@anw.at>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      4f5ab5d7
  2. 15 May, 2018 1 commit
  3. 14 May, 2018 10 commits
  4. 11 May, 2018 18 commits