Unverified Commit 4a3233c1 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Arnd Bergmann
Browse files

shmbuf.h: add asm/shmbuf.h to UAPI compile-test coverage



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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 72113d0a
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -2,6 +2,9 @@
#ifndef _ASM_SHMBUF_H
#ifndef _ASM_SHMBUF_H
#define _ASM_SHMBUF_H
#define _ASM_SHMBUF_H


#include <asm/ipcbuf.h>
#include <asm/posix_types.h>

/*
/*
 * The shmid64_ds structure for the MIPS architecture.
 * The shmid64_ds structure for the MIPS architecture.
 * Note extra padding because this structure is passed back and forth
 * Note extra padding because this structure is passed back and forth
@@ -16,7 +19,7 @@
#ifdef __mips64
#ifdef __mips64
struct shmid64_ds {
struct shmid64_ds {
	struct ipc64_perm	shm_perm;	/* operation perms */
	struct ipc64_perm	shm_perm;	/* operation perms */
	size_t			shm_segsz;	/* size of segment (bytes) */
	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
	long			shm_atime;	/* last attach time */
	long			shm_atime;	/* last attach time */
	long			shm_dtime;	/* last detach time */
	long			shm_dtime;	/* last detach time */
	long			shm_ctime;	/* last change time */
	long			shm_ctime;	/* last change time */
@@ -29,7 +32,7 @@ struct shmid64_ds {
#else
#else
struct shmid64_ds {
struct shmid64_ds {
	struct ipc64_perm	shm_perm;	/* operation perms */
	struct ipc64_perm	shm_perm;	/* operation perms */
	size_t			shm_segsz;	/* size of segment (bytes) */
	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
	unsigned long		shm_atime;	/* last attach time */
	unsigned long		shm_atime;	/* last attach time */
	unsigned long		shm_dtime;	/* last detach time */
	unsigned long		shm_dtime;	/* last detach time */
	unsigned long		shm_ctime;	/* last change time */
	unsigned long		shm_ctime;	/* last change time */
+2 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,8 @@
#define _PARISC_SHMBUF_H
#define _PARISC_SHMBUF_H


#include <asm/bitsperlong.h>
#include <asm/bitsperlong.h>
#include <asm/ipcbuf.h>
#include <asm/posix_types.h>


/* 
/* 
 * The shmid64_ds structure for parisc architecture.
 * The shmid64_ds structure for parisc architecture.
+4 −1
Original line number Original line Diff line number Diff line
@@ -2,6 +2,9 @@
#ifndef _ASM_POWERPC_SHMBUF_H
#ifndef _ASM_POWERPC_SHMBUF_H
#define _ASM_POWERPC_SHMBUF_H
#define _ASM_POWERPC_SHMBUF_H


#include <asm/ipcbuf.h>
#include <asm/posix_types.h>

/*
/*
 * This program is free software; you can redistribute it and/or
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * modify it under the terms of the GNU General Public License
@@ -34,7 +37,7 @@ struct shmid64_ds {
	unsigned long		shm_ctime;	/* last change time */
	unsigned long		shm_ctime;	/* last change time */
	unsigned long		__unused4;
	unsigned long		__unused4;
#endif
#endif
	size_t			shm_segsz;	/* size of segment (bytes) */
	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
	__kernel_pid_t		shm_cpid;	/* pid of creator */
	__kernel_pid_t		shm_cpid;	/* pid of creator */
	__kernel_pid_t		shm_lpid;	/* pid of last operator */
	__kernel_pid_t		shm_lpid;	/* pid of last operator */
	unsigned long		shm_nattch;	/* no. of current attaches */
	unsigned long		shm_nattch;	/* no. of current attaches */
+4 −1
Original line number Original line Diff line number Diff line
@@ -2,6 +2,9 @@
#ifndef _SPARC_SHMBUF_H
#ifndef _SPARC_SHMBUF_H
#define _SPARC_SHMBUF_H
#define _SPARC_SHMBUF_H


#include <asm/ipcbuf.h>
#include <asm/posix_types.h>

/* 
/* 
 * The shmid64_ds structure for sparc architecture.
 * The shmid64_ds structure for sparc architecture.
 * Note extra padding because this structure is passed back and forth
 * Note extra padding because this structure is passed back and forth
@@ -25,7 +28,7 @@ struct shmid64_ds {
	unsigned long		shm_ctime_high;
	unsigned long		shm_ctime_high;
	unsigned long		shm_ctime;	/* last change time */
	unsigned long		shm_ctime;	/* last change time */
#endif
#endif
	size_t			shm_segsz;	/* size of segment (bytes) */
	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
	__kernel_pid_t		shm_cpid;	/* pid of creator */
	__kernel_pid_t		shm_cpid;	/* pid of creator */
	__kernel_pid_t		shm_lpid;	/* pid of last operator */
	__kernel_pid_t		shm_lpid;	/* pid of last operator */
	unsigned long		shm_nattch;	/* no. of current attaches */
	unsigned long		shm_nattch;	/* no. of current attaches */
+5 −1
Original line number Original line Diff line number Diff line
@@ -5,6 +5,10 @@
#if !defined(__x86_64__) || !defined(__ILP32__)
#if !defined(__x86_64__) || !defined(__ILP32__)
#include <asm-generic/shmbuf.h>
#include <asm-generic/shmbuf.h>
#else
#else

#include <asm/ipcbuf.h>
#include <asm/posix_types.h>

/*
/*
 * The shmid64_ds structure for x86 architecture with x32 ABI.
 * The shmid64_ds structure for x86 architecture with x32 ABI.
 *
 *
@@ -15,7 +19,7 @@


struct shmid64_ds {
struct shmid64_ds {
	struct ipc64_perm	shm_perm;	/* operation perms */
	struct ipc64_perm	shm_perm;	/* operation perms */
	size_t			shm_segsz;	/* size of segment (bytes) */
	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
	__kernel_long_t		shm_atime;	/* last attach time */
	__kernel_long_t		shm_atime;	/* last attach time */
	__kernel_long_t		shm_dtime;	/* last detach time */
	__kernel_long_t		shm_dtime;	/* last detach time */
	__kernel_long_t		shm_ctime;	/* last change time */
	__kernel_long_t		shm_ctime;	/* last change time */
Loading