[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220313102907.GC28782@altlinux.org>
Date: Sun, 13 Mar 2022 13:29:07 +0300
From: "Dmitry V. Levin" <ldv@...linux.org>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-arch@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] shmbuf.h: add asm/shmbuf.h to UAPI compile-test
coverage
On Thu, Feb 10, 2022 at 11:11:25AM +0900, Masahiro Yamada wrote:
> asm/shmbuf.h is currently excluded from the UAPI compile-test because of
> the errors like follows:
>
> HDRTEST usr/include/asm/shmbuf.h
> In file included from ./usr/include/asm/shmbuf.h:6,
> from <command-line>:
> ./usr/include/asm-generic/shmbuf.h:26:33: error: field ‘shm_perm’ has incomplete type
> 26 | struct ipc64_perm shm_perm; /* operation perms */
> | ^~~~~~~~
> ./usr/include/asm-generic/shmbuf.h:27:9: error: unknown type name ‘size_t’
> 27 | size_t shm_segsz; /* size of segment (bytes) */
> | ^~~~~~
> ./usr/include/asm-generic/shmbuf.h:40:9: error: unknown type name ‘__kernel_pid_t’
> 40 | __kernel_pid_t shm_cpid; /* pid of creator */
> | ^~~~~~~~~~~~~~
> ./usr/include/asm-generic/shmbuf.h:41:9: error: unknown type name ‘__kernel_pid_t’
> 41 | __kernel_pid_t shm_lpid; /* pid of last operator */
> | ^~~~~~~~~~~~~~
>
> The errors can be fixed by replacing size_t with __kernel_size_t and by
> including proper headers.
>
> Then, remove the no-header-test entry from user/include/Makefile.
>
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
This is essentially the same patch as
https://lore.kernel.org/lkml/20211227105303.GA25101@altlinux.org/
Apparently, some people are more lucky in getting their patches reviewed.
[...]
> diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
> index 680bb95b2240..eb74d304b779 100644
> --- a/arch/mips/include/uapi/asm/shmbuf.h
> +++ b/arch/mips/include/uapi/asm/shmbuf.h
> @@ -2,6 +2,9 @@
> #ifndef _ASM_SHMBUF_H
> #define _ASM_SHMBUF_H
>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
There is no need to include <asm/posix_types.h> since <asm/ipcbuf.h>
already includes it, but there is no harm either.
[...]
> diff --git a/arch/parisc/include/uapi/asm/shmbuf.h b/arch/parisc/include/uapi/asm/shmbuf.h
> index 5da3089be65e..532da742fb56 100644
> --- a/arch/parisc/include/uapi/asm/shmbuf.h
> +++ b/arch/parisc/include/uapi/asm/shmbuf.h
> @@ -3,6 +3,8 @@
> #define _PARISC_SHMBUF_H
>
> #include <asm/bitsperlong.h>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
[...]
> diff --git a/arch/powerpc/include/uapi/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
> index 00422b2f3c63..439a3a02ba64 100644
> --- a/arch/powerpc/include/uapi/asm/shmbuf.h
> +++ b/arch/powerpc/include/uapi/asm/shmbuf.h
> @@ -2,6 +2,9 @@
> #ifndef _ASM_POWERPC_SHMBUF_H
> #define _ASM_POWERPC_SHMBUF_H
>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
[...]
> diff --git a/arch/sparc/include/uapi/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h
> index a5d7d8d681c4..ed4f061c7a15 100644
> --- a/arch/sparc/include/uapi/asm/shmbuf.h
> +++ b/arch/sparc/include/uapi/asm/shmbuf.h
> @@ -2,6 +2,9 @@
> #ifndef _SPARC_SHMBUF_H
> #define _SPARC_SHMBUF_H
>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
[...]
> diff --git a/arch/x86/include/uapi/asm/shmbuf.h b/arch/x86/include/uapi/asm/shmbuf.h
> index fce18eaa070c..13775bfdfee2 100644
> --- a/arch/x86/include/uapi/asm/shmbuf.h
> +++ b/arch/x86/include/uapi/asm/shmbuf.h
> @@ -5,6 +5,10 @@
> #if !defined(__x86_64__) || !defined(__ILP32__)
> #include <asm-generic/shmbuf.h>
> #else
> +
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
[...]
> diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
> index 554a57a6a90f..bb8bdddae9b5 100644
> --- a/arch/xtensa/include/uapi/asm/shmbuf.h
> +++ b/arch/xtensa/include/uapi/asm/shmbuf.h
> @@ -20,9 +20,12 @@
> #ifndef _XTENSA_SHMBUF_H
> #define _XTENSA_SHMBUF_H
>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
[...]
> diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
> index 2bab955e0fed..2979b6dd2c56 100644
> --- a/include/uapi/asm-generic/shmbuf.h
> +++ b/include/uapi/asm-generic/shmbuf.h
> @@ -3,6 +3,8 @@
> #define __ASM_GENERIC_SHMBUF_H
>
> #include <asm/bitsperlong.h>
> +#include <asm/ipcbuf.h>
> +#include <asm/posix_types.h>
Likewise.
--
ldv
Powered by blists - more mailing lists