From fe8909b5a9a61f55dfffc080a1ae3aa4a430ae80 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Sat, 7 Nov 2026 09:55:30 -0800 Subject: [PATCH] Only count freed pages in homa_pool_free_bufs if not upstream freed_pages is read only by a tt_record4, which strip.py removes, so the upstream source fails to compile with W=1: homa_pool.c: error: variable 'freed_pages' set but not used Use __UPSTREAM__ rather than __STRIP__: compile-time stripping keeps the tt_record4, so it still needs the variable. Co-Authored-By: Claude Opus 5.5 --- homa_pool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homa_pool.c b/homa_pool.c index 88fcdead..239ab3cd 100644 --- a/homa_pool.c +++ b/homa_pool.c @@ -374,7 +374,9 @@ void __user *homa_pool_get_buffer(struct homa_rpc *rpc, int offset, */ int homa_pool_free_bufs(struct homa_pool *pool, int num_buffers, u32 *buffers) { +#ifndef __UPSTREAM__ /* See strip.py */ int freed_pages = 0; +#endif /* See strip.py */ int i, result = 0; bool locked = false; @@ -409,7 +411,9 @@ int homa_pool_free_bufs(struct homa_pool *pool, int num_buffers, u32 *buffers) locked = true; } homa_pool_push_free(pool, bpage_index); +#ifndef __UPSTREAM__ /* See strip.py */ freed_pages++; +#endif /* See strip.py */ } } if (locked) {