Re: [PATCH net-next V2] net: phy: microchip_t1: SQI support for LAN887x
From: Andrew Lunn
Date: Tue Sep 10 2024 - 08:02:09 EST
> + /* Keep inliers and discard outliers */
> + for (int i = 40; i < 160; i++)
> + sqiavg += rawtable[i];
for (int i = ARRAY_SIZE(rawtable) / 5 ; i < ARRAY_SIZE(rawtable) / 5 * 4; i++) {
You don't want to hard code the size of the array anywhere except for
when actually declaring it. It then becomes easy to change the size of
it.
Andrew