Skip to content

Commit 8c1a381

Browse files
masahir0yarndb
authored andcommitted
mips: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=mips because of the errors like follows: HDRTEST usr/include/asm/stat.h In file included from <command-line>:32: ./usr/include/asm/stat.h:22:2: error: unknown type name 'ino_t' 22 | ino_t st_ino; | ^~~~~ ./usr/include/asm/stat.h:23:2: error: unknown type name 'mode_t' 23 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:25:2: error: unknown type name 'uid_t' 25 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:26:2: error: unknown type name 'gid_t' 26 | gid_t st_gid; | ^~~~~ ./usr/include/asm/stat.h:58:2: error: unknown type name 'mode_t' 58 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:61:2: error: unknown type name 'uid_t' 61 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:62:2: error: unknown type name 'gid_t' 62 | 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 <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent 5c41778 commit 8c1a381

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

arch/mips/include/uapi/asm/stat.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
struct stat {
2020
unsigned st_dev;
2121
long st_pad1[3]; /* Reserved for network id */
22-
ino_t st_ino;
23-
mode_t st_mode;
22+
__kernel_ino_t st_ino;
23+
__kernel_mode_t st_mode;
2424
__u32 st_nlink;
25-
uid_t st_uid;
26-
gid_t st_gid;
25+
__kernel_uid_t st_uid;
26+
__kernel_gid_t st_gid;
2727
unsigned st_rdev;
2828
long st_pad2[2];
2929
long st_size;
@@ -55,11 +55,11 @@ struct stat64 {
5555

5656
unsigned long long st_ino;
5757

58-
mode_t st_mode;
58+
__kernel_mode_t st_mode;
5959
__u32 st_nlink;
6060

61-
uid_t st_uid;
62-
gid_t st_gid;
61+
__kernel_uid_t st_uid;
62+
__kernel_gid_t st_gid;
6363

6464
unsigned long st_rdev;
6565
unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
@@ -96,11 +96,11 @@ struct stat {
9696

9797
unsigned long st_ino;
9898

99-
mode_t st_mode;
99+
__kernel_mode_t st_mode;
100100
__u32 st_nlink;
101101

102-
uid_t st_uid;
103-
gid_t st_gid;
102+
__kernel_uid_t st_uid;
103+
__kernel_gid_t st_gid;
104104

105105
unsigned int st_rdev;
106106
unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */

usr/include/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ no-header-test += asm/sigcontext.h
6565
no-header-test += linux/if_bonding.h
6666
endif
6767

68-
ifeq ($(SRCARCH),mips)
69-
no-header-test += asm/stat.h
70-
endif
71-
7268
ifeq ($(SRCARCH),powerpc)
7369
no-header-test += asm/stat.h
7470
no-header-test += linux/bpf_perf_event.h

0 commit comments

Comments
 (0)