From nobody Wed Apr 1 12:37:23 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 0BCDD3D75B0; Tue, 31 Mar 2026 08:02:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774944128; cv=none; b=ShoI3Jhs7fD1y6DKlsxIM3dBhqo0230L9s7fCtCaG6sGHuIrloS2okyOZxlo6w10SNB4se5xStHGkwqMoRmy5mQnvpq1uqWRd55ohx6qB7KChLOM2PagtCfTbbKRv1QRhrXTVYHOxsCgkiBf0lsn1+tsHcBLGUIRzZxyikAcINU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774944128; c=relaxed/simple; bh=FrDYEQiNFHapBxmaxH/7I7VPHgTHFHysiFrCPz6eYiI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tjmsafUrB6QfQZFoHLQYfA3Ul6T+IVXyHZMVdxqU0g+VJiZSvoz2gjy8Z9IxLH3ai+sYngMrQbMrSCegdeioIi2zs7pkK3rCo7oDxNn6oYlm9+6ay9p4Y8W5aiJvig6JXXmCOtdLceSKIw0vmS740/0ZBvT/pNm/GIsxyaoUlaw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qaybjGcO; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8E//pSEk; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qaybjGcO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8E//pSEk" Date: Tue, 31 Mar 2026 08:02:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774944124; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+QhdKgGK0jxc9eEl8EwH7iKx3rVi2FmQcDOOlKQG70s=; b=qaybjGcOWCV74cojA8x6JogA5vRrbYVPz148lg8LomKl5joGceX8p2AK4psp8CbqxEhOT2 NgNE2rmjPA/Y6ibqy6fbwaY+12cIIiuJGc6b9plFdQ8652j0YekZmYrRGIb7kYWhfkn99F m2fpYDNI3pQH5mqpcHSydhk6qI/k8TuePBO1yj3oinjHSmftLcDnZe/K1s6wG1drIQVup+ Tg+RQiigaEPRra9Orm9vbfslIvqkrbuO09SddgNUaDvJziKWPGKuzb1tqcHpXmT2efzgBw tEohqRYhwE7Cd/6DPZoJn9k48doSirupoSUE3+AtXKaiR3Ry3RKA3Ijl9S9wug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774944124; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+QhdKgGK0jxc9eEl8EwH7iKx3rVi2FmQcDOOlKQG70s=; b=8E//pSEkBEToPc0sN4jHOYxNGmj8olCSmAGWnbBMGiWkLEiV8YQsKJZO3ux1ANLTeqgNLt iEzJC544khXlInAA== From: "tip-bot2 for Uros Bizjak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/asm] x86/tls: Clean up 'sel' variable usage in do_set_thread_area() Cc: Uros Bizjak , Ingo Molnar , "H. Peter Anvin" , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260330085938.67985-4-ubizjak@gmail.com> References: <20260330085938.67985-4-ubizjak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177494412222.1647592.7562357233232656264.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/asm branch of tip: Commit-ID: 3b19e22cffe61bcdf10ee5e7584cfa3c1c54dc92 Gitweb: https://git.kernel.org/tip/3b19e22cffe61bcdf10ee5e7584cfa3c1= c54dc92 Author: Uros Bizjak AuthorDate: Mon, 30 Mar 2026 10:59:23 +02:00 Committer: Ingo Molnar CommitterDate: Tue, 31 Mar 2026 09:50:11 +02:00 x86/tls: Clean up 'sel' variable usage in do_set_thread_area() The top-level 'sel' variable in do_set_thread_area() was previously marked __maybe_unused, but it is now only needed locally when updating the current task. Remove the unused top-level declaration and introduce a local 'sel' variable where it is actually used No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Linus Torvalds Link: https://patch.msgid.link/20260330085938.67985-4-ubizjak@gmail.com --- arch/x86/kernel/tls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c index 3ffbab0..86b4186 100644 --- a/arch/x86/kernel/tls.c +++ b/arch/x86/kernel/tls.c @@ -117,7 +117,7 @@ int do_set_thread_area(struct task_struct *p, int idx, int can_allocate) { struct user_desc info; - unsigned short __maybe_unused sel, modified_sel; + unsigned short modified_sel; =20 if (copy_from_user(&info, u_info, sizeof(info))) return -EFAULT; @@ -153,6 +153,8 @@ int do_set_thread_area(struct task_struct *p, int idx, modified_sel =3D (idx << 3) | 3; =20 if (p =3D=3D current) { + unsigned short sel; + #ifdef CONFIG_X86_64 savesegment(ds, sel); if (sel =3D=3D modified_sel)