1. 26 Sep, 2020 29 commits
  2. 23 Sep, 2020 2 commits
    • Mauro Carvalho Chehab's avatar
      media: atomisp: cleanup __printf() atributes on printk messages · 01cc2ec6
      Mauro Carvalho Chehab authored
      There are still some warnings produced by -Wsuggest-attribute=format,
      like this one:
      
      	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function ‘dtrace_dot’:
      	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2466:2: warning: function ‘dtrace_dot’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
      	 2466 |  ia_css_debug_vdtrace(IA_CSS_DEBUG_INFO, fmt, ap);
      	      |  ^~~~~~~~~~~~~~~~~~~~
      
      Also, on some places, is is using __atribute, while on others it
      is using the __printf() macro.
      
      Uniform those to always use the __printf() macro, placing it
      before the function, and fix the logic in order to cleanup
      all such warnings.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      01cc2ec6
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix gcc warnings · 8e3d5d4b
      Mauro Carvalho Chehab authored
      Depending on the gcc version, after changeset
      72a9ff3b ("media: atomisp: get rid of -Wsuggest-attribute=format warnings"),
      we're now getting two warnings, which are breaking the Jenkins
      CI instance at https://builder.linuxtv.org:
      
      	../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function ‘__set_css_print_env’:
      	../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:860:50: error: assignment to ‘int (*)(const char *, char *)’ from incompatible pointer type ‘int (__attribute__((regparm(0))) *)(const char *, char *)’ [-Werror=incompatible-pointer-types]
      	   isp->css_env.isp_css_env.print_env.debug_print = vprintk;
      	                                                  ^
      	../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: In function ‘atomisp_css_load_firmware’:
      	../drivers/staging/media/atomisp/pci/atomisp_compat_css20.c:893:49: error: assignment to ‘int (*)(const char *, char *)’ from incompatible pointer type ‘int (__attribute__((regparm(0))) *)(const char *, char *)’ [-Werror=incompatible-pointer-types]
      	  isp->css_env.isp_css_env.print_env.error_print = vprintk;
                                                       ^
      	cc1: some warnings being treated as errors
      
      So, we need to partially revert the patch.
      
      Fixes: 72a9ff3b ("media: atomisp: get rid of -Wsuggest-attribute=format warnings")
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      8e3d5d4b
  3. 22 Sep, 2020 6 commits
  4. 17 Sep, 2020 3 commits
    • Mauro Carvalho Chehab's avatar
      media: vidtv: remove an impossible condition · 9e76f2cf
      Mauro Carvalho Chehab authored
      As warned by smatch:
      
      	drivers/media/test-drivers/vidtv/vidtv_psi.c:93 vidtv_psi_update_version_num() warn: impossible condition '(h->version > 32) => (0-31 > 32)'
      
      h_version is declared as:
      
      		u8  version:5;
      
      Meaning that its value ranges from 0 to 31. Incrementing 31 on such
      data will overflow to zero, as expected.
      
      So, just drop the uneeded overflow check.
      
      While here, use "foo++" instead of "++foo", as this is a much
      more common pattern.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      9e76f2cf
    • Mauro Carvalho Chehab's avatar
      media: vidtv: cleanup the logic which estimates buffer size · ad458524
      Mauro Carvalho Chehab authored
      There's no need to use u64 over there. In a matter of fact,
      the div is not even needed, as it is multiplying by 1000 and
      dividing by 1000.
      
      So, simplify the logic.
      
      While here, constrain the buffer size to a certain range
      (between the current value and 10 times it)
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      ad458524
    • Daniel W. S. Almeida's avatar
      media: vidtv: fix build on 32bit architectures · 37b288f5
      Daniel W. S. Almeida authored
      Fix the following error for builds on 32bit architectures:
      
      ERROR: modpost: "__udivdi3"
      [drivers/media/test-drivers/vidtv/dvb-vidtv-bridge.ko] undefined!
      
      Which is due to 64bit divisions that did not go through the helpers
      in linux/math64.h
      
      As vidtv_mux_check_mux_rate was not operational in its current form,
      drop the entire function while it is not fixed properly.
      
      For now, call vidtv_mux_pad_with_nulls with a constant number of packets
      to avoid warnings due to unused functions when building this driver.
      
      The 64bit division used in the s302m is not needed, remove them and use
      a fixed number of frames and a constant PTS increment instead.
      
      Fixes: f90cf607 ("media: vidtv: add a bridge driver")
      Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      37b288f5