* [PATCH wireless-next] wifi: ath9k: uninline ar9003_paprd_create_curve() helpers
@ 2026-11-03 15:43 Johannes Berg
2026-11-04 12:04 ` Toke Høiland-Jørgensen
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2026-11-03 15:43 UTC (permalink / raw)
To: linux-wireless; +Cc: toke, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
ar9003_paprd_create_curve() calls the two helpers, but
if they get inlined the stack can exceed 1k with clang,
causing warnings/errors. Mark the two helpers to not be
inlined due to stack ("noinline_for_stack") to fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
index 83d993fff695..15945689c089 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
@@ -416,7 +416,8 @@ static inline int find_proper_scale(int expn, int N)
#define NUM_BIN 23
-static bool create_pa_curve(u32 *data_L, u32 *data_U, u32 *pa_table, u16 *gain)
+static noinline_for_stack bool
+create_pa_curve(u32 *data_L, u32 *data_U, u32 *pa_table, u16 *gain)
{
unsigned int thresh_accum_cnt;
int x_est[NUM_BIN + 1], Y[NUM_BIN + 1], theta[NUM_BIN + 1];
@@ -817,9 +818,10 @@ void ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain)
}
EXPORT_SYMBOL(ar9003_paprd_setup_gain_table);
-static bool ar9003_paprd_retrain_pa_in(struct ath_hw *ah,
- struct ath9k_hw_cal_data *caldata,
- int chain)
+static noinline_for_stack bool
+ar9003_paprd_retrain_pa_in(struct ath_hw *ah,
+ struct ath9k_hw_cal_data *caldata,
+ int chain)
{
u32 *pa_in = caldata->pa_table[chain];
int capdiv_offset, quick_drop_offset;
--
2.56.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-04 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 15:43 [PATCH wireless-next] wifi: ath9k: uninline ar9003_paprd_create_curve() helpers Johannes Berg
2026-11-04 12:04 ` Toke Høiland-Jørgensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox