2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/drivers/media/pci
Mauro Carvalho Chehab 318de7911f cx18: use macros instead of static const vars
Gcc 6.1 now complains about unused vars:

drivers/media/pci/cx18/cx18-driver.h:497:18: warning: 'vbi_hblank_samples_50Hz' defined but not used [-Wunused-const-variable=]
 static const u32 vbi_hblank_samples_50Hz = 284; /* 4 byte EAV + 280 anc/fill */
                  ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/cx18/cx18-driver.h:496:18: warning: 'vbi_hblank_samples_60Hz' defined but not used [-Wunused-const-variable=]
 static const u32 vbi_hblank_samples_60Hz = 272; /* 4 byte EAV + 268 anc/fill */
                  ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/media/pci/cx18/cx18-cards.c:25:0:
drivers/media/pci/cx18/cx18-driver.h:497:18: warning: 'vbi_hblank_samples_50Hz' defined but not used [-Wunused-const-variable=]
 static const u32 vbi_hblank_samples_50Hz = 284; /* 4 byte EAV + 280 anc/fill */
                  ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/cx18/cx18-driver.h:496:18: warning: 'vbi_hblank_samples_60Hz' defined but not used [-Wunused-const-variable=]
 static const u32 vbi_hblank_samples_60Hz = 272; /* 4 byte EAV + 268 anc/fill */
                  ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/cx18/cx18-driver.h:495:18: warning: 'vbi_active_samples' defined but not used [-Wunused-const-variable=]
 static const u32 vbi_active_samples = 1444; /* 4 byte SAV + 720 Y + 720 U/V */
                  ^~~~~~~~~~~~~~~~~~

In this specific case, this is somewhat intentional, as those
values are actually used in parts of the driver. The code assumes
that gcc optimizer it and not actually create any var, but convert
it to immediate access at the routines.

Yet, as we want to shut up gcc warnings, let's use #define, with
is the standard way to store values that will use assembler's
immediate access code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-24 08:50:24 -03:00
..
b2c2 [media] media: change email address 2016-01-25 12:01:08 -02:00
bt8xx [media] bttv: Width must be a multiple of 16 when capturing planar formats 2016-03-01 10:36:24 -03:00
cobalt [media] cobalt: add MTD dependency 2016-04-13 17:08:51 -03:00
cx18 cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx88 [media] add media controller support to videobuf2-dvb 2016-02-10 07:23:41 -02:00
cx23885 [media] cx23885: uninitialized variable in cx23885_av_work_handler() 2016-04-13 17:10:32 -03:00
cx25821 [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
ddbridge [media] constify stv6110x_devctl structure 2016-02-01 07:31:17 -02:00
dm1105 [media] dm1105: Remove unnecessary synchronize_irq() before free_irq() 2015-12-03 15:09:28 -02:00
dt3155 [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
ivtv [media] ivtv/cx18: use the new mask variants of the v4l2_device_call_* defines 2016-04-20 16:09:31 -03:00
mantis [media] mantis: Fix error handling in mantis_dma_init() 2015-08-19 07:04:55 -03:00
meye [media] meye: embed video_device 2015-04-02 23:35:01 -03:00
netup_unidvb [media] Change frontend allocation strategy for NetUP Universal DVB cards 2016-06-07 12:16:37 -03:00
ngene [media] constify stv6110x_devctl structure 2016-02-01 07:31:17 -02:00
pluto2 [media] media_tree: Fix spelling errors 2013-12-09 14:50:50 -02:00
pt1 [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
pt3 [media] pt3: fix device identification 2016-03-01 12:01:45 -03:00
saa7134 [media] saa7134: fix warning with !MEDIA_CONTROLLER 2016-03-03 14:12:46 -03:00
saa7146 [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
saa7164 various: fix pci_set_dma_mask return value checking 2015-11-20 16:17:32 -08:00
smipcie [media] smipcie: add RC map into card configuration options 2016-05-07 10:27:18 -03:00
solo6x10 [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
sta2x11 [media] sta2x11: remove unused vars 2016-04-25 08:13:43 -03:00
ttpci [media] ttpci: cleanup a bogus smatch warning 2016-02-23 07:26:22 -03:00
tw68 [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
tw686x [media] tw686x: avoid going past array 2016-04-26 06:38:53 -03:00
zoran [media] drivers/media/pci/zoran: avoid fragile snprintf use 2016-05-07 10:27:07 -03:00
Kconfig [media] media: Support Intersil/Techwell TW686x-based video capture cards 2016-04-20 13:37:32 -03:00
Makefile [media] media: Support Intersil/Techwell TW686x-based video capture cards 2016-04-20 13:37:32 -03:00