lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/8] powerpc: add asm/stat.h to UAPI compile-test coverage
Date
asm/stat.h is currently excluded from the UAPI compile-test for
ARCH=powerpc because of the errors like follows:

HDRTEST usr/include/asm/stat.h
In file included from <command-line>:32:
./usr/include/asm/stat.h:32:2: error: unknown type name 'ino_t'
32 | ino_t st_ino;
| ^~~~~
./usr/include/asm/stat.h:35:2: error: unknown type name 'mode_t'
35 | mode_t st_mode;
| ^~~~~~
./usr/include/asm/stat.h:40:2: error: unknown type name 'uid_t'
40 | uid_t st_uid;
| ^~~~~
./usr/include/asm/stat.h:41:2: error: unknown type name 'gid_t'
41 | gid_t st_gid;
| ^~~~~

The errors can be fixed by prefixing the types with __kernel_.

Then, remove the no-header-test entry from user/include/Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

arch/powerpc/include/uapi/asm/stat.h | 10 +++++-----
usr/include/Makefile | 1 -
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/include/uapi/asm/stat.h b/arch/powerpc/include/uapi/asm/stat.h
index 7871055e5e32..a28c9a1201fa 100644
--- a/arch/powerpc/include/uapi/asm/stat.h
+++ b/arch/powerpc/include/uapi/asm/stat.h
@@ -29,16 +29,16 @@ struct __old_kernel_stat {

struct stat {
unsigned long st_dev;
- ino_t st_ino;
+ __kernel_ino_t st_ino;
#ifdef __powerpc64__
unsigned long st_nlink;
- mode_t st_mode;
+ __kernel_mode_t st_mode;
#else
- mode_t st_mode;
+ __kernel_mode_t st_mode;
unsigned short st_nlink;
#endif
- uid_t st_uid;
- gid_t st_gid;
+ __kernel_uid_t st_uid;
+ __kernel_gid_t st_gid;
unsigned long st_rdev;
long st_size;
unsigned long st_blksize;
diff --git a/usr/include/Makefile b/usr/include/Makefile
index da280bdcb391..9d9dea32e3a0 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -66,7 +66,6 @@ no-header-test += linux/if_bonding.h
endif

ifeq ($(SRCARCH),powerpc)
-no-header-test += asm/stat.h
no-header-test += linux/bpf_perf_event.h
endif

--
2.32.0
\
 
 \ /
  Last update: 2022-04-04 08:21    [W:0.197 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site