linux/drivers/net
Linus Torvalds ac71fabf15 gcc-15: work around sequence-point warning
The C sequence points are complicated things, and gcc-15 has apparently
added a warning for the case where an object is both used and modified
multiple times within the same sequence point.

That's a great warning.

Or rather, it would be a great warning, except gcc-15 seems to not
really be very exact about it, and doesn't notice that the modification
are to two entirely different members of the same object: the array
counter and the array entries.

So that seems kind of silly.

That said, the code that gcc complains about is unnecessarily
complicated, so moving the array counter update into a separate
statement seems like the most straightforward fix for these warnings:

  drivers/net/wireless/intel/iwlwifi/mld/d3.c: In function ‘iwl_mld_set_netdetect_info’:
  drivers/net/wireless/intel/iwlwifi/mld/d3.c:1102:66: error: operation on ‘netdetect_info->n_matches’ may be undefined [-Werror=sequence-point]
   1102 |                 netdetect_info->matches[netdetect_info->n_matches++] = match;
        |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~

  drivers/net/wireless/intel/iwlwifi/mld/d3.c:1120:58: error: operation on ‘match->n_channels’ may be undefined [-Werror=sequence-point]
   1120 |                         match->channels[match->n_channels++] =
        |                                         ~~~~~~~~~~~~~~~~~^~

side note: the code at that second warning is actively buggy, and only
works on little-endian machines that don't do strict alignment checks.

The code casts an array of integers into an array of unsigned long in
order to use our bitmap iterators.  That happens to work fine on any
sane architecture, but it's still wrong.

This does *not* fix that more serious problem.  This only splits the two
assignments into two statements and fixes the compiler warning.  I need
to get rid of the new warnings in order to be able to actually do any
build testing.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-20 11:57:54 -07:00
..
arcnet treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
bonding bonding: hold ops lock around get_link 2025-04-11 18:53:20 -07:00
caif TTY/Serial driver updates for 6.15-rc1 2025-04-02 18:17:33 -07:00
can can: rockchip_canfd: fix broken quirks checks 2025-04-15 12:23:10 +02:00
dsa net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported 2025-04-16 18:14:43 -07:00
ethernet Miscellaneous fixes: 2025-04-18 13:28:41 -07:00
fddi treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
fjes
hamradio treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hippi treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
hyperv net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
ieee802154 Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
ipa net: ipa: Enable checksum for IPA_ENDPOINT_AP_MODEM_{RX,TX} for v4.7 2025-03-04 16:19:21 -08:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-26 09:32:10 -07:00
mctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-26 09:32:10 -07:00
mdio net: mdio: mdio-i2c: Add support for single-byte SMBus operations 2025-03-25 09:10:55 -07:00
netdevsim treewide: Convert new and leftover hrtimer_init() users 2025-04-05 10:30:17 +02:00
pcs net: pcs: xpcs: re-initiate clause 37 Auto-negotiation 2025-03-05 19:02:47 -08:00
phy Including fixes from netfilter. 2025-04-10 08:52:18 -07:00
plip
ppp net: ppp: Add bound checking for skb data on ppp_sync_txmung 2025-04-10 11:24:17 +02:00
pse-pd net: pse-pd: pd692x0: Fix power limit retrieval 2025-02-18 18:30:27 -08:00
slip treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
team net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
thunderbolt
usb treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
vmxnet3 vmxnet3: unregister xdp rxq info in the reset path 2025-03-25 07:39:08 -07:00
vxlan treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
wan treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
wireguard treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
wireless gcc-15: work around sequence-point warning 2025-04-20 11:57:54 -07:00
wwan Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
xen-netback treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
Kconfig net: remove sb1000 cable modem driver 2025-03-21 17:11:54 +01:00
LICENSE.SRC
Makefile net: remove sb1000 cable modem driver 2025-03-21 17:11:54 +01:00
Space.c
amt.c net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
bareudp.c net: Use link/peer netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
dummy.c net: dummy: request ops lock 2025-04-03 15:32:08 -07:00
eql.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
geneve.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
gtp.c net: Use link/peer netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
ifb.c
loopback.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
macsec.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
macvlan.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
macvtap.c rtnetlink: Pack newlink() params into struct 2025-02-21 15:28:02 -08:00
mdio.c
mhi_net.c
mii.c
net_failover.c net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
netconsole.c netconsole: append release to sysdata 2025-03-21 18:59:25 +01:00
netkit.c netkit: Remove double invocation to clear ipvs property flag 2025-02-27 16:53:05 -08:00
nlmon.c
ntb_netdev.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
pfcp.c net: Use link/peer netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
rionet.c
sungem_phy.c
tap.c Revert "net: replace dev_addr_sem with netdev instance lock" 2025-03-19 18:52:00 +01:00
tun.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
tun_vnet.h tun: Pad virtio headers 2025-02-20 14:16:52 -08:00
veth.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
virtio_net.c Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
vrf.c net: move misc netdev_lock flavors to a separate header 2025-03-08 09:06:50 -08:00
vsockmon.c
xen-netfront.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00