From nobody Thu Dec 25 12:40:08 2025 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EC2F1EB31 for ; Wed, 17 Jan 2024 11:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492002; cv=none; b=tP/tjJ50G4jnCfL6KtpugbIzbxn0RqrQs4zTWtt8x/+FbRZeA6QU81G47Jub3jNe2WzmBtbXTvwfMuZHFguiBFbsy1l3ATi+T7rBOzuE+JFWN7uHhcN0NSXqasifX4SehG+sl5ekzuNxqUQ3BW7d3DCDx2xp3EHYE24m2B5UQGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492002; c=relaxed/simple; bh=FCOnwYrhZkluxCwU1rI7qym40IkKZ74sKbmGZdbV/NU=; h=X-Report-Abuse:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Developer-Signature:X-Developer-Key:X-Migadu-Flow; b=q3euE1rv+7uIfFUJM+PCw6z+aBGxv4pEr2MD/NLZpqoxorUXfj4SDYxZcocEP/rK4HdwfCZNXpmLw5kgPlVCLLAfa+UR5SQgESSDfD1Bn0bgMLeqA5Oh41GrrMvSsl7u+oU2RzX32MOllKOQuByuB8AJdg9sPDUWgI7YfZBKtcs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou Date: Wed, 17 Jan 2024 11:46:00 +0000 Subject: [PATCH 3/3] mm/slub: remove unused parameter in next_freelist_entry() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240117-slab-misc-v1-3-fd1c49ccbe70@bytedance.com> References: <20240117-slab-misc-v1-0-fd1c49ccbe70@bytedance.com> In-Reply-To: <20240117-slab-misc-v1-0-fd1c49ccbe70@bytedance.com> To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Joonsoo Kim , Vlastimil Babka , Christoph Lameter , Pekka Enberg , Andrew Morton , Roman Gushchin , David Rientjes Cc: linux-mm@kvack.org, Chengming Zhou , linux-kernel@vger.kernel.org X-Developer-Signature: v=1; a=ed25519-sha256; t=1705491984; l=1440; i=zhouchengming@bytedance.com; s=20231204; h=from:subject:message-id; bh=FCOnwYrhZkluxCwU1rI7qym40IkKZ74sKbmGZdbV/NU=; b=r60bI1xFOSY0XMd/T4Vsn0QUucBv9bV6X7Ko6gDXvzMuaW9qAxNwy6xtQTq9LHk4bfdsUq04n Izus8lbaiz1CHUbUv63tGpbiP1Tp3eAQ0hAti23U2ipWl75vInBFP5w X-Developer-Key: i=zhouchengming@bytedance.com; a=ed25519; pk=xFTmRtMG3vELGJBUiml7OYNdM393WOMv0iWWeQEVVdA= X-Migadu-Flow: FLOW_OUT The parameter "struct slab *slab" is unused in next_freelist_entry(), so just remove it. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka --- 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) } =20 /* 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 =3D fixup_red_left(s, slab_address(slab)); =20 /* First entry is used as the base of the freelist */ - cur =3D next_freelist_entry(s, slab, &pos, start, page_limit, - freelist_count); + cur =3D next_freelist_entry(s, &pos, start, page_limit, freelist_count); cur =3D setup_object(s, cur); slab->freelist =3D cur; =20 for (idx =3D 1; idx < slab->objects; idx++) { - next =3D next_freelist_entry(s, slab, &pos, start, page_limit, + next =3D next_freelist_entry(s, &pos, start, page_limit, freelist_count); next =3D setup_object(s, next); set_freepointer(s, cur, next); --=20 b4 0.10.1