OpenCloudOS-Kernel/drivers/video/fbdev/sis
Arnd Bergmann be84945440 fbdev: sisfb: hide unused variables
[ Upstream commit 688cf598665851b9e8cb5083ff1d208ce43d10ff ]

Building with W=1 shows that a couple of variables in this driver are only
used in certain configurations:

drivers/video/fbdev/sis/init301.c:239:28: error: 'SiS_Part2CLVX_6' defined but not used [-Werror=unused-const-variable=]
  239 | static const unsigned char SiS_Part2CLVX_6[] = {   /* 1080i */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:230:28: error: 'SiS_Part2CLVX_5' defined but not used [-Werror=unused-const-variable=]
  230 | static const unsigned char SiS_Part2CLVX_5[] = {   /* 750p */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:211:28: error: 'SiS_Part2CLVX_4' defined but not used [-Werror=unused-const-variable=]
  211 | static const unsigned char SiS_Part2CLVX_4[] = {   /* PAL */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:192:28: error: 'SiS_Part2CLVX_3' defined but not used [-Werror=unused-const-variable=]
  192 | static const unsigned char SiS_Part2CLVX_3[] = {  /* NTSC, 525i, 525p */
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:184:28: error: 'SiS_Part2CLVX_2' defined but not used [-Werror=unused-const-variable=]
  184 | static const unsigned char SiS_Part2CLVX_2[] = {
      |                            ^~~~~~~~~~~~~~~
drivers/video/fbdev/sis/init301.c:176:28: error: 'SiS_Part2CLVX_1' defined but not used [-Werror=unused-const-variable=]
  176 | static const unsigned char SiS_Part2CLVX_1[] = {
      |                            ^~~~~~~~~~~~~~~

This started showing up after the definitions were moved into the
source file from the header, which was not flagged by the compiler.
Move the definition into the appropriate #ifdef block that already
exists next to them.

Fixes: 5908986ef3 ("video: fbdev: sis: avoid mismatched prototypes")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:12:00 +02:00
..
300vtbl.h video: Remove set but not used variable 2020-10-16 22:52:10 +02:00
310vtbl.h
Makefile
init.c video: fbdev: sis: fix typos in SiS_GetModeID() 2022-07-26 09:16:38 +02:00
init.h
init301.c fbdev: sisfb: hide unused variables 2024-06-12 11:12:00 +02:00
init301.h
initdef.h
initextlfb.c
oem300.h
oem310.h video: fbdev: sis: Fix defined but not used warning of SiS_TVDelay 2020-11-30 20:02:50 +01:00
sis.h video: fbdev: sis: Fix defined but not used warnings 2020-11-30 19:29:40 +01:00
sis_accel.c fbdev: sisfb: fix repeated word in comment 2022-10-20 08:34:22 +02:00
sis_accel.h video: fbdev: sis: remove unneeded semicolon 2020-10-17 08:22:32 +02:00
sis_main.c fbdev: sis: Error out if pixclock equals zero 2024-03-01 13:34:48 +01:00
sis_main.h
vgatypes.h
vstruct.h fbdev: sisfb: use explicitly signed char 2022-10-24 20:28:41 +02:00