Skip to content

Commit c63349f

Browse files
Chengming Zhoutehcaster
authored andcommitted
mm/slub: remove unused parameter in next_freelist_entry()
The parameter "struct slab *slab" is unused in next_freelist_entry(), so just remove it. Acked-by: Christoph Lameter (Ampere) <[email protected]> Reviewed-by: Vlastimil Babka <[email protected]> Signed-off-by: Chengming Zhou <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent a6def11 commit c63349f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mm/slub.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ static void __init init_freelist_randomization(void)
22432243
}
22442244

22452245
/* Get the next entry on the pre-computed freelist randomized */
2246-
static void *next_freelist_entry(struct kmem_cache *s, struct slab *slab,
2246+
static void *next_freelist_entry(struct kmem_cache *s,
22472247
unsigned long *pos, void *start,
22482248
unsigned long page_limit,
22492249
unsigned long freelist_count)
@@ -2282,13 +2282,12 @@ static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab)
22822282
start = fixup_red_left(s, slab_address(slab));
22832283

22842284
/* First entry is used as the base of the freelist */
2285-
cur = next_freelist_entry(s, slab, &pos, start, page_limit,
2286-
freelist_count);
2285+
cur = next_freelist_entry(s, &pos, start, page_limit, freelist_count);
22872286
cur = setup_object(s, cur);
22882287
slab->freelist = cur;
22892288

22902289
for (idx = 1; idx < slab->objects; idx++) {
2291-
next = next_freelist_entry(s, slab, &pos, start, page_limit,
2290+
next = next_freelist_entry(s, &pos, start, page_limit,
22922291
freelist_count);
22932292
next = setup_object(s, next);
22942293
set_freepointer(s, cur, next);

0 commit comments

Comments
 (0)