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 <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://patch.msgid.link/20260330085938.67985-4-ubizjak@gmail.com
int can_allocate)
{
struct user_desc info;
- unsigned short __maybe_unused sel, modified_sel;
+ unsigned short modified_sel;
if (copy_from_user(&info, u_info, sizeof(info)))
return -EFAULT;
modified_sel = (idx << 3) | 3;
if (p == current) {
+ unsigned short sel;
+
#ifdef CONFIG_X86_64
savesegment(ds, sel);
if (sel == modified_sel)