* [PATCH] hexagon: Move kernel prototypes out of uapi/asm/setup.h header
@ 2024-05-02 17:38 Thomas Huth
2024-10-22 18:43 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2024-05-02 17:38 UTC (permalink / raw)
To: Brian Cain; +Cc: linux-kernel, Arnd Bergmann, linux-arch, linux-hexagon
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 <thuth@redhat.com>
---
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
diff --git a/arch/hexagon/include/asm/setup.h b/arch/hexagon/include/asm/setup.h
new file mode 100644
index 000000000000..9f2749cd4052
--- /dev/null
+++ b/arch/hexagon/include/asm/setup.h
@@ -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
diff --git a/arch/hexagon/include/uapi/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h
index 8ce9428b1583..598f74f671f6 100644
--- a/arch/hexagon/include/uapi/asm/setup.h
+++ b/arch/hexagon/include/uapi/asm/setup.h
@@ -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
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hexagon: Move kernel prototypes out of uapi/asm/setup.h header
2024-05-02 17:38 [PATCH] hexagon: Move kernel prototypes out of uapi/asm/setup.h header Thomas Huth
@ 2024-10-22 18:43 ` Thomas Huth
2024-10-22 19:19 ` Brian Cain
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2024-10-22 18:43 UTC (permalink / raw)
To: Brian Cain; +Cc: linux-kernel, Arnd Bergmann, linux-arch, linux-hexagon
On 02/05/2024 19.38, Thomas Huth wrote:
> 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 <thuth@redhat.com>
> ---
> 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
>
> diff --git a/arch/hexagon/include/asm/setup.h b/arch/hexagon/include/asm/setup.h
> new file mode 100644
> index 000000000000..9f2749cd4052
> --- /dev/null
> +++ b/arch/hexagon/include/asm/setup.h
> @@ -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
> diff --git a/arch/hexagon/include/uapi/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h
> index 8ce9428b1583..598f74f671f6 100644
> --- a/arch/hexagon/include/uapi/asm/setup.h
> +++ b/arch/hexagon/include/uapi/asm/setup.h
> @@ -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
Ping?
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] hexagon: Move kernel prototypes out of uapi/asm/setup.h header
2024-10-22 18:43 ` Thomas Huth
@ 2024-10-22 19:19 ` Brian Cain
0 siblings, 0 replies; 3+ messages in thread
From: Brian Cain @ 2024-10-22 19:19 UTC (permalink / raw)
To: Thomas Huth
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann,
linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org
> -----Original Message-----
> From: Thomas Huth <thuth@redhat.com>
> Sent: Tuesday, October 22, 2024 1:44 PM
> To: Brian Cain <bcain@quicinc.com>
> Cc: linux-kernel@vger.kernel.org; Arnd Bergmann <arnd@arndb.de>; linux-
> arch@vger.kernel.org; linux-hexagon@vger.kernel.org
> Subject: Re: [PATCH] hexagon: Move kernel prototypes out of
> uapi/asm/setup.h header
>
> WARNING: This email originated from outside of Qualcomm. Please be wary of
> any links or attachments, and do not enable macros.
>
> On 02/05/2024 19.38, Thomas Huth wrote:
> > 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 <thuth@redhat.com>
> > ---
Reviewed-by: Brian Cain <bcain@quicinc.com>
> > 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
> >
> > diff --git a/arch/hexagon/include/asm/setup.h
> b/arch/hexagon/include/asm/setup.h
> > new file mode 100644
> > index 000000000000..9f2749cd4052
> > --- /dev/null
> > +++ b/arch/hexagon/include/asm/setup.h
> > @@ -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
> > diff --git a/arch/hexagon/include/uapi/asm/setup.h
> b/arch/hexagon/include/uapi/asm/setup.h
> > index 8ce9428b1583..598f74f671f6 100644
> > --- a/arch/hexagon/include/uapi/asm/setup.h
> > +++ b/arch/hexagon/include/uapi/asm/setup.h
> > @@ -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
>
> Ping?
>
> Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-22 19:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 17:38 [PATCH] hexagon: Move kernel prototypes out of uapi/asm/setup.h header Thomas Huth
2024-10-22 18:43 ` Thomas Huth
2024-10-22 19:19 ` Brian Cain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).