linux/drivers/net
Linus Torvalds 4477b39c32 minmax: add a few more MIN_T/MAX_T users
Commit 3a7e02c040 ("minmax: avoid overly complicated constant
expressions in VM code") added the simpler MIN_T/MAX_T macros in order
to avoid some excessive expansion from the rather complicated regular
min/max macros.

The complexity of those macros stems from two issues:

 (a) trying to use them in situations that require a C constant
     expression (in static initializers and for array sizes)

 (b) the type sanity checking

and MIN_T/MAX_T avoids both of these issues.

Now, in the whole (long) discussion about all this, it was pointed out
that the whole type sanity checking is entirely unnecessary for
min_t/max_t which get a fixed type that the comparison is done in.

But that still leaves min_t/max_t unnecessarily complicated due to
worries about the C constant expression case.

However, it turns out that there really aren't very many cases that use
min_t/max_t for this, and we can just force-convert those.

This does exactly that.

Which in turn will then allow for much simpler implementations of
min_t()/max_t().  All the usual "macros in all upper case will evaluate
the arguments multiple times" rules apply.

We should do all the same things for the regular min/max() vs MIN/MAX()
cases, but that has the added complexity of various drivers defining
their own local versions of MIN/MAX, so that needs another level of
fixes first.

Link: https://lore.kernel.org/all/b47fad1d0cf8449886ad148f8c013dae@AcuMS.aculab.com/
Cc: David Laight <David.Laight@aculab.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-07-28 13:41:14 -07:00
..
arcnet net: arcnet: com20020-isa: add missing MODULE_DESCRIPTION() macro 2024-06-19 17:21:12 -07:00
bonding net: bonding: correctly annotate RCU in bond_should_notify_peers() 2024-07-23 15:13:12 +02:00
caif caif_virtio: use virtio_find_single_vq() for single virtqueue finding 2024-07-17 05:20:56 -04:00
can net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
dsa net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports 2024-07-18 13:09:12 +02:00
ethernet minmax: add a few more MIN_T/MAX_T users 2024-07-28 13:41:14 -07:00
fddi
fjes
hamradio parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
hippi
hyperv
ieee802154
ipa
ipvlan
mctp net: mctp-i2c: invalidate flows immediately on TX errors 2024-07-12 13:37:31 +01:00
mdio net: mdio: mscc-miim: Handle the switch reset 2024-06-21 12:12:42 +01:00
netdevsim net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
pcs net: pcs: xpcs: Add fwnode-based descriptor creation method 2024-07-05 09:35:51 +01:00
phy Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
plip parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
ppp ppp: reject claimed-as-LCP but actually malformed packets 2024-07-11 11:00:08 +02:00
pse-pd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-07-15 13:19:17 -07:00
slip
team
thunderbolt
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-06-27 12:14:11 -07:00
vmxnet3
vxlan vxlan: Pull inner IP header in vxlan_xmit_one(). 2024-06-21 17:34:15 -07:00
wan
wireguard wireguard: send: annotate intentional data race in checking empty queue 2024-07-05 17:21:10 -07:00
wireless Thermal control fix for 6.11-rc1 2024-07-22 12:13:48 -07:00
wwan Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
xen-netback
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-07-15 13:19:17 -07:00
netkit.c
nlmon.c
ntb_netdev.c net: ntb_netdev: Move ntb_netdev_rx_handler() to call netif_rx() from __netif_rx() 2024-07-02 18:56:46 -07:00
pfcp.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tap: add missing verification for short frame 2024-07-25 08:07:05 -07:00
tun.c tun: add missing verification for short frame 2024-07-25 08:07:05 -07:00
veth.c
virtio_net.c virtio: features, fixes, cleanups 2024-07-19 11:57:55 -07:00
vrf.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
vsockmon.c
xen-netfront.c