linux-stable/drivers/net/dsa
Colin Ian King 12c2bb96c3 net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255
Currently the for-loop in ksz8_port_init_cnt is causing a static
analysis infinite loop warning with the comparison of
mib->cnt_ptr < dev->reg_mib_cnt. This occurs because mib->cnt_ptr
is a u8 and dev->reg_mib_cnt is an int and the analyzer determines
that mib->cnt_ptr potentially can wrap around to zero if the value
in dev->reg_mib_cnt is > 255. However, this value is never this
large, it is always less than 256 so make reg_mib_cnt a u8.

Addresses-Coverity: ("Infinite loop")
Fixes: e66f840c08 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210428120010.337959-1-colin.king@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-04-28 13:56:27 -07:00
..
b53 net: dsa: b53: spi: add missing MODULE_DEVICE_TABLE 2021-03-25 17:11:22 -07:00
hirschmann net: dsa: no longer clone skb in core driver 2021-04-27 14:10:15 -07:00
microchip net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255 2021-04-28 13:56:27 -07:00
mv88e6xxx net: dsa: no longer clone skb in core driver 2021-04-27 14:10:15 -07:00
ocelot net: mscc: ocelot: convert to ocelot_port_txtstamp_request() 2021-04-27 14:10:15 -07:00
qca net: dsa: set configure_vlan_while_not_filtering to true by default 2021-01-15 17:29:40 -08:00
sja1105 net: dsa: free skb->cb usage in core driver 2021-04-27 14:10:15 -07:00
xrs700x net: dsa: xrs700x: check if partner is same as port in hsr join 2021-03-09 16:03:37 -08:00
bcm_sf2.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
bcm_sf2.h net: dsa: bcm_sf2: setup BCM4908 internal crossbar 2021-03-12 17:06:37 -08:00
bcm_sf2_cfp.c net: dsa: propagate extack to .port_vlan_add 2021-02-14 17:38:11 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s) 2021-03-18 14:44:05 -07:00
dsa_loop.c net: dsa: propagate extack to .port_vlan_filtering 2021-02-14 17:38:12 -08:00
dsa_loop.h
dsa_loop_bdinfo.c
Kconfig dsa: simplify Kconfig symbols and dependencies 2021-03-22 12:15:37 -07:00
lan9303-core.c net: dsa: remove the transactional logic from MDB entries 2021-01-11 16:00:57 -08:00
lan9303.h
lan9303_i2c.c
lan9303_mdio.c
lantiq_gswip.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-09 20:48:35 -07:00
lantiq_pce.h
Makefile net: dsa: add Arrow SpeedChips XRS700x driver 2021-01-15 15:37:37 -08:00
mt7530.c net: dsa: mt7530: Add support for EEE features 2021-04-13 14:28:08 -07:00
mt7530.h net: dsa: mt7530: Add support for EEE features 2021-04-13 14:28:08 -07:00
mv88e6060.c
mv88e6060.h
qca8k.c net: dsa: propagate extack to .port_vlan_filtering 2021-02-14 17:38:12 -08:00
qca8k.h net: dsa: qca8k: Add 802.1q VLAN support 2020-08-03 15:45:39 -07:00
realtek-smi-core.c net: dsa: rtl8366rb: Roof MTU for switch 2020-10-10 11:25:05 -07:00
realtek-smi-core.h net: dsa: propagate extack to .port_vlan_filtering 2021-02-14 17:38:12 -08:00
rtl8366.c net: dsa: propagate extack to .port_vlan_filtering 2021-02-14 17:38:12 -08:00
rtl8366rb.c net: dsa: rtl8366rb: standardize init jam tables 2021-01-27 20:21:20 -08:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: make the MTU configurable 2020-03-27 16:07:25 -07:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx.h