alistair23-linux/drivers/misc
Ian Munsie 2cd55c68c0 cxl: Fix build failure due to -Wunused-variable behaviour change
A recent change in gcc caused this build failure:

/var/lib/jenkins/workspace/gcc_kernel_build/linux/drivers/misc/cxl/cxl.h:72:27:
error: ‘CXL_PSL_DLCNTL’ defined but not used [-Werror=unused-const-variable]
 static const cxl_p1_reg_t CXL_PSL_DLCNTL  = {0x0060};

Because of this gcc commit:

Commit 1bca8cbd0c68366f07277f98ce6963e10c2aa617 by mark
PR28901 -Wunused-variable ignores unused const initialised variables in C
12 years ago it was decided that -Wunused-variable shouldn't warn about
static const variables because some code used const static char rcsid[]
strings which were never used but wanted in the code anyway. But as the
bug points out this hides some real bugs. These days the usage of
rcsids is not very popular anymore. So this patch changes the default
to warn about unused static const variables in C with
-Wunused-variable. And it adds a new option -Wno-unused-const-variable
to turn this warning off. For C++ this new warning is off by default,
since const variables can be used as #defines in C++. New testcases for
the new defaults in C and C++ are included testing the new warning and
suppressing it with an unused attribute or using
-Wno-unused-const-variable. gcc/ChangeLog

The cxl driver uses static consts in place of #defines in some cases
for type safety, so this change causes the driver to fail to build on
new copilers as these constants are not all used in every file that
imports the header. Suppress the warning for this driver to return to
the old behaviour of -Wunused-variable.

Reported-by: Anton Blanchard <anton@au1.ibm.com>
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-09-15 19:33:51 +10:00
..
altera-stapl drivers/misc/altera-stapl/altera.c: remove extraneous KERN_INFO prefix 2015-06-25 17:00:38 -07:00
c2port
cb710
cxl cxl: Fix build failure due to -Wunused-variable behaviour change 2015-09-15 19:33:51 +10:00
echo
eeprom Merge 4.2-rc6 into char-misc-next 2015-08-09 16:28:09 -07:00
genwqe
ibmasm
lis3lv02d misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
mei mei: remove check on pm_runtime_active in __mei_cl_disconnect 2015-08-04 21:58:47 -07:00
mic misc: mic: scif bug fix for vmalloc_to_page crash 2015-07-22 21:25:36 -07:00
sgi-gru
sgi-xp
ti-st ti-st: st_kim: use gpio_set_value_cansleep to fix warning 2015-08-05 13:24:36 -07:00
vmw_vmci char: make misc_deregister a void function 2015-08-05 10:35:49 -07:00
ad525x_dpot-i2c.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
apds9802als.c
arm-charlcd.c
atmel-ssc.c
atmel_tclib.c
bh1770glc.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
bh1780gli.c
bmp085-i2c.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
bmp085-spi.c
bmp085.c
bmp085.h
cs5535-mfgpt.c
ds1682.c misc: ds1682: clean up ds1682_eeprom_read() and ds1682_eeprom_write() 2015-08-05 13:53:39 -07:00
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ics932s401.c
ioc4.c
isl29003.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
isl29020.c
Kconfig ARM: qcom: Add coincell charger driver 2015-07-29 13:37:18 -07:00
kgdbts.c clone: support passing tls argument via C rather than pt_regs magic 2015-06-25 17:00:38 -07:00
lattice-ecp3-config.c
lkdtm.c
Makefile ARM: qcom: Add coincell charger driver 2015-07-29 13:37:18 -07:00
pch_phub.c
phantom.c
pti.c
qcom-coincell.c ARM: qcom: Add coincell charger driver 2015-07-29 13:37:18 -07:00
spear13xx_pcie_gadget.c Pratyush Anand has moved 2015-06-25 17:00:38 -07:00
sram.c genalloc: add name arg to gen_pool_get() and devm_gen_pool_create() 2015-09-04 16:54:41 -07:00
ti_dac7512.c
tifm_7xx1.c
tifm_core.c
tsl2550.c misc: Drop owner assignment from i2c_driver 2015-07-27 10:30:48 -07:00
vexpress-syscfg.c
vmw_balloon.c VMware balloon: Add support for balloon capabilities. 2015-08-05 13:17:53 -07:00