From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 162D21A682A; Thu, 2 Jul 2026 16:38:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783010310; cv=none; b=IZdgi6Xh7x7+FGTAMYm7cpctE1GlVdXh0C5SYfodhtfZ0oScrQldjYfXR6nlu1PYDN8YjoBknz8w1La4N31Fn50LauDxAVDir7I0QCmu1YHw1lB2mZYwAbKE2sZicKguh89Nor4tnUMK0FpKEBI6NNkEDro6I8NfMpBVRNOWCKg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783010310; c=relaxed/simple; bh=5/kg7qob13FsibrFqp8telYBw0QBW7fNoll0qAfNqgw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dLc+oQ948HVwzV76nqLTqlVZPbKBI4Kvs5h93k3nJfDIu0JnWEuO1cBk32Q2APAnMAYLJxa3aiX8Ub0bpjUi4VCD1ajXWNGsEKmHb4K58g+V6Q53MeZnS75jikBe97uowRW2z4+9ak0sOgKrgpOPy8+hNlIxb3Ok8iw6PiqDW7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uvvAkM3d; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uvvAkM3d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 530541F000E9; Thu, 2 Jul 2026 16:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783010309; bh=Qgoyzwtl0E/fsyp04VCNWdmXETdHiV7750MUoPddlQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uvvAkM3dC6jr+dX2No/r1hqzhk0Iw+G/6uYs94DJnHqzKPXySPmBe0ZbfIRQDyteC 2+CSwlenhJXSiA+buAojBeMxGPCoh1vulQLTohFjKAAK8lqoT1ZPOVA9mUQTKyo8cj xl7E7+RJkd6AlF56RPezLb2wU9LN+Y+rk7m4ZHsI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, bpf , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Peter Zijlstra , Linus Torvalds , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Zheng Yejian , Martin Kelly , Christophe Leroy , Josh Poimboeuf , "Steven Rostedt (Google)" , Andrey Grodzovsky Subject: [PATCH 6.12 058/204] scripts/sorttable: Remove unused write functions Date: Thu, 2 Jul 2026 18:18:35 +0200 Message-ID: <20260702155119.878644434@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260702155118.667618796@linuxfoundation.org> References: <20260702155118.667618796@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Steven Rostedt [ Upstream commit 4f48a28b37d594dab38092514a42ae9f4b781553 ] The code of sorttable.h was copied from the recordmcount.h which defined various write functions for different sizes (2, 4, 8 byte lengths). But sorttable only uses the 4 byte writes. Remove the extra versions as they are not used. Cc: bpf Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Zheng Yejian Cc: Martin Kelly Cc: Christophe Leroy Cc: Josh Poimboeuf Link: https://lore.kernel.org/20250105162344.314385504@goodmis.org Signed-off-by: Steven Rostedt (Google) Signed-off-by: Andrey Grodzovsky Signed-off-by: Greg Kroah-Hartman --- scripts/sorttable.c | 26 -------------------------- 1 file changed, 26 deletions(-) --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -68,8 +68,6 @@ static uint32_t (*r)(const uint32_t *); static uint16_t (*r2)(const uint16_t *); static uint64_t (*r8)(const uint64_t *); static void (*w)(uint32_t, uint32_t *); -static void (*w2)(uint16_t, uint16_t *); -static void (*w8)(uint64_t, uint64_t *); typedef void (*table_sort_t)(char *, int); /* @@ -146,31 +144,11 @@ static void wbe(uint32_t val, uint32_t * put_unaligned_be32(val, x); } -static void w2be(uint16_t val, uint16_t *x) -{ - put_unaligned_be16(val, x); -} - -static void w8be(uint64_t val, uint64_t *x) -{ - put_unaligned_be64(val, x); -} - static void wle(uint32_t val, uint32_t *x) { put_unaligned_le32(val, x); } -static void w2le(uint16_t val, uint16_t *x) -{ - put_unaligned_le16(val, x); -} - -static void w8le(uint64_t val, uint64_t *x) -{ - put_unaligned_le64(val, x); -} - /* * Move reserved section indices SHN_LORESERVE..SHN_HIRESERVE out of * the way to -256..-1, to avoid conflicting with real section @@ -277,16 +255,12 @@ static int do_file(char const *const fna r2 = r2le; r8 = r8le; w = wle; - w2 = w2le; - w8 = w8le; break; case ELFDATA2MSB: r = rbe; r2 = r2be; r8 = r8be; w = wbe; - w2 = w2be; - w8 = w8be; break; default: fprintf(stderr, "unrecognized ELF data encoding %d: %s\n",