Re: [PATCH ath-next] wifi: ath9k: drop static from local pdadc and vpdTable arrays
From: Toke Høiland-Jørgensen
Date: Thu Jun 18 2026 - 05:51:18 EST
Rosen Penev <rosenp@xxxxxxxxx> writes:
> Remove the static qualifier from mutable local arrays in three EEPROM
> power-calibration functions. These arrays are written to during normal
> operation, so static storage is both unnecessary and misleading: it
> implies sharing across calls when no such sharing is intended, and it
> makes the code subtly non-reentrant. The sibling function in
> eeprom_9287.c already uses an automatic (stack-local) pdadcValues,
> confirming this is the correct pattern.
>
> This keeps ~1 KB of data off the static data section at the cost of
> stack usage, consistent with the rest of the driver's coding style.
As pointed out by the test robot, putting this much data on the stack is
a bad idea. Pretty sure it's static for exactly this reason in the first
place.
-Toke