From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4BF8519645C; Thu, 6 Jun 2024 14:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717682995; cv=none; b=bDCCZP1QBbUYhW47yCGxcA/bctLOlf6N64L0hjL6nlBu6Uom9UdcyucY12aNYHwwnce0vXZCE/+bOf22DdtaZSQI7yH4TTb1GUdoKgSYWLzGTFExBZpnExJZgb5nZeAF5WIDeyCtRu8Rh72tpfIU8dpf939I6USOUH406s6tP1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717682995; c=relaxed/simple; bh=QTiv5+PT0/U/1rPY2whp3Jv1pNSDmkHWSADbR1P8NPE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dzYKxrZZ7E419C8rj+EOVfyHgxbiedQd0jm2GkbCQRmpyjqPRR3N+IQlgRv0NKNVPCG6C46I+CuDfwZYjjUdVkCfTuCmMmFXUt+KOPESRjdgGI0K95/2mzK+ipnEpjXJkiyfSerPznGsmv1NGzKyGO54JgGT2MDyF4jLfHrFpew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KeUnsmVq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KeUnsmVq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B9DEC2BD10; Thu, 6 Jun 2024 14:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717682995; bh=QTiv5+PT0/U/1rPY2whp3Jv1pNSDmkHWSADbR1P8NPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KeUnsmVqx3kk8uX3lkGaX7kiozNCjhQWGg3uE38h9w0Hdo7UR6RQ90yVDThNy9Fbk 1FW4QJTmN3Fl8wikG/GmOHBSmhOmg30c31DKd+rXLB/WrBnxR38vkLzwouWWKuZ940 hRhfd8q/LI6fpWuw5+8UvciK07IFVGeXyv3ydoYs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tiwei Bie , Richard Weinberger , Sasha Levin Subject: [PATCH 6.9 193/374] um: Fix the -Wmissing-prototypes warning for get_thread_reg Date: Thu, 6 Jun 2024 16:02:52 +0200 Message-ID: <20240606131658.322018598@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606131651.683718371@linuxfoundation.org> References: <20240606131651.683718371@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tiwei Bie [ Upstream commit 3144013e48f4f6e5127223c4ebc488016815dedb ] The get_thread_reg function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: dbba7f704aa0 ("um: stop polluting the namespace with registers.h contents") Signed-off-by: Tiwei Bie Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/include/asm/processor-generic.h | 1 - arch/x86/um/shared/sysdep/archsetjmp.h | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index 6c3779541845b..5a7c05275aa74 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h @@ -94,7 +94,6 @@ extern struct cpuinfo_um boot_cpu_data; #define current_cpu_data boot_cpu_data #define cache_line_size() (boot_cpu_data.cache_alignment) -extern unsigned long get_thread_reg(int reg, jmp_buf *buf); #define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf) extern unsigned long __get_wchan(struct task_struct *p); diff --git a/arch/x86/um/shared/sysdep/archsetjmp.h b/arch/x86/um/shared/sysdep/archsetjmp.h index 166cedbab9266..8c81d1a604a94 100644 --- a/arch/x86/um/shared/sysdep/archsetjmp.h +++ b/arch/x86/um/shared/sysdep/archsetjmp.h @@ -1,6 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __X86_UM_SYSDEP_ARCHSETJMP_H +#define __X86_UM_SYSDEP_ARCHSETJMP_H + #ifdef __i386__ #include "archsetjmp_32.h" #else #include "archsetjmp_64.h" #endif + +unsigned long get_thread_reg(int reg, jmp_buf *buf); + +#endif /* __X86_UM_SYSDEP_ARCHSETJMP_H */ -- 2.43.0