linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	David Rientjes <rientjes@google.com>
Cc: linux-mm@kvack.org, Chengming Zhou <zhouchengming@bytedance.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] mm/slub: remove unused parameter in next_freelist_entry()
Date: Wed, 17 Jan 2024 11:46:00 +0000	[thread overview]
Message-ID: <20240117-slab-misc-v1-3-fd1c49ccbe70@bytedance.com> (raw)
In-Reply-To: <20240117-slab-misc-v1-0-fd1c49ccbe70@bytedance.com>

The parameter "struct slab *slab" is unused in next_freelist_entry(),
so just remove it.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
 mm/slub.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index f0307e8b4cd2..3a4e2f8d341c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2243,7 +2243,7 @@ static void __init init_freelist_randomization(void)
 }
 
 /* Get the next entry on the pre-computed freelist randomized */
-static void *next_freelist_entry(struct kmem_cache *s, struct slab *slab,
+static void *next_freelist_entry(struct kmem_cache *s,
 				unsigned long *pos, void *start,
 				unsigned long page_limit,
 				unsigned long freelist_count)
@@ -2282,13 +2282,12 @@ static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab)
 	start = fixup_red_left(s, slab_address(slab));
 
 	/* First entry is used as the base of the freelist */
-	cur = next_freelist_entry(s, slab, &pos, start, page_limit,
-				freelist_count);
+	cur = next_freelist_entry(s, &pos, start, page_limit, freelist_count);
 	cur = setup_object(s, cur);
 	slab->freelist = cur;
 
 	for (idx = 1; idx < slab->objects; idx++) {
-		next = next_freelist_entry(s, slab, &pos, start, page_limit,
+		next = next_freelist_entry(s, &pos, start, page_limit,
 			freelist_count);
 		next = setup_object(s, next);
 		set_freepointer(s, cur, next);

-- 
b4 0.10.1


  parent reply	other threads:[~2024-01-17 11:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 11:45 [PATCH 0/3] mm/slub: some minor optimization and cleanup Chengming Zhou
2024-01-17 11:45 ` [PATCH 1/3] mm/slub: directly load freelist from cpu partial slab in the likely case Chengming Zhou
2024-01-17 22:41   ` Christoph Lameter (Ampere)
2024-01-18 11:37     ` Chengming Zhou
2024-01-18 22:14       ` Christoph Lameter (Ampere)
2024-01-19  3:53         ` Chengming Zhou
2024-01-22 17:13           ` Vlastimil Babka
2024-01-23  2:51             ` Chengming Zhou
2024-01-23  7:42               ` Chengming Zhou
2024-01-23  8:24               ` Vlastimil Babka
2024-01-23  9:17                 ` Chengming Zhou
2024-01-17 11:45 ` [PATCH 2/3] mm/slub: remove full list manipulation for non-debug slab Chengming Zhou
2024-01-17 22:44   ` Christoph Lameter (Ampere)
2024-01-23  8:45   ` Vlastimil Babka
2024-01-17 11:46 ` Chengming Zhou [this message]
2024-01-23  8:47   ` [PATCH 3/3] mm/slub: remove unused parameter in next_freelist_entry() Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240117-slab-misc-v1-3-fd1c49ccbe70@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).