linux-kernelorg-stable/drivers
Linus Torvalds 9d7a0577c9 gcc-15: disable '-Wunterminated-string-initialization' entirely for now
I had left the warning around but as a non-fatal error to get my gcc-15
builds going, but fixed up some of the most annoying warning cases so
that it wouldn't be *too* verbose.

Because I like the _concept_ of the warning, even if I detested the
implementation to shut it up.

It turns out the implementation to shut it up is even more broken than I
thought, and my "shut up most of the warnings" patch just caused fatal
errors on gcc-14 instead.

I had tested with clang, but when I upgrade my development environment,
I try to do it on all machines because I hate having different systems
to maintain, and hadn't realized that gcc-14 now had issues.

The ACPI case is literally why I wanted to have a *type* that doesn't
trigger the warning (see commit d5d45a7f2619: "gcc-15: make
'unterminated string initialization' just a warning"), instead of
marking individual places as "__nonstring".

But gcc-14 doesn't like that __nonstring location that shut gcc-15 up,
because it's on an array of char arrays, not on one single array:

  drivers/acpi/tables.c:399:1: error: 'nonstring' attribute ignored on objects of type 'const char[][4]' [-Werror=attributes]
    399 | static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst __nonstring = {
        | ^~~~~~

and my attempts to nest it properly with a type had failed, because of
how gcc doesn't like marking the types as having attributes, only
symbols.

There may be some trick to it, but I was already annoyed by the bad
attribute design, now I'm just entirely fed up with it.

I wish gcc had a proper way to say "this type is a *byte* array, not a
string".

The obvious thing would be to distinguish between "char []" and an
explicitly signed "unsigned char []" (as opposed to an implicitly
unsigned char, which is typically an architecture-specific default, but
for the kernel is universal thanks to '-funsigned-char').

But any "we can typedef a 8-bit type to not become a string just because
it's an array" model would be fine.

But "__attribute__((nonstring))" is sadly not that sane model.

Reported-by: Chris Clayton <chris2553@googlemail.com>
Fixes: 4b4bd8c50f ("gcc-15: acpi: sprinkle random '__nonstring' crumbles around")
Fixes: d5d45a7f26 ("gcc-15: make 'unterminated string initialization' just a warning")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20 15:30:53 -07:00
..
accel accel/ivpu: Add cmdq_id to job related logs 2025-04-11 12:07:44 +02:00
accessibility treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
acpi gcc-15: disable '-Wunterminated-string-initialization' entirely for now 2025-04-20 15:30:53 -07:00
amba
android
ata ata: libata-sata: Save all fields from sense data descriptor 2025-04-16 17:33:17 +09:00
atm treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
auxdisplay treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
base treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
bcma
block block-6.15-20250417 2025-04-18 09:21:14 -07:00
bluetooth Bluetooth: vhci: Avoid needless snprintf() calls 2025-04-16 16:50:47 -04:00
bus treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
cache
cdrom
cdx
char treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
clk ARM and clkdev updates for 6.15-rc1 2025-04-03 12:21:44 -07:00
clocksource RISC-V Patches for the 6.15 Merge Window, Part 1 2025-04-04 09:49:17 -07:00
comedi treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
connector
counter Char/Misc fixes for 6.15-rc1 2025-04-02 18:03:34 -07:00
cpufreq amd-pstate content for 6.15 (4/15/25) 2025-04-17 17:55:09 +02:00
cpuidle
crypto crypto: caam/qi - Fix drv_ctx refcount bug 2025-04-09 21:28:31 +08:00
cxl cxl for v6.15 2025-04-02 20:04:43 -07:00
dax
dca
devfreq
dio
dma treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
dma-buf dma-buf/sw_sync: Decrement refcount on error in sw_sync_ioctl_get_deadline() 2025-04-11 14:22:22 +02:00
dpll
edac
eisa
extcon
firewire treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
firmware sound fixes for 6.15-rc3 2025-04-17 10:14:51 -07:00
fpga fpga: tests: add module descriptions 2025-04-11 17:32:38 -07:00
fsi
fwctl fwctl: Fix repeated device word in log message 2025-04-11 20:47:45 -03:00
gnss
gpio gpiolib: Allow to use setters with return value for output-only gpios 2025-04-14 20:31:00 +02:00
gpu Merge tag 'drm-msm-fixes-2025-04-18' of https://gitlab.freedesktop.org/drm/msm into drm-fixes 2025-04-19 15:09:29 +10:00
greybus treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hid treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hsi treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hte treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hv - The 6 patch series "Enable strict percpu address space checks" from 2025-04-01 09:29:18 -07:00
hwmon treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hwspinlock
hwtracing Char/Misc/IIO driver updates for 6.15-rc1 2025-04-01 11:26:08 -07:00
i2c i2c-host-fixes for v6.15-rc3 2025-04-18 23:42:56 +02:00
i3c i3c: Add NULL pointer check in i3c_master_queue_ibi() 2025-03-31 11:44:00 +02:00
idle
iio gcc-15: add '__nonstring' markers to byte arrays 2025-04-20 11:57:54 -07:00
infiniband RDMA/bnxt_re: Remove unusable nq variable 2025-04-10 14:47:55 -03:00
input gcc-15: add '__nonstring' markers to byte arrays 2025-04-20 11:57:54 -07:00
interconnect
iommu iommu/tegra241-cmdqv: Fix warnings due to dmam_free_coherent() 2025-04-11 12:44:27 +02:00
ipack
irqchip irqchip/irq-bcm2712-mip: Enable driver when ARCH_BCM2835 is enabled 2025-04-16 14:39:25 +02:00
isdn treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
leds treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
macintosh treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mailbox treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mcb
md gcc-15: get rid of misc extra NUL character padding 2025-04-20 11:57:54 -07:00
media treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
memory treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
memstick treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
message
mfd * Maxim MAX77705: 2025-03-29 14:33:13 -07:00
misc treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mmc treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
most treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
mtd mtd: rawnand: Add status chack in r852_ready() 2025-04-07 09:02:49 +02:00
mux
net gcc-15: work around sequence-point warning 2025-04-20 11:57:54 -07:00
nfc treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
ntb Bug fixes for NTB Switchtec driver mw negative shift, Intel NTB link 2025-04-04 14:23:07 -07:00
nubus
nvdimm libnvdimm additions for 6.15 2025-04-02 20:27:18 -07:00
nvme block-6.15-20250417 2025-04-18 09:21:14 -07:00
nvmem
of Devicetree for v6.15: 2025-03-29 11:23:16 -07:00
opp
parisc
parport treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
pci Miscellaneous fixes: 2025-04-18 13:28:41 -07:00
pcmcia treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
peci
perf pci-v6.15-changes 2025-03-28 19:36:53 -07:00
phy phy-for-6.15 2025-04-01 12:47:11 -07:00
pinctrl Pin control changes for the v6.15 kernel cycle: 2025-03-29 16:59:16 -07:00
platform platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug 2025-04-16 11:15:22 +03:00
pmdomain
pnp Staging driver updates for 6.15-rc1 2025-04-02 18:09:17 -07:00
power gcc-15: get rid of misc extra NUL character padding 2025-04-20 11:57:54 -07:00
powercap
pps treewide: Convert new and leftover hrtimer_init() users 2025-04-05 10:30:17 +02:00
ps3
ptp ptp: ocp: fix start time alignment in ptp_ocp_signal_set 2025-04-16 18:23:57 -07:00
pwm pwm: A set of fixes for pwm core and various drivers 2025-04-12 08:11:19 -07:00
rapidio
ras RAS/AMD/FMPM: Get masked address 2025-04-08 19:30:58 +02:00
regulator These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
remoteproc
reset remoteproc updates for v6.15 2025-03-29 17:18:50 -07:00
rpmsg
rtc treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
s390 s390/virtio_ccw: Don't allocate/assign airqs for non-existing queues 2025-04-09 12:12:41 +02:00
sbus
scsi Merge branch '6.15/scsi-queue' into 6.15/scsi-fixes 2025-04-08 22:04:31 -04:00
sh
siox
slimbus
soc soc: drivers for 6.15, part 2 2025-04-04 09:06:32 -07:00
soundwire soundwire updates for 6.15 2025-04-01 12:43:13 -07:00
spi spi: spi-imx: Add check for spi_imx_setupxfer() 2025-04-17 12:25:12 +01:00
spmi
ssb
staging treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
target treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
tc
tee
thermal thermal: intel: int340x: Fix Panther Lake DLVR support 2025-04-15 18:57:25 +02:00
thunderbolt USB/Thunderbolt update for 6.15-rc1 2025-04-02 18:23:31 -07:00
tty treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
ufs Merge branch '6.15/scsi-queue' into 6.15/scsi-fixes 2025-04-08 22:04:31 -04:00
uio
usb treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
vdpa
vfio vfio/pci: Virtualize zero INTx PIN if no pdev->irq 2025-04-14 08:31:45 -06:00
vhost virtio: features, fixes, cleanups 2025-04-01 18:52:54 -07:00
video treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
virt treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
virtio virtio: features, fixes, cleanups 2025-04-01 18:52:54 -07:00
w1
watchdog treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
xen x86/xen: fix balloon target initialization for PVH dom0 2025-04-07 11:24:12 +02:00
zorro
Kconfig
Makefile