Skip to content

Commit

Permalink
sparc: add asm/stat.h to UAPI compile-test coverage
Browse files Browse the repository at this point in the history
asm/stat.h is currently excluded from the UAPI compile-test for
ARCH=sparc because of the errors like follows:

  In file included from <command-line>:
  ./usr/include/asm/stat.h:11:2: error: unknown type name 'ino_t'
     11 |  ino_t   st_ino;
        |  ^~~~~
    HDRTEST usr/include/asm/param.h
  ./usr/include/asm/stat.h:12:2: error: unknown type name 'mode_t'
     12 |  mode_t  st_mode;
        |  ^~~~~~
  ./usr/include/asm/stat.h:14:2: error: unknown type name 'uid_t'
     14 |  uid_t   st_uid;
        |  ^~~~~
  ./usr/include/asm/stat.h:15:2: error: unknown type name 'gid_t'
     15 |  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]>
  • Loading branch information
masahir0y authored and arndb committed May 13, 2022
1 parent c01013a commit 31a088b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions arch/sparc/include/uapi/asm/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
/* 64 bit sparc */
struct stat {
unsigned int st_dev;
ino_t st_ino;
mode_t st_mode;
__kernel_ino_t st_ino;
__kernel_mode_t st_mode;
short st_nlink;
uid_t st_uid;
gid_t st_gid;
__kernel_uid_t st_uid;
__kernel_gid_t st_gid;
unsigned int st_rdev;
long st_size;
long st_atime;
Expand Down Expand Up @@ -51,8 +51,8 @@ struct stat64 {
/* 32 bit sparc */
struct stat {
unsigned short st_dev;
ino_t st_ino;
mode_t st_mode;
__kernel_ino_t st_ino;
__kernel_mode_t st_mode;
short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
Expand Down
1 change: 0 additions & 1 deletion usr/include/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ no-header-test += linux/bpf_perf_event.h
endif

ifeq ($(SRCARCH),sparc)
no-header-test += asm/stat.h
no-header-test += asm/uctx.h
no-header-test += asm/fbio.h
endif
Expand Down

0 comments on commit 31a088b

Please sign in to comment.