linux/drivers/media/tuners
Mauro Carvalho Chehab f7d84fa704 media: tw5864, fc0011: better handle WARN_ON()
As such macro will check if the expression is true, it may fall through, as
warned:

In file included from ./include/uapi/linux/stddef.h:1:0,
                 from ./include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from ./include/uapi/linux/types.h:13,
                 from ./include/linux/types.h:5,
                 from ./drivers/media/dvb-core/dvb_frontend.h:35,
                 from drivers/media/tuners/fc0011.h:4,
                 from drivers/media/tuners/fc0011.c:20:
drivers/media/tuners/fc0011.c: In function 'fc0011_set_params':
./include/linux/compiler.h:179:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:109:2: note: in expansion of macro 'unlikely'
  unlikely(__ret_warn_on);     \
  ^~~~~~~~
drivers/media/tuners/fc0011.c:344:3: note: in expansion of macro 'WARN_ON'
   WARN_ON(1);
   ^~~~~~~
drivers/media/tuners/fc0011.c:345:2: note: here
  case 0:
  ^~~~
In file included from ./include/uapi/linux/stddef.h:1:0,
                 from ./include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from ./include/uapi/linux/types.h:13,
                 from ./include/linux/types.h:5,
                 from ./include/linux/list.h:4,
                 from ./include/linux/module.h:9,
                 from drivers/media/pci/tw5864/tw5864-video.c:17:
drivers/media/pci/tw5864/tw5864-video.c: In function 'tw5864_fmt_vid_cap':
./include/linux/compiler.h:179:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
 # define unlikely(x) __builtin_expect(!!(x), 0)
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/bug.h:68:2: note: in expansion of macro 'unlikely'
  unlikely(__ret_warn_on);    \
  ^~~~~~~~
drivers/media/pci/tw5864/tw5864-video.c:547:3: note: in expansion of macro 'WARN_ON_ONCE'
   WARN_ON_ONCE(1);
   ^~~~~~~~~~~~
drivers/media/pci/tw5864/tw5864-video.c:548:2: note: here
  case STD_NTSC:
  ^~~~

On both cases, it means an error, so, let's return an error
code, to make gcc happy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-24 16:19:27 -03:00
..
e4000_priv.h
e4000.c
e4000.h
fc001x-common.h
fc0011.c media: tw5864, fc0011: better handle WARN_ON() 2017-06-24 16:19:27 -03:00
fc0011.h
fc0012-priv.h
fc0012.c
fc0012.h
fc0013-priv.h
fc0013.c
fc0013.h
fc2580_priv.h
fc2580.c
fc2580.h
it913x.c
it913x.h
Kconfig
m88rs6000t.c
m88rs6000t.h
Makefile
max2165_priv.h
max2165.c
max2165.h
mc44s803_priv.h
mc44s803.c
mc44s803.h
msi001.c
mt20xx.c
mt20xx.h
mt2060_priv.h
mt2060.c
mt2060.h
mt2063.c
mt2063.h
mt2131_priv.h
mt2131.c
mt2131.h
mt2266.c
mt2266.h
mxl301rf.c
mxl301rf.h
mxl5005s.c media: tuners: mxl5005s: remove useless variable assignments 2017-06-24 15:29:33 -03:00
mxl5005s.h
mxl5007t.c
mxl5007t.h
qm1d1c0042.c
qm1d1c0042.h
qt1010_priv.h
qt1010.c
qt1010.h
r820t.c
r820t.h
si2157_priv.h [media] si2157: Add support for Si2141-A10 2017-04-14 22:27:47 -03:00
si2157.c [media] si2157: Add support for Si2141-A10 2017-04-14 22:27:47 -03:00
si2157.h
tda827x.c
tda827x.h
tda8290.c
tda8290.h
tda9887.c
tda9887.h
tda18212.c
tda18212.h
tda18218_priv.h
tda18218.c
tda18218.h
tda18271-common.c
tda18271-fe.c [media] media drivers: annotate fall-through 2017-05-19 07:10:03 -03:00
tda18271-maps.c
tda18271-priv.h
tda18271.h
tea5761.c
tea5761.h
tea5767.c
tea5767.h
tua9001_priv.h
tua9001.c
tua9001.h
tuner-i2c.h
tuner-simple.c
tuner-simple.h
tuner-types.c
tuner-xc2028-types.h
tuner-xc2028.c
tuner-xc2028.h
xc4000.c
xc4000.h
xc5000.c [media] xc5000: Don't spin waiting for analog lock 2017-06-06 07:51:05 -03:00
xc5000.h