Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

- Convert sh and sparc to use generic shell scripts to generate the
syscall headers

- refactor .gitignore files

- Update kernel/config_data.gz only when the content of the .config
is really changed, which avoids the unneeded re-link of vmlinux

- move "remove stale files" workarounds to scripts/remove-stale-files

- suppress unused-but-set-variable warnings by default for Clang
as well

- fix locale setting LANG=C to LC_ALL=C

- improve 'make distclean'

- always keep intermediate objects from scripts/link-vmlinux.sh

- move IF_ENABLED out of <linux/kconfig.h> to make it self-contained

- misc cleanups

* tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in <linux/kernel.h>
kbuild: Don't remove link-vmlinux temporary files on exit/signal
kbuild: remove the unneeded comments for external module builds
kbuild: make distclean remove tag files in sub-directories
kbuild: make distclean work against $(objtree) instead of $(srctree)
kbuild: refactor modname-multi by using suffix-search
kbuild: refactor fdtoverlay rule
kbuild: parameterize the .o part of suffix-search
arch: use cross_compiling to check whether it is a cross build or not
kbuild: remove ARCH=sh64 support from top Makefile
.gitignore: prefix local generated files with a slash
kbuild: replace LANG=C with LC_ALL=C
Makefile: Move -Wno-unused-but-set-variable out of GCC only block
kbuild: add a script to remove stale generated files
kbuild: update config_data.gz only when the content of .config is changed
.gitignore: ignore only top-level modules.builtin
.gitignore: move tags and TAGS close to other tag files
kernel/.gitgnore: remove stale timeconst.h and hz.bc
usr/include: refactor .gitignore
genksyms: fix stale comment
...

+183 -342
+5 -3
.gitignore
··· 48 48 *.xz 49 49 *.zst 50 50 Module.symvers 51 - modules.builtin 52 51 modules.order 53 52 54 53 # 55 54 # Top-level generic files 56 55 # 57 - /tags 58 - /TAGS 59 56 /linux 60 57 /modules-only.symvers 61 58 /vmlinux ··· 63 66 /vmlinuz 64 67 /System.map 65 68 /Module.markers 69 + /modules.builtin 66 70 /modules.builtin.modinfo 67 71 /modules.nsdeps 68 72 ··· 111 113 # quilt's files 112 114 patches 113 115 series 116 + 117 + # ctags files 118 + tags 119 + TAGS 114 120 115 121 # cscope files 116 122 cscope.*
+2 -2
Documentation/devicetree/bindings/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 *.example.dts 3 - processed-schema*.yaml 4 - processed-schema*.json 3 + /processed-schema*.yaml 4 + /processed-schema*.json
+13 -29
Makefile
··· 399 399 SRCARCH := sparc 400 400 endif 401 401 402 - # Additional ARCH settings for sh 403 - ifeq ($(ARCH),sh64) 404 - SRCARCH := sh 405 - endif 406 - 407 402 export cross_compiling := 408 403 ifneq ($(SRCARCH),$(SUBARCH)) 409 404 cross_compiling := 1 ··· 787 792 KBUILD_CFLAGS += -mno-global-merge 788 793 else 789 794 790 - # These warnings generated too much noise in a regular build. 791 - # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 792 - KBUILD_CFLAGS += -Wno-unused-but-set-variable 793 - 794 795 # Warn about unmarked fall-throughs in switch statement. 795 796 # Disabled for clang while comment to attribute conversion happens and 796 797 # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed. 797 798 KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough,) 798 799 endif 800 + 801 + # These warnings generated too much noise in a regular build. 802 + # Use make W=1 to enable them (see scripts/Makefile.extrawarn) 803 + KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) 799 804 800 805 KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) 801 806 ifdef CONFIG_FRAME_POINTER ··· 1220 1225 1221 1226 archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \ 1222 1227 asm-generic $(version_h) $(autoksyms_h) include/generated/utsrelease.h \ 1223 - include/generated/autoconf.h 1228 + include/generated/autoconf.h remove-stale-files 1224 1229 1225 1230 prepare0: archprepare 1226 1231 $(Q)$(MAKE) $(build)=scripts/mod ··· 1228 1233 1229 1234 # All the preparing.. 1230 1235 prepare: prepare0 prepare-objtool prepare-resolve_btfids 1236 + 1237 + PHONY += remove-stale-files 1238 + remove-stale-files: 1239 + $(Q)$(srctree)/scripts/remove-stale-files 1231 1240 1232 1241 # Support for using generic headers in asm-generic 1233 1242 asm-generic := -f $(srctree)/scripts/Makefile.asm-generic obj ··· 1511 1512 vmlinux-gdb.py \ 1512 1513 *.spec 1513 1514 1514 - # Directories & files removed with 'make distclean' 1515 - DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS 1516 - 1517 1515 # clean - Delete most, but leave enough to build external modules 1518 1516 # 1519 1517 clean: rm-files := $(CLEAN_FILES) ··· 1537 1541 1538 1542 # distclean 1539 1543 # 1540 - distclean: rm-files := $(wildcard $(DISTCLEAN_FILES)) 1541 - 1542 1544 PHONY += distclean 1543 1545 1544 1546 distclean: mrproper 1545 - $(call cmd,rmfiles) 1546 - @find $(srctree) $(RCS_FIND_IGNORE) \ 1547 + @find . $(RCS_FIND_IGNORE) \ 1547 1548 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ 1548 1549 -o -name '*.bak' -o -name '#*#' -o -name '*%' \ 1549 - -o -name 'core' \) \ 1550 + -o -name 'core' -o -name tags -o -name TAGS -o -name 'cscope*' \ 1551 + -o -name GPATH -o -name GRTAGS -o -name GSYMS -o -name GTAGS \) \ 1550 1552 -type f -print | xargs rm -f 1551 1553 1552 1554 ··· 1711 1717 # When building external modules the kernel used as basis is considered 1712 1718 # read-only, and no consistency checks are made and the make 1713 1719 # system is not used on the basis kernel. If updates are required 1714 - # in the basis kernel ordinary make commands (without M=...) must 1715 - # be used. 1716 - # 1717 - # The following are the only valid targets when building external 1718 - # modules. 1719 - # make M=dir clean Delete all automatically generated files 1720 - # make M=dir modules Make all modules in specified dir 1721 - # make M=dir Same as 'make M=dir modules' 1722 - # make M=dir modules_install 1723 - # Install the modules built in the module directory 1724 - # Assumes install directory is already created 1720 + # in the basis kernel ordinary make commands (without M=...) must be used. 1725 1721 1726 1722 # We are always building only modules. 1727 1723 KBUILD_BUILTIN :=
+2 -2
arch/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - i386 3 - x86_64 2 + /i386/ 3 + /x86_64/
-7
arch/arm/boot/compressed/Makefile
··· 96 96 $(foreach o, $(libfdt_objs) atags_to_fdt.o fdt_check_mem_start.o, \ 97 97 $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector)) 98 98 99 - # These were previously generated C files. When you are building the kernel 100 - # with O=, make sure to remove the stale files in the output tree. Otherwise, 101 - # the build system wrongly compiles the stale ones. 102 - ifdef building_out_of_srctree 103 - $(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c)) 104 - endif 105 - 106 99 targets := vmlinux vmlinux.lds piggy_data piggy.o \ 107 100 lib1funcs.o ashldi3.o bswapsdi2.o \ 108 101 head.o $(OBJS)
+1 -1
arch/m68k/Makefile
··· 16 16 17 17 KBUILD_DEFCONFIG := multi_defconfig 18 18 19 - ifneq ($(SUBARCH),$(ARCH)) 19 + ifdef cross_compiling 20 20 ifeq ($(CROSS_COMPILE),) 21 21 CROSS_COMPILE := $(call cc-cross-prefix, \ 22 22 m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
+1 -1
arch/mips/Makefile
··· 50 50 UTS_MACHINE := mips64 51 51 endif 52 52 53 - ifneq ($(SUBARCH),$(ARCH)) 53 + ifdef cross_compiling 54 54 ifeq ($(CROSS_COMPILE),) 55 55 CROSS_COMPILE := $(call cc-cross-prefix, $(tool-archpref)-linux- $(tool-archpref)-linux-gnu- $(tool-archpref)-unknown-linux-gnu-) 56 56 endif
+1 -1
arch/parisc/Makefile
··· 41 41 42 42 export LD_BFD 43 43 44 - ifneq ($(SUBARCH),$(UTS_MACHINE)) 44 + ifdef cross_compiling 45 45 ifeq ($(CROSS_COMPILE),) 46 46 CC_SUFFIXES = linux linux-gnu unknown-linux-gnu 47 47 CROSS_COMPILE := $(call cc-cross-prefix, \
+1 -1
arch/powerpc/boot/wrapper
··· 191 191 kernel=vmlinux 192 192 fi 193 193 194 - LANG=C elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' | awk '{print $4}'`" 194 + LC_ALL=C elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' | awk '{print $4}'`" 195 195 case "$elfformat" in 196 196 elf64-powerpcle) format=elf64lppc ;; 197 197 elf64-powerpc) format=elf32ppc ;;
+1 -1
arch/sh/Makefile
··· 9 9 # License. See the file "COPYING" in the main directory of this archive 10 10 # for more details. 11 11 # 12 - ifneq ($(SUBARCH),$(ARCH)) 12 + ifdef cross_compiling 13 13 ifeq ($(CROSS_COMPILE),) 14 14 CROSS_COMPILE := $(call cc-cross-prefix, sh-linux- sh-linux-gnu- sh-unknown-linux-gnu-) 15 15 endif
+4 -10
arch/sh/kernel/syscalls/Makefile
··· 6 6 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7 7 8 8 syscall := $(src)/syscall.tbl 9 - syshdr := $(srctree)/$(src)/syscallhdr.sh 10 - systbl := $(srctree)/$(src)/syscalltbl.sh 9 + syshdr := $(srctree)/scripts/syscallhdr.sh 10 + systbl := $(srctree)/scripts/syscalltbl.sh 11 11 12 12 quiet_cmd_syshdr = SYSHDR $@ 13 - cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14 - '$(syshdr_abis_$(basetarget))' \ 15 - '$(syshdr_pfx_$(basetarget))' \ 16 - '$(syshdr_offset_$(basetarget))' 13 + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@ 17 14 18 15 quiet_cmd_systbl = SYSTBL $@ 19 - cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 20 - '$(systbl_abis_$(basetarget))' \ 21 - '$(systbl_abi_$(basetarget))' \ 22 - '$(systbl_offset_$(basetarget))' 16 + cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@ 23 17 24 18 $(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 25 19 $(call if_changed,syshdr)
-36
arch/sh/kernel/syscalls/syscallhdr.sh
··· 1 - #!/bin/sh 2 - # SPDX-License-Identifier: GPL-2.0 3 - 4 - in="$1" 5 - out="$2" 6 - my_abis=`echo "($3)" | tr ',' '|'` 7 - prefix="$4" 8 - offset="$5" 9 - 10 - fileguard=_UAPI_ASM_SH_`basename "$out" | sed \ 11 - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ 12 - -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` 13 - grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 14 - printf "#ifndef %s\n" "${fileguard}" 15 - printf "#define %s\n" "${fileguard}" 16 - printf "\n" 17 - 18 - nxt=0 19 - while read nr abi name entry ; do 20 - if [ -z "$offset" ]; then 21 - printf "#define __NR_%s%s\t%s\n" \ 22 - "${prefix}" "${name}" "${nr}" 23 - else 24 - printf "#define __NR_%s%s\t(%s + %s)\n" \ 25 - "${prefix}" "${name}" "${offset}" "${nr}" 26 - fi 27 - nxt=$((nr+1)) 28 - done 29 - 30 - printf "\n" 31 - printf "#ifdef __KERNEL__\n" 32 - printf "#define __NR_syscalls\t%s\n" "${nxt}" 33 - printf "#endif\n" 34 - printf "\n" 35 - printf "#endif /* %s */\n" "${fileguard}" 36 - ) > "$out"
-32
arch/sh/kernel/syscalls/syscalltbl.sh
··· 1 - #!/bin/sh 2 - # SPDX-License-Identifier: GPL-2.0 3 - 4 - in="$1" 5 - out="$2" 6 - my_abis=`echo "($3)" | tr ',' '|'` 7 - my_abi="$4" 8 - offset="$5" 9 - 10 - emit() { 11 - t_nxt="$1" 12 - t_nr="$2" 13 - t_entry="$3" 14 - 15 - while [ $t_nxt -lt $t_nr ]; do 16 - printf "__SYSCALL(%s,sys_ni_syscall)\n" "${t_nxt}" 17 - t_nxt=$((t_nxt+1)) 18 - done 19 - printf "__SYSCALL(%s,%s)\n" "${t_nxt}" "${t_entry}" 20 - } 21 - 22 - grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 23 - nxt=0 24 - if [ -z "$offset" ]; then 25 - offset=0 26 - fi 27 - 28 - while read nr abi name entry ; do 29 - emit $((nxt+offset)) $((nr+offset)) $entry 30 - nxt=$((nr+1)) 31 - done 32 - ) > "$out"
-1
arch/sparc/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 generated-y += syscall_table_32.h 3 3 generated-y += syscall_table_64.h 4 - generated-y += syscall_table_c32.h 5 4 generic-y += export.h 6 5 generic-y += kvm_para.h 7 6 generic-y += mcs_spinlock.h
+9 -21
arch/sparc/kernel/syscalls/Makefile
··· 6 6 $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)') 7 7 8 8 syscall := $(src)/syscall.tbl 9 - syshdr := $(srctree)/$(src)/syscallhdr.sh 10 - systbl := $(srctree)/$(src)/syscalltbl.sh 9 + syshdr := $(srctree)/scripts/syscallhdr.sh 10 + systbl := $(srctree)/scripts/syscalltbl.sh 11 11 12 12 quiet_cmd_syshdr = SYSHDR $@ 13 - cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \ 14 - '$(syshdr_abis_$(basetarget))' \ 15 - '$(syshdr_pfx_$(basetarget))' \ 16 - '$(syshdr_offset_$(basetarget))' 13 + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis $(abis) $< $@ 17 14 18 15 quiet_cmd_systbl = SYSTBL $@ 19 - cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \ 20 - '$(systbl_abis_$(basetarget))' \ 21 - '$(systbl_abi_$(basetarget))' \ 22 - '$(systbl_offset_$(basetarget))' 16 + cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis) $< $@ 23 17 24 - syshdr_abis_unistd_32 := common,32 18 + $(uapi)/unistd_32.h: abis := common,32 25 19 $(uapi)/unistd_32.h: $(syscall) $(syshdr) FORCE 26 20 $(call if_changed,syshdr) 27 21 28 - syshdr_abis_unistd_64 := common,64 22 + $(uapi)/unistd_64.h: abis := common,64 29 23 $(uapi)/unistd_64.h: $(syscall) $(syshdr) FORCE 30 24 $(call if_changed,syshdr) 31 25 32 - systbl_abis_syscall_table_32 := common,32 26 + $(kapi)/syscall_table_32.h: abis := common,32 33 27 $(kapi)/syscall_table_32.h: $(syscall) $(systbl) FORCE 34 28 $(call if_changed,systbl) 35 29 36 - systbl_abis_syscall_table_64 := common,64 30 + $(kapi)/syscall_table_64.h: abis := common,64 37 31 $(kapi)/syscall_table_64.h: $(syscall) $(systbl) FORCE 38 - $(call if_changed,systbl) 39 - 40 - systbl_abis_syscall_table_c32 := common,32 41 - systbl_abi_syscall_table_c32 := c32 42 - $(kapi)/syscall_table_c32.h: $(syscall) $(systbl) FORCE 43 32 $(call if_changed,systbl) 44 33 45 34 uapisyshdr-y += unistd_32.h unistd_64.h 46 35 kapisyshdr-y += syscall_table_32.h \ 47 - syscall_table_64.h \ 48 - syscall_table_c32.h 36 + syscall_table_64.h 49 37 50 38 uapisyshdr-y := $(addprefix $(uapi)/, $(uapisyshdr-y)) 51 39 kapisyshdr-y := $(addprefix $(kapi)/, $(kapisyshdr-y))
-36
arch/sparc/kernel/syscalls/syscallhdr.sh
··· 1 - #!/bin/sh 2 - # SPDX-License-Identifier: GPL-2.0 3 - 4 - in="$1" 5 - out="$2" 6 - my_abis=`echo "($3)" | tr ',' '|'` 7 - prefix="$4" 8 - offset="$5" 9 - 10 - fileguard=_UAPI_ASM_SPARC_`basename "$out" | sed \ 11 - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ 12 - -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'` 13 - grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 14 - printf "#ifndef %s\n" "${fileguard}" 15 - printf "#define %s\n" "${fileguard}" 16 - printf "\n" 17 - 18 - nxt=0 19 - while read nr abi name entry compat ; do 20 - if [ -z "$offset" ]; then 21 - printf "#define __NR_%s%s\t%s\n" \ 22 - "${prefix}" "${name}" "${nr}" 23 - else 24 - printf "#define __NR_%s%s\t(%s + %s)\n" \ 25 - "${prefix}" "${name}" "${offset}" "${nr}" 26 - fi 27 - nxt=$((nr+1)) 28 - done 29 - 30 - printf "\n" 31 - printf "#ifdef __KERNEL__\n" 32 - printf "#define __NR_syscalls\t%s\n" "${nxt}" 33 - printf "#endif\n" 34 - printf "\n" 35 - printf "#endif /* %s */\n" "${fileguard}" 36 - ) > "$out"
-36
arch/sparc/kernel/syscalls/syscalltbl.sh
··· 1 - #!/bin/sh 2 - # SPDX-License-Identifier: GPL-2.0 3 - 4 - in="$1" 5 - out="$2" 6 - my_abis=`echo "($3)" | tr ',' '|'` 7 - my_abi="$4" 8 - offset="$5" 9 - 10 - emit() { 11 - t_nxt="$1" 12 - t_nr="$2" 13 - t_entry="$3" 14 - 15 - while [ $t_nxt -lt $t_nr ]; do 16 - printf "__SYSCALL(%s, sys_nis_syscall, )\n" "${t_nxt}" 17 - t_nxt=$((t_nxt+1)) 18 - done 19 - printf "__SYSCALL(%s, %s, )\n" "${t_nxt}" "${t_entry}" 20 - } 21 - 22 - grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | ( 23 - nxt=0 24 - if [ -z "$offset" ]; then 25 - offset=0 26 - fi 27 - 28 - while read nr abi name entry compat ; do 29 - if [ "$my_abi" = "c32" ] && [ ! -z "$compat" ]; then 30 - emit $((nxt+offset)) $((nr+offset)) $compat 31 - else 32 - emit $((nxt+offset)) $((nr+offset)) $entry 33 - fi 34 - nxt=$((nr+1)) 35 - done 36 - ) > "$out"
+2 -2
arch/sparc/kernel/systbls_32.S
··· 9 9 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) 10 10 */ 11 11 12 - #define __SYSCALL(nr, entry, nargs) .long entry 12 + #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 13 + #define __SYSCALL(nr, entry) .long entry 13 14 .data 14 15 .align 4 15 16 .globl sys_call_table 16 17 sys_call_table: 17 18 #include <asm/syscall_table_32.h> /* 32-bit native syscalls */ 18 - #undef __SYSCALL
+5 -3
arch/sparc/kernel/systbls_64.S
··· 10 10 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) 11 11 */ 12 12 13 - #define __SYSCALL(nr, entry, nargs) .word entry 13 + #define __SYSCALL(nr, entry) .word entry 14 14 .text 15 15 .align 4 16 16 #ifdef CONFIG_COMPAT 17 17 .globl sys_call_table32 18 18 sys_call_table32: 19 - #include <asm/syscall_table_c32.h> /* Compat syscalls */ 19 + #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat) 20 + #include <asm/syscall_table_32.h> /* Compat syscalls */ 21 + #undef __SYSCALL_WITH_COMPAT 20 22 #endif /* CONFIG_COMPAT */ 21 23 22 24 .align 4 23 25 .globl sys_call_table64, sys_call_table 24 26 sys_call_table64: 25 27 sys_call_table: 28 + #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 26 29 #include <asm/syscall_table_64.h> /* 64-bit native syscalls */ 27 - #undef __SYSCALL
+1 -5
arch/xtensa/Makefile
··· 19 19 VARIANT = $(variant-y) 20 20 export VARIANT 21 21 22 - # Test for cross compiling 23 - 24 22 ifneq ($(VARIANT),) 25 - COMPILE_ARCH = $(shell uname -m) 26 - 27 - ifneq ($(COMPILE_ARCH), xtensa) 23 + ifdef cross_compiling 28 24 ifndef CROSS_COMPILE 29 25 CROSS_COMPILE = xtensa_$(VARIANT)- 30 26 endif
+2 -2
certs/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - x509_certificate_list 3 - x509_revocation_list 2 + /x509_certificate_list 3 + /x509_revocation_list
+1 -1
drivers/memory/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ti-emif-asm-offsets.h 2 + /ti-emif-asm-offsets.h
+3
drivers/pinctrl/pinctrl-ingenic.c
··· 11 11 #include <linux/gpio/driver.h> 12 12 #include <linux/interrupt.h> 13 13 #include <linux/io.h> 14 + #include <linux/kernel.h> 14 15 #include <linux/of_device.h> 15 16 #include <linux/of_irq.h> 16 17 #include <linux/of_platform.h> ··· 3854 3853 3855 3854 return 0; 3856 3855 } 3856 + 3857 + #define IF_ENABLED(cfg, ptr) PTR_IF(IS_ENABLED(cfg), (ptr)) 3857 3858 3858 3859 static const struct of_device_id ingenic_pinctrl_of_match[] = { 3859 3860 {
+3 -3
drivers/tty/vt/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - conmakehash 3 - consolemap_deftbl.c 4 - defkeymap.c 2 + /conmakehash 3 + /consolemap_deftbl.c 4 + /defkeymap.c
+2 -2
fs/unicode/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - mkutf8data 3 - utf8data.h 2 + /mkutf8data 3 + /utf8data.h
-6
include/linux/kconfig.h
··· 70 70 */ 71 71 #define IS_ENABLED(option) __or(IS_BUILTIN(option), IS_MODULE(option)) 72 72 73 - /* 74 - * IF_ENABLED(CONFIG_FOO, ptr) evaluates to (ptr) if CONFIG_FOO is set to 'y' 75 - * or 'm', NULL otherwise. 76 - */ 77 - #define IF_ENABLED(option, ptr) (IS_ENABLED(option) ? (ptr) : NULL) 78 - 79 73 #endif /* __LINUX_KCONFIG_H */
+2
include/linux/kernel.h
··· 41 41 */ 42 42 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) 43 43 44 + #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) 45 + 44 46 #define u64_to_user_ptr(x) ( \ 45 47 { \ 46 48 typecheck(u64, (x)); \
+2 -3
kernel/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - kheaders.md5 3 - timeconst.h 4 - hz.bc 2 + /config_data 3 + /kheaders.md5
+7 -2
kernel/Makefile
··· 142 142 143 143 $(obj)/configs.o: $(obj)/config_data.gz 144 144 145 - targets += config_data.gz 146 - $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE 145 + targets += config_data config_data.gz 146 + $(obj)/config_data.gz: $(obj)/config_data FORCE 147 147 $(call if_changed,gzip) 148 + 149 + filechk_cat = cat $< 150 + 151 + $(obj)/config_data: $(KCONFIG_CONFIG) FORCE 152 + $(call filechk,cat) 148 153 149 154 $(obj)/kheaders.o: $(obj)/kheaders_data.tar.xz 150 155
+5 -5
lib/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - gen_crc32table 3 - gen_crc64table 4 - crc32table.h 5 - crc64table.h 6 - oid_registry_data.c 2 + /crc32table.h 3 + /crc64table.h 4 + /gen_crc32table 5 + /gen_crc64table 6 + /oid_registry_data.c
+1 -1
samples/auxdisplay/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - cfag12864b-example 2 + /cfag12864b-example
+2 -1
samples/binderfs/.gitignore
··· 1 - binderfs_example 1 + # SPDX-License-Identifier: GPL-2.0 2 + /binderfs_example
+1 -1
samples/connector/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ucon 2 + /ucon
+1 -1
samples/hidraw/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - hid-example 2 + /hid-example
+1 -1
samples/mei/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - mei-amt-version 2 + /mei-amt-version
+1 -1
samples/nitro_enclaves/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - ne_ioctl_sample 2 + /ne_ioctl_sample
+1 -1
samples/pidfd/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - pidfd-metadata 2 + /pidfd-metadata
+4 -4
samples/seccomp/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - bpf-direct 3 - bpf-fancy 4 - dropper 5 - user-trap 2 + /bpf-direct 3 + /bpf-fancy 4 + /dropper 5 + /user-trap
+1 -1
samples/timers/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - hpet_example 2 + /hpet_example
+2 -2
samples/vfs/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - test-fsmount 3 - test-statx 2 + /test-fsmount 3 + /test-statx
+2 -1
samples/watch_queue/.gitignore
··· 1 - watch_test 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + /watch_test
+1 -1
samples/watchdog/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - watchdog-simple 2 + /watchdog-simple
+9 -9
scripts/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - bin2c 3 - kallsyms 4 - unifdef 5 - recordmcount 6 - sorttable 7 - asn1_compiler 8 - extract-cert 9 - sign-file 10 - insert-sys-cert 2 + /asn1_compiler 3 + /bin2c 4 + /extract-cert 5 + /insert-sys-cert 6 + /kallsyms 11 7 /module.lds 8 + /recordmcount 9 + /sign-file 10 + /sorttable 11 + /unifdef
+1 -1
scripts/Makefile.build
··· 354 354 355 355 targets += $(filter-out $(subdir-builtin), $(real-obj-y)) 356 356 targets += $(filter-out $(subdir-modorder), $(real-obj-m)) 357 - targets += $(lib-y) $(always-y) $(MAKECMDGOALS) 357 + targets += $(real-dtb-y) $(lib-y) $(always-y) $(MAKECMDGOALS) 358 358 359 359 # Linker scripts preprocessor (.lds.S -> .lds) 360 360 # ---------------------------------------------------------------------------
+30 -27
scripts/Makefile.lib
··· 44 44 obj-y := $(filter-out %/, $(obj-y)) 45 45 endif 46 46 47 - # Expand $(foo-objs) $(foo-y) by calling $(call suffix-search,foo.o,-objs -y) 48 - suffix-search = $(strip $(foreach s, $2, $($(1:.o=$s)))) 47 + # Expand $(foo-objs) $(foo-y) etc. by replacing their individuals 48 + suffix-search = $(strip $(foreach s, $3, $($(1:%$(strip $2)=%$s)))) 49 + # List composite targets that are constructed by combining other targets 50 + multi-search = $(sort $(foreach m, $1, $(if $(call suffix-search, $m, $2, $3 -), $m))) 51 + # List primitive targets that are compiled from source files 52 + real-search = $(foreach m, $1, $(if $(call suffix-search, $m, $2, $3 -), $(call suffix-search, $m, $2, $3), $m)) 53 + 49 54 # If $(foo-objs), $(foo-y), $(foo-m), or $(foo-) exists, foo.o is a composite object 50 - multi-search = $(sort $(foreach m, $1, $(if $(call suffix-search, $m, $2 -), $m))) 51 - multi-obj-y := $(call multi-search,$(obj-y),-objs -y) 52 - multi-obj-m := $(call multi-search,$(obj-m),-objs -y -m) 55 + multi-obj-y := $(call multi-search, $(obj-y), .o, -objs -y) 56 + multi-obj-m := $(call multi-search, $(obj-m), .o, -objs -y -m) 53 57 multi-obj-ym := $(multi-obj-y) $(multi-obj-m) 54 58 55 59 # Replace multi-part objects by their individual parts, 56 60 # including built-in.a from subdirectories 57 - real-search = $(foreach m, $1, $(if $(call suffix-search, $m, $2 -), $(call suffix-search, $m, $2), $m)) 58 - real-obj-y := $(call real-search, $(obj-y),-objs -y) 59 - real-obj-m := $(call real-search, $(obj-m),-objs -y -m) 61 + real-obj-y := $(call real-search, $(obj-y), .o, -objs -y) 62 + real-obj-m := $(call real-search, $(obj-m), .o, -objs -y -m) 60 63 61 64 always-y += $(always-m) 62 65 ··· 78 75 # If CONFIG_OF_ALL_DTBS is enabled, all DT blobs are built 79 76 dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-) 80 77 81 - # List all dtbs to be generated by fdtoverlay 82 - overlay-y := $(foreach m,$(dtb-y), $(if $(strip $($(m:.dtb=-dtbs))),$(m),)) 83 - 84 - # Generate symbols for the base files so overlays can be applied to them. 85 - $(foreach m,$(overlay-y), $(eval DTC_FLAGS_$(basename $(firstword $($(m:.dtb=-dtbs)))) += -@)) 86 - 87 - # Add base dtb and overlay dtbo 88 - dtb-y += $(foreach m,$(overlay-y), $($(m:.dtb=-dtbs))) 78 + # Composite DTB (i.e. DTB constructed by overlay) 79 + multi-dtb-y := $(call multi-search, $(dtb-y), .dtb, -dtbs) 80 + # Primitive DTB compiled from *.dts 81 + real-dtb-y := $(call real-search, $(dtb-y), .dtb, -dtbs) 82 + # Base DTB that overlay is applied onto (each first word of $(*-dtbs) expansion) 83 + base-dtb-y := $(foreach m, $(multi-dtb-y), $(firstword $(call suffix-search, $m, .dtb, -dtbs))) 89 84 90 85 always-y += $(dtb-y) 91 86 92 87 ifneq ($(CHECK_DTBS),) 93 - # Don't run schema checks for dtbs created by fdtoverlay as they don't 94 - # have corresponding dts files. 95 - dt-yaml-y := $(filter-out $(overlay-y),$(dtb-y)) 96 - 97 - always-y += $(patsubst %.dtb,%.dt.yaml, $(dt-yaml-y)) 98 - always-y += $(patsubst %.dtbo,%.dt.yaml, $(dt-yaml-y)) 88 + always-y += $(patsubst %.dtb,%.dt.yaml, $(real-dtb-y)) 89 + always-y += $(patsubst %.dtbo,%.dt.yaml, $(real-dtb-y)) 99 90 endif 100 91 101 92 # Add subdir path ··· 102 105 real-obj-y := $(addprefix $(obj)/,$(real-obj-y)) 103 106 real-obj-m := $(addprefix $(obj)/,$(real-obj-m)) 104 107 multi-obj-m := $(addprefix $(obj)/, $(multi-obj-m)) 108 + multi-dtb-y := $(addprefix $(obj)/, $(multi-dtb-y)) 109 + real-dtb-y := $(addprefix $(obj)/, $(real-dtb-y)) 105 110 subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) 106 111 107 112 # Finds the multi-part object the current object will be linked into. 108 113 # If the object belongs to two or more multi-part objects, list them all. 109 114 modname-multi = $(sort $(foreach m,$(multi-obj-ym),\ 110 - $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=)))) 115 + $(if $(filter $*.o, $(call suffix-search, $m, .o, -objs -y -m)),$(m:.o=)))) 111 116 112 117 __modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) 113 118 ··· 251 252 252 253 # Shipped files 253 254 # =========================================================================== 255 + # 'cp' preserves permissions. If you use it to copy a file in read-only srctree, 256 + # the copy would be read-only as well, leading to an error when executing the 257 + # rule next time. Use 'cat' instead in order to generate a writable file. 254 258 255 259 quiet_cmd_shipped = SHIPPED $@ 256 260 cmd_shipped = cat $< > $@ ··· 321 319 322 320 DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) 323 321 322 + # Set -@ if the target is a base DTB that overlay is applied onto 323 + DTC_FLAGS += $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@) 324 + 324 325 # Generate an assembly file to wrap the output of the device tree compiler 325 326 quiet_cmd_dt_S_dtb= DTB $@ 326 327 cmd_dt_S_dtb= \ ··· 355 350 $(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE 356 351 $(call if_changed_dep,dtc) 357 352 358 - overlay-y := $(addprefix $(obj)/, $(overlay-y)) 359 - 360 353 quiet_cmd_fdtoverlay = DTOVL $@ 361 354 cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $(real-prereqs) 362 355 363 - $(overlay-y): FORCE 356 + $(multi-dtb-y): FORCE 364 357 $(call if_changed,fdtoverlay) 365 - $(call multi_depend, $(overlay-y), .dtb, -dtbs) 358 + $(call multi_depend, $(multi-dtb-y), .dtb, -dtbs) 366 359 367 360 DT_CHECKER ?= dt-validate 368 361 DT_CHECKER_FLAGS ?= $(if $(DT_SCHEMA_FILES),,-m)
+1 -1
scripts/basic/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - fixdep 2 + /fixdep
+2 -2
scripts/dtc/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtc 3 - fdtoverlay 2 + /dtc 3 + /fdtoverlay
+1 -1
scripts/gcc-plugins/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - randomize_layout_seed.h 2 + /randomize_layout_seed.h
+1 -1
scripts/genksyms/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - genksyms 2 + /genksyms
+1 -1
scripts/genksyms/Makefile
··· 22 22 23 23 endif 24 24 25 - # -I needed for generated C source (shipped source) 25 + # -I needed for generated C source to include headers in source tree 26 26 HOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src) 27 27 HOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src) 28 28
+4 -4
scripts/mod/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - elfconfig.h 3 - mk_elfconfig 4 - modpost 5 - devicetable-offsets.h 2 + /devicetable-offsets.h 3 + /elfconfig.h 4 + /mk_elfconfig 5 + /modpost
+1 -1
scripts/nsdeps
··· 44 44 for source_file in $mod_source_files; do 45 45 sed '/MODULE_IMPORT_NS/Q' $source_file > ${source_file}.tmp 46 46 offset=$(wc -l ${source_file}.tmp | awk '{print $1;}') 47 - cat $source_file | grep MODULE_IMPORT_NS | LANG=C sort -u >> ${source_file}.tmp 47 + cat $source_file | grep MODULE_IMPORT_NS | LC_ALL=C sort -u >> ${source_file}.tmp 48 48 tail -n +$((offset +1)) ${source_file} | grep -v MODULE_IMPORT_NS >> ${source_file}.tmp 49 49 if ! diff -q ${source_file} ${source_file}.tmp; then 50 50 mv ${source_file}.tmp ${source_file}
+1 -1
scripts/recordmcount.pl
··· 497 497 # 498 498 # Step 2: find the sections and mcount call sites 499 499 # 500 - open(IN, "LANG=C $objdump -hdr $inputfile|") || die "error running $objdump"; 500 + open(IN, "LC_ALL=C $objdump -hdr $inputfile|") || die "error running $objdump"; 501 501 502 502 my $text; 503 503
+31
scripts/remove-stale-files
··· 1 + #!/bin/sh 2 + 3 + set -e 4 + 5 + # When you move, remove or rename generated files, you probably also update 6 + # .gitignore and cleaning rules in the Makefile. This is the right thing 7 + # to do. However, people usually do 'git pull', 'git bisect', etc. without 8 + # running 'make clean'. Then, the stale generated files are left over, often 9 + # causing build issues. 10 + # 11 + # Also, 'git status' shows such stale build artifacts as untracked files. 12 + # What is worse, some people send a wrong patch to get them back to .gitignore 13 + # without checking the commit history. 14 + # 15 + # So, when you (re)move generated files, please move the cleaning rules from 16 + # the Makefile to this script. This is run before Kbuild starts building 17 + # anything, so people will not be annoyed by such garbage files. 18 + # 19 + # This script is not intended to grow endlessly. Rather, it is a temporary scrap 20 + # yard. Stale files stay in this file for a while (for some release cycles?), 21 + # then will be really dead and removed from the code base entirely. 22 + 23 + # These were previously generated source files. When you are building the kernel 24 + # with O=, make sure to remove the stale files in the output tree. Otherwise, 25 + # the build system wrongly compiles the stale ones. 26 + if [ -n "${building_out_of_srctree}" ]; then 27 + for f in fdt_rw.c fdt_ro.c fdt_wip.c fdt.c 28 + do 29 + rm -f arch/arm/boot/compressed/${f} 30 + done 31 + fi
+1 -1
scripts/setlocalversion
··· 126 126 fi 127 127 128 128 # Check for svn and a svn repo. 129 - if rev=$(LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'); then 129 + if rev=$(LC_ALL=C svn info 2>/dev/null | grep '^Last Changed Rev'); then 130 130 rev=$(echo $rev | awk '{print $NF}') 131 131 printf -- '-svn%s' "$rev" 132 132
+1 -1
scripts/tags.sh
··· 326 326 327 327 # Remove structure forward declarations. 328 328 if [ -n "$remove_structs" ]; then 329 - LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1 329 + LC_ALL=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1 330 330 fi
+1 -1
tools/testing/selftests/net/mptcp/mptcp_connect.sh
··· 274 274 ip netns exec ${disabled_ns} sysctl -q net.mptcp.enabled=0 275 275 276 276 local err=0 277 - LANG=C ip netns exec ${disabled_ns} ./mptcp_connect -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \ 277 + LC_ALL=C ip netns exec ${disabled_ns} ./mptcp_connect -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \ 278 278 grep -q "^socket: Protocol not available$" && err=1 279 279 ip netns delete ${disabled_ns} 280 280
+2 -2
usr/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - gen_init_cpio 3 - initramfs_data.cpio 2 + /gen_init_cpio 3 + /initramfs_data.cpio 4 4 /initramfs_inc_data
+1 -1
usr/gen_initramfs.sh
··· 147 147 header "$1" 148 148 149 149 srcdir=$(echo "$1" | sed -e 's://*:/:g') 150 - dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort) 150 + dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LC_ALL=C sort) 151 151 152 152 # If $dirlist is only one line, then the directory is empty 153 153 if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then
+1 -3
usr/include/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - * 3 - !.gitignore 4 - !Makefile 2 + /*/