Files
linux-stable-mirror/drivers
Jakub KicinskiandGreg Kroah-Hartman 340cf91293 eth: tg3: silence the GCC 12 array-bounds warning
[ Upstream commit 9dec850fd7 ]

GCC 12 currently generates a rather inconsistent warning:

drivers/net/ethernet/broadcom/tg3.c:17795:51: warning: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Warray-bounds]
17795 |                 struct tg3_napi *tnapi = &tp->napi[i];
      |                                           ~~~~~~~~^~~

i is guaranteed < tp->irq_max which in turn is either 1 or 5.
There are more loops like this one in the driver, but strangely
GCC 12 dislikes only this single one.

Silence this silliness for now.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:20:56 +02:00
..
2022-04-08 14:40:12 +02:00
2022-05-25 09:18:01 +02:00
2022-05-09 09:04:56 +02:00
2022-06-06 08:42:40 +02:00
2022-04-13 21:00:55 +02:00