1. 26 4月, 2013 7 次提交
    • M
      [media] cx25821-alsa: get rid of a __must_check warning · f327cabf
      Mauro Carvalho Chehab 提交于
      The hole reason for __must_check is to not ignore an error.
      
      However, a "ret" value is used at cx25821 just to avoid the
      Kernel compilation to compain about it.
      
      That, however, produces another warning (with W=1):
      
      drivers/media/pci/cx25821/cx25821-alsa.c: In function 'cx25821_audio_fini':
      drivers/media/pci/cx25821/cx25821-alsa.c:727:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
      
      With the current implementation of driver_for_each_device() and
      cx25821_alsa_exit_callback(), there's actually just one
      very unlikely condition where it will currently produce
      an error: if driver_find() returns NULL.
      
      Ok, there's not much that can be done, as it is on a driver's
      function that returns void, but it can at least print some message
      if the error happens.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      f327cabf
    • M
      [media] cx25821-video: declare cx25821_vidioc_s_std as static · a3f17af2
      Mauro Carvalho Chehab 提交于
      Fixes the following warning:
      
      	drivers/media/pci/cx25821/cx25821-video.c: At top level:
      	drivers/media/pci/cx25821/cx25821-video.c:766:5: warning: no previous prototype for 'cx25821_vidioc_s_std' [-Wmissing-prototypes]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      a3f17af2
    • M
      [media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_cap · 66f93178
      Mauro Carvalho Chehab 提交于
      After cx25821-video cleanup, this var is not used anymore:
      
      drivers/media/pci/cx25821/cx25821-video.c: In function 'cx25821_vidioc_try_fmt_vid_cap':
      drivers/media/pci/cx25821/cx25821-video.c:591:15: warning: variable 'maxw' set but not used [-Wunused-but-set-variable]
      
      as the code now checks the max width as the default case for the
      range check.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      66f93178
    • M
      [media] r820t: Remove a warning for an unused value · 7063c145
      Mauro Carvalho Chehab 提交于
      Currently, the driver complains about the pre_detect var:
      
      	drivers/media/tuners/r820t.c: In function 'r820t_sysfreq_sel':
      	drivers/media/tuners/r820t.c:722:31: warning: variable 'pre_dect' set but not used [-Wunused-but-set-variable]
      
      While rtl8232 code comments it, perhaps some other driver may use.
      So, the better is to keep the code there, allowing to enable it
      via r820t config data.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7063c145
    • M
      [media] dib0090: Fix a warning at dib0090_set_EFUSE · 751dc8c7
      Mauro Carvalho Chehab 提交于
      The check if the values for c, h and n are within the range is
      always true, as, if one of this values is out of range, the
      previous "if" clauses will default to a value within the
      range.
      
      That fixes the following warning:
      
      	drivers/media/dvb-frontends/dib0090.c: In function 'dib0090_set_EFUSE':
      	drivers/media/dvb-frontends/dib0090.c:1545:5: warning: comparison is always true due to limited range of data type [-Wtype-limits]
      
      and makes the code easier to read.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      751dc8c7
    • M
      [media] dib8000: fix a warning · 13122f98
      Mauro Carvalho Chehab 提交于
      drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_wait_lock':
      drivers/media/dvb-frontends/dib8000.c:3972:1: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
      drivers/media/dvb-frontends/dib8000.c:2419:6: note: 'value' was declared here
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      13122f98
    • M
      [media] dib8000: Fix sub-channel range · 746f7ae0
      Mauro Carvalho Chehab 提交于
      isdbt_sb_subchannel is unsigned with 8 bits. So, it will
      never be -1. Instead, any value bigger than 13 is invalid.
      
      As is, the current code generates the following warnings:
      
      drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_set_isdbt_common_channel':
      drivers/media/dvb-frontends/dib8000.c:2358:3: warning: comparison is always true due to limited range of data type [-Wtype-limits]
      drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_tune':
      drivers/media/dvb-frontends/dib8000.c:3107:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
      drivers/media/dvb-frontends/dib8000.c:3153:9: warning: comparison is always false due to limited range of data type [-Wtype-limits]
      drivers/media/dvb-frontends/dib8000.c:3160:5: warning: comparison is always false
      
      It should also be noticed that ARIB STD-B31, item
      "3.15.6.8 Number of segments" at TMCC table defines the
      value 15 for unused segment, and 14 as reserved.
      
      So, better to change the check to consider any value
      bigger than 13 to mean that sub-channels should be
      disabled, fixing the warning and doing the right thing
      even if an invalid value is filled by userspace.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      746f7ae0
  2. 25 4月, 2013 33 次提交