Skip to content

Commit fe8909b

Browse files
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 <noreply@anthropic.com>
1 parent 5cb0ec2 commit fe8909b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎homa_pool.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ void __user *homa_pool_get_buffer(struct homa_rpc *rpc, int offset,
374374
*/
375375
int homa_pool_free_bufs(struct homa_pool *pool, int num_buffers, u32 *buffers)
376376
{
377+
#ifndef __UPSTREAM__ /* See strip.py */
377378
int freed_pages = 0;
379+
#endif /* See strip.py */
378380
int i, result = 0;
379381
bool locked = false;
380382

@@ -409,7 +411,9 @@ int homa_pool_free_bufs(struct homa_pool *pool, int num_buffers, u32 *buffers)
409411
locked = true;
410412
}
411413
homa_pool_push_free(pool, bpage_index);
414+
#ifndef __UPSTREAM__ /* See strip.py */
412415
freed_pages++;
416+
#endif /* See strip.py */
413417
}
414418
}
415419
if (locked) {

0 commit comments

Comments
 (0)