hexagon: Move kernel prototypes out of uapi/asm/setup.h header
PATCH 1/1 hexagon: Move kernel prototypes out of uapi/asm/setup.h header
The kernel function prototypes are of no use for userspace and shouldn't get exposed in an uapi header, so let's move them into an internal header instead.
--- arch/hexagon/include/asm/setup.h | 20 ++++++++++++++++++++ arch/hexagon/include/uapi/asm/setup.h | 14 ++------------ 2 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 arch/hexagon/include/asm/setup.h
arch/hexagon/include/asm/setup.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +*/ + +#ifndef _ASM_HEXAGON_SETUP_H +#define _ASM_HEXAGON_SETUP_H + +#include <linux/init.h> +#include <uapi/asm/setup.h> + +extern char external_cmdline_buffer; + +void __init setup_arch_memory (void ); + +#endif
arch/hexagon/include/uapi/asm/setup.h +2 -12
@@ -17,19 +17,9 @@* 02110-1301, USA. */ -#ifndef _ASM_SETUP_H -#define _ASM_SETUP_H - -#ifdef __KERNEL__ -#include <linux/init.h> -#else -#define __init -#endif +#ifndef _UAPI_ASM_HEXAGON_SETUP_H +#define _UAPI_ASM_HEXAGON_SETUP_H#include <asm-generic/setup.h> -extern char external_cmdline_buffer; - -void __init setup_arch_memory (void ); -#endif
Signature · 1 line
2.44.0
Quoted 53 lines · Thomas Huth
The kernel function prototypes are of no use for userspace and shouldn't get exposed in an uapi header, so let's move them into an internal header instead.
Signed-off-by Thomas Huth <[email protected]>--- arch/hexagon/include/asm/setup.h | 20 ++++++++++++++++++++ arch/hexagon/include/uapi/asm/setup.h | 14 ++------------ 2 files changed, 22 insertions(+), 12 deletions(-)create mode 100644
arch/hexagon/include/asm/setup.harch/hexagon/include/asm/setup.h new file +20
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +*/ + +#ifndef _ASM_HEXAGON_SETUP_H +#define _ASM_HEXAGON_SETUP_H + +#include <linux/init.h> +#include <uapi/asm/setup.h> + +extern char external_cmdline_buffer; + +void __init setup_arch_memory (void ); + +#endif arch/hexagon/include/uapi/asm/setup.h +0
-8@@ -17,19 +17,9 @@* 02110-1301, USA. */ -#ifndef _ASM_SETUP_H -#define _ASM_SETUP_H - -#ifdef __KERNEL__ -#include <linux/init.h> -#else -#define __init -#endif
arch/hexagon/include/uapi/asm/setup.h line 25
Quoted 10 lines
arch/hexagon/include/uapi/asm/setup.h +2
-4+#ifndef _UAPI_ASM_HEXAGON_SETUP_H +#define _UAPI_ASM_HEXAGON_SETUP_H#include <asm-generic/setup.h> -extern char external_cmdline_buffer; - -void __init setup_arch_memory (void ); -#endif
Ping?
Thomas
Brian Cain
Reviewed-byQuoted 11 lines
-----Original Message-----
From: Thomas Huth <[email protected]>
Sent: Tuesday, October 22, 2024 1:44 PM
To: Brian Cain <[email protected]>
Cc: [email protected]; Arnd Bergmann <[email protected]>; linux- [email protected]; [email protected]
Subject: Re: [PATCH] hexagon: Move kernel prototypes out ofuapi/asm/setup.hheader
Quoted 10 lines
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Quoted 6 lines · Thomas Huth
The kernel function prototypes are of no use for userspace and shouldn't get exposed in an uapi header, so let's move them into an internal header instead.
Signed-off-by Thomas Huth <[email protected]>---
Quoted 63 lines
Review
Quoted 6 lines
arch/hexagon/include/asm/setup.h | 20 ++++++++++++++++++++ arch/hexagon/include/uapi/asm/setup.h | 14 ++------------ 2 files changed, 22 insertions(+), 12 deletions(-)create mode 100644
arch/hexagon/include/asm/setup.h(quoted diff) +0
-0
b/arch/hexagon/include/asm/setup.hReview
Quoted 26 lines
new file mode 100644
index 000000000000..9f2749cd4052arch/hexagon/include/asm/setup.h new file +20
-0@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 and +* only version 2 as published by the Free Software Foundation. +*/ + +#ifndef _ASM_HEXAGON_SETUP_H +#define _ASM_HEXAGON_SETUP_H + +#include <linux/init.h> +#include <uapi/asm/setup.h> + +extern char external_cmdline_buffer; + +void __init setup_arch_memory (void ); + +#endif (quoted diff) +0
-0
b/arch/hexagon/include/uapi/asm/setup.hQuoted 15 lines
index
8ce9428b1583..598f74f671f6100644arch/hexagon/include/uapi/asm/setup.h +0
-8@@ -17,19 +17,9 @@* 02110-1301, USA. */ -#ifndef _ASM_SETUP_H -#define _ASM_SETUP_H - -#ifdef __KERNEL__ -#include <linux/init.h> -#else -#define __init -#endif arch/hexagon/include/uapi/asm/setup.h line 25
Quoted 10 lines
arch/hexagon/include/uapi/asm/setup.h +2
-4+#ifndef _UAPI_ASM_HEXAGON_SETUP_H +#define _UAPI_ASM_HEXAGON_SETUP_H#include <asm-generic/setup.h> -extern char external_cmdline_buffer; - -void __init setup_arch_memory (void ); -#endif Ping?
Thomas