From 1e9c9663981c3cc28cb36d0ed6dc5df4ed35791f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 29 Apr 2016 21:31:08 +0000 Subject: [PATCH] Remove initialization of big holes in syscallent.h files There is no need to explicitly initialize big holes after conversion of syscallent.h files to use designated initializers. For architectures that have some data at the end of syscallent.h this initialization of big holes is no-op, for others it just inflates the table unnecessarily. * linux/arc/syscallent.h: Remove initialization of arch specific block at the end of table. * linux/metag/syscallent.h: Likewise. * linux/nios2/syscallent.h: Likewise. * linux/or1k/syscallent.h: Likewise. * linux/tile/syscallent.h: Likewise. * linux/tile/syscallent1.h: Likewise. * linux/arm/syscallent.h: Remove explicit initialization of a big hole before socket subcalls. * linux/i386/syscallent.h: Likewise. * linux/m68k/syscallent.h: Likewise. * linux/mips/syscallent-n32.h: Likewise. * linux/powerpc/syscallent.h: Likewise. * linux/powerpc64/syscallent.h: Likewise. * linux/s390/syscallent.h: Likewise. * linux/s390x/syscallent.h: Likewise. * linux/sh/syscallent.h: Likewise. * linux/sh64/syscallent.h: Likewise. * linux/sparc/syscallent.h: Likewise. * linux/sparc64/syscallent.h: Likewise. * linux/mips/syscallent-compat.h: Remove explicit initialization of big holes between different mips ABIs. * linux/mips/syscallent-n64.h: Remove explicit initialization of big holes before socket subcalls and between different mips ABIs. * linux/mips/syscallent-o32.h: Likewise. --- linux/arc/syscallent.h | 2 +- linux/arm/syscallent.h | 1 - linux/i386/syscallent.h | 1 - linux/m68k/syscallent.h | 1 - linux/metag/syscallent.h | 3 +-- linux/mips/syscallent-compat.h | 8 -------- linux/mips/syscallent-n32.h | 1 - linux/mips/syscallent-n64.h | 4 ---- linux/mips/syscallent-o32.h | 4 ---- linux/nios2/syscallent.h | 2 +- linux/or1k/syscallent.h | 2 +- linux/powerpc/syscallent.h | 1 - linux/powerpc64/syscallent.h | 1 - linux/s390/syscallent.h | 1 - linux/s390x/syscallent.h | 1 - linux/sh/syscallent.h | 2 +- linux/sh64/syscallent.h | 2 +- linux/sparc/syscallent.h | 1 - linux/sparc64/syscallent.h | 1 - linux/tile/syscallent.h | 2 +- linux/tile/syscallent1.h | 2 +- 21 files changed, 8 insertions(+), 35 deletions(-) diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h index 11000083..c2db91a1 100644 --- a/linux/arc/syscallent.h +++ b/linux/arc/syscallent.h @@ -1,6 +1,6 @@ #define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, [245] = { 1, 0, SEN(printargs), "arc_settls" }, [246] = { 0, 0, SEN(printargs), "arc_gettls" }, -[247 ... 259] = { }, diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index a94bedc7..52605518 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -416,7 +416,6 @@ [389] = { 2, 0, SEN(membarrier), "membarrier", }, [390] = { 3, TM, SEN(mlock2), "mlock2" }, [391] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[392 ... 399] = { }, #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 400 diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index f91fe1db..1bba2e73 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -403,7 +403,6 @@ [375] = { 2, 0, SEN(membarrier), "membarrier", }, [376] = { 3, TM, SEN(mlock2), "mlock2" }, [377] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[378 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index 23d507dd..a7652e33 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -402,7 +402,6 @@ [374] = { 2, 0, SEN(membarrier), "membarrier", }, [375] = { 3, TM, SEN(mlock2), "mlock2" }, [376] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[377 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/metag/syscallent.h b/linux/metag/syscallent.h index b2d1e660..82ad55bb 100644 --- a/linux/metag/syscallent.h +++ b/linux/metag/syscallent.h @@ -1,7 +1,6 @@ #include "32/syscallent.h" -[244] = { }, +/* [244 ... 259] are arch specific */ [245] = { 2, 0, SEN(printargs), "metag_setglobalbit" }, [246] = { 1, 0, SEN(printargs), "metag_set_fpu_flags" }, [247] = { 1, 0, SEN(printargs), "metag_set_tls" }, [248] = { 0, NF, SEN(printargs), "metag_get_tls" }, -[249 ... 259] = { }, diff --git a/linux/mips/syscallent-compat.h b/linux/mips/syscallent-compat.h index 85bbff1f..82a373b6 100644 --- a/linux/mips/syscallent-compat.h +++ b/linux/mips/syscallent-compat.h @@ -149,8 +149,6 @@ [ 207] = { 0, 0, SEN(printargs), "svr4_areadv" }, [ 208] = { 0, 0, SEN(printargs), "svr4_awritev" }, -[209 ... 999] = { }, /* end of SVR4 */ - [1000] = { 0, 0, SEN(printargs), "sysv_syscall" }, /* start of SYSV */ [1001] = { 0, 0, SEN(printargs), "sysv_exit" }, [1002] = { 0, 0, SEN(printargs), "sysv_fork" }, @@ -336,8 +334,6 @@ [1187] = { 0, 0, SEN(printargs), "sysv_pread" }, [1188] = { 0, 0, SEN(printargs), "sysv_pwrite" }, -[1189 ... 1999] = { }, /* end of SYSV */ - [2000] = { 0, 0, SEN(printargs), "bsd43_syscall" }, /* start of BSD 4.3 */ [2001] = { 0, 0, SEN(printargs), "bsd43_exit" }, [2002] = { 0, 0, SEN(printargs), "bsd43_fork" }, @@ -531,8 +527,6 @@ [2190] = { 0, 0, SEN(printargs), "bsd43_areadv" }, [2191] = { 0, 0, SEN(printargs), "bsd43_awritev" }, -[2192 ... 2999] = { }, /* end of BSD 4.3 */ - [3000] = { 0, 0, SEN(printargs), "posix_syscall" }, /* start of POSIX */ [3001] = { 0, 0, SEN(printargs), "posix_exit" }, [3002] = { 0, 0, SEN(printargs), "posix_fork" }, @@ -704,5 +698,3 @@ [3266] = { 0, 0, SEN(printargs), "posix_sigprocmask" }, [3267] = { 0, 0, SEN(printargs), "posix_sigsuspend" }, [3268] = { 0, 0, SEN(printargs), "posix_sigaction" }, - -[3269 ... 3999] = { }, /* end of POSIX */ diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 57d9fb18..9084fda7 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -325,7 +325,6 @@ [6322] = { 2, 0, SEN(membarrier), "membarrier", }, [6323] = { 3, TM, SEN(mlock2), "mlock2" }, [6324] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[6325 ... 6399] = { }, # define SYS_socket_subcall 6400 # include "subcall.h" diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 170b6eee..c1ecddd6 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -321,16 +321,12 @@ [5318] = { 2, 0, SEN(membarrier), "membarrier", }, [5319] = { 3, TM, SEN(mlock2), "mlock2" }, [5320] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[5321 ... 5399] = { }, # define SYS_socket_subcall 5400 # include "subcall.h" -/* end of Linux N64 */ [SYS_socket_subcall + SYS_socket_nsubcalls + SYS_ipc_nsubcalls ... 5999] = { }, - #else # include "syscallent-n64-stub.h" -/* end of Linux N64 */ [5400 ... 5999] = { }, #endif diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 61870fa8..f65be702 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -361,16 +361,12 @@ [4358] = { 2, 0, SEN(membarrier), "membarrier", }, [4359] = { 3, TM, SEN(mlock2), "mlock2" }, [4360] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[4361 ... 4399] = { }, # define SYS_socket_subcall 4400 # include "subcall.h" -/* end of Linux o32 */ [SYS_socket_subcall + SYS_socket_nsubcalls + SYS_ipc_nsubcalls ... 4999] = { }, - #else # include "syscallent-o32-stub.h" -/* end of Linux o32 */ [4400 ... 4999] = { }, #endif diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h index 01efe3a2..301fd0e2 100644 --- a/linux/nios2/syscallent.h +++ b/linux/nios2/syscallent.h @@ -1,4 +1,4 @@ #define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = {4, 0, SEN(cacheflush), "cacheflush"}, -[245 ... 259] = { }, diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h index 351fe250..10af205e 100644 --- a/linux/or1k/syscallent.h +++ b/linux/or1k/syscallent.h @@ -1,4 +1,4 @@ #define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, -[245 ... 259] = { }, diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index 806f4d63..d4c9402c 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -406,7 +406,6 @@ [377] = { 3, TI, SEN(shmctl), "shmctl" }, [378] = { 3, TM, SEN(mlock2), "mlock2" }, [379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[380 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/powerpc64/syscallent.h b/linux/powerpc64/syscallent.h index 1b9571b3..1239a6f2 100644 --- a/linux/powerpc64/syscallent.h +++ b/linux/powerpc64/syscallent.h @@ -401,7 +401,6 @@ [377] = { 3, TI, SEN(shmctl), "shmctl" }, [378] = { 3, TM, SEN(mlock2), "mlock2" }, [379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[380 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 68ae7cbf..92b5c9c6 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -404,7 +404,6 @@ [373] = { 2, TN, SEN(shutdown), "shutdown" }, [374] = { 3, TM, SEN(mlock2), "mlock2" }, [375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[376 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index 00ce24e3..fcbe69dd 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -388,7 +388,6 @@ [373] = { 2, TN, SEN(shutdown), "shutdown" }, [374] = { 3, TM, SEN(mlock2), "mlock2" }, [375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[376 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 95b1b599..d2b462d5 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -394,6 +394,6 @@ [366] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, [367] = { 5, 0, SEN(kcmp), "kcmp" }, [368] = { 3, TD, SEN(finit_module), "finit_module" }, -[369 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 0f9ad1a5..35048814 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -403,6 +403,6 @@ [377] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, [378] = { 5, 0, SEN(kcmp), "kcmp" }, [379] = { 3, TD, SEN(finit_module), "finit_module" }, -[380 ... 399] = { }, + #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 4404b95f..89b22247 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -356,7 +356,6 @@ [355] = { 5, TN, SEN(setsockopt), "setsockopt" }, [356] = { 3, TM, SEN(mlock2), "mlock2" }, [357] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[358 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/sparc64/syscallent.h b/linux/sparc64/syscallent.h index 29532153..23de9c9b 100644 --- a/linux/sparc64/syscallent.h +++ b/linux/sparc64/syscallent.h @@ -354,7 +354,6 @@ [355] = { 5, TN, SEN(setsockopt), "setsockopt" }, [356] = { 3, TM, SEN(mlock2), "mlock2" }, [357] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, -[358 ... 399] = { }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/tile/syscallent.h b/linux/tile/syscallent.h index ee235f34..eb518fb9 100644 --- a/linux/tile/syscallent.h +++ b/linux/tile/syscallent.h @@ -1,4 +1,4 @@ #include "64/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, [245] = { 3, 0, SEN(printargs), "cacheflush" }, -[246 ... 259] = { }, diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h index 28dbab4d..b305f067 100644 --- a/linux/tile/syscallent1.h +++ b/linux/tile/syscallent1.h @@ -1,6 +1,6 @@ #define sys_ARCH_mmap sys_mmap_4koff #define ARCH_WANT_SYNC_FILE_RANGE2 1 #include "32/syscallent.h" +/* [244 ... 259] are arch specific */ [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, [245] = { 3, 0, SEN(printargs), "cacheflush" }, -[246 ... 259] = { }, -- 2.40.0