mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-01 00:58:39 +02:00 
			
		
		
		
	Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild misc updates from Michal Marek:
 "This is the non-critical part of kbuild for v3.16-rc1:
   - make deb-pkg can do s390x and arm64
   - new patterns in scripts/tags.sh
   - scripts/tags.sh skips userspace tools' sources (which sometimes
     have copies of kernel structures) and symlinks
   - improvements to the objdiff tool
   - two new coccinelle patches
   - other minor fixes"
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts: objdiff: support directories for the augument of record command
  scripts: objdiff: fix a comment
  scripts: objdiff: change the extension of disassembly from .o to .dis
  scripts: objdiff: improve path flexibility for record command
  scripts: objdiff: remove unnecessary code
  scripts: objdiff: direct error messages to stderr
  scripts: objdiff: get the path to .tmp_objdiff more simply
  deb-pkg: Add automatic support for s390x architecture
  coccicheck: Add unneeded return variable test
  kbuild: Fix a typo in documentation
  kbuild: trivial - use tabs for code indent where possible
  kbuild: trivial - remove trailing empty lines
  coccinelle: Check for missing NULL terminators in of_device_id tables
  scripts/tags.sh: ignore symlink'ed source files
  scripts/tags.sh: add regular expression replacement pattern for memcg
  builddeb: add arm64 in the supported architectures
  builddeb: use $OBJCOPY variable instead of objcopy
  scripts/tags.sh: ignore code of user space tools
  scripts/tags.sh: add pattern for DEFINE_HASHTABLE
  .gitignore: ignore Module.symvers in all directories
			
			
This commit is contained in:
		
						commit
						c1fdb2d338
					
				
					 50 changed files with 289 additions and 158 deletions
				
			
		
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -22,7 +22,6 @@ | |||
| *.lst | ||||
| *.symtypes | ||||
| *.order | ||||
| modules.builtin | ||||
| *.elf | ||||
| *.bin | ||||
| *.gz | ||||
|  | @ -33,6 +32,8 @@ modules.builtin | |||
| *.lzo | ||||
| *.patch | ||||
| *.gcno | ||||
| modules.builtin | ||||
| Module.symvers | ||||
| 
 | ||||
| # | ||||
| # Top-level generic files | ||||
|  | @ -44,7 +45,6 @@ modules.builtin | |||
| /vmlinuz | ||||
| /System.map | ||||
| /Module.markers | ||||
| /Module.symvers | ||||
| 
 | ||||
| # | ||||
| # Debian directory (make deb-pkg) | ||||
|  |  | |||
|  | @ -470,7 +470,7 @@ build. | |||
| 
 | ||||
| 	Sometimes, an external module uses exported symbols from | ||||
| 	another external module. kbuild needs to have full knowledge of | ||||
| 	all symbols to avoid spliitting out warnings about undefined | ||||
| 	all symbols to avoid spitting out warnings about undefined | ||||
| 	symbols. Three solutions exist for this situation. | ||||
| 
 | ||||
| 	NOTE: The method with a top-level kbuild file is recommended | ||||
|  |  | |||
|  | @ -21,4 +21,3 @@ all: $(patsubst %, $(obj)/%, $(generic-y)) | |||
| 
 | ||||
| $(obj)/%.h: | ||||
| 	$(call cmd,wrap) | ||||
| 
 | ||||
|  |  | |||
|  | @ -167,4 +167,3 @@ $(host-cshlib): $(obj)/%: $(host-cshobjs) FORCE | |||
| 
 | ||||
| targets += $(host-csingle)  $(host-cmulti) $(host-cobjs)\ | ||||
| 	   $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) | ||||
| 
 | ||||
|  |  | |||
|  | @ -173,4 +173,3 @@ while (my $line = <STDIN>) { | |||
| 
 | ||||
| # Sort output by size (last field) | ||||
| print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										62
									
								
								scripts/coccinelle/misc/of_table.cocci
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								scripts/coccinelle/misc/of_table.cocci
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,62 @@ | |||
| /// Make sure of_device_id tables are NULL terminated | ||||
| // | ||||
| // Keywords: of_table | ||||
| // Confidence: Medium | ||||
| // Options: --include-headers | ||||
| 
 | ||||
| virtual patch | ||||
| virtual context | ||||
| virtual org | ||||
| virtual report | ||||
| 
 | ||||
| @depends on context@ | ||||
| identifier var, arr; | ||||
| expression E; | ||||
| @@ | ||||
| struct of_device_id arr[] = { | ||||
| 	..., | ||||
| 	{ | ||||
| 	.var = E, | ||||
| *	} | ||||
| }; | ||||
| 
 | ||||
| @depends on patch@ | ||||
| identifier var, arr; | ||||
| expression E; | ||||
| @@ | ||||
| struct of_device_id arr[] = { | ||||
| 	..., | ||||
| 	{ | ||||
| 	.var = E, | ||||
| -	} | ||||
| +	}, | ||||
| +	{ } | ||||
| }; | ||||
| 
 | ||||
| @r depends on org || report@ | ||||
| position p1; | ||||
| identifier var, arr; | ||||
| expression E; | ||||
| @@ | ||||
| struct of_device_id arr[] = { | ||||
| 	..., | ||||
| 	{ | ||||
| 	.var = E, | ||||
| 	} | ||||
| 	@p1 | ||||
| }; | ||||
| 
 | ||||
| @script:python depends on org@ | ||||
| p1 << r.p1; | ||||
| arr << r.arr; | ||||
| @@ | ||||
| 
 | ||||
| cocci.print_main(arr,p1) | ||||
| 
 | ||||
| @script:python depends on report@ | ||||
| p1 << r.p1; | ||||
| arr << r.arr; | ||||
| @@ | ||||
| 
 | ||||
| msg = "%s is not NULL terminated at line %s" % (arr, p1[0].line) | ||||
| coccilib.report.print_report(p1[0],msg) | ||||
							
								
								
									
										66
									
								
								scripts/coccinelle/misc/returnvar.cocci
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								scripts/coccinelle/misc/returnvar.cocci
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,66 @@ | |||
| /// | ||||
| /// Removes unneeded variable used to store return value. | ||||
| /// | ||||
| // Confidence: Moderate | ||||
| // Copyright: (C) 2012 Peter Senna Tschudin, INRIA/LIP6.  GPLv2. | ||||
| // URL: http://coccinelle.lip6.fr/ | ||||
| // Comments: Comments on code can be deleted if near code that is removed. | ||||
| //           "when strict" can be removed to get more hits, but adds false | ||||
| //           positives | ||||
| // Options: --no-includes --include-headers | ||||
| 
 | ||||
| virtual patch | ||||
| virtual report | ||||
| virtual context | ||||
| virtual org | ||||
| 
 | ||||
| @depends on patch@ | ||||
| type T; | ||||
| constant C; | ||||
| identifier ret; | ||||
| @@ | ||||
| - T ret = C; | ||||
| ... when != ret | ||||
|     when strict | ||||
| return | ||||
| - ret | ||||
| + C | ||||
| ; | ||||
| 
 | ||||
| @depends on context@ | ||||
| type T; | ||||
| constant C; | ||||
| identifier ret; | ||||
| @@ | ||||
| * T ret = C; | ||||
| ... when != ret | ||||
|     when strict | ||||
| * return ret; | ||||
| 
 | ||||
| @r1 depends on report || org@ | ||||
| type T; | ||||
| constant C; | ||||
| identifier ret; | ||||
| position p1, p2; | ||||
| @@ | ||||
| T ret@p1 = C; | ||||
| ... when != ret | ||||
|     when strict | ||||
| return ret@p2; | ||||
| 
 | ||||
| @script:python depends on report@ | ||||
| p1 << r1.p1; | ||||
| p2 << r1.p2; | ||||
| C << r1.C; | ||||
| ret << r1.ret; | ||||
| @@ | ||||
| coccilib.report.print_report(p1[0], "Unneeded variable: \"" + ret + "\". Return \"" + C + "\" on line " + p2[0].line) | ||||
| 
 | ||||
| @script:python depends on org@ | ||||
| p1 << r1.p1; | ||||
| p2 << r1.p2; | ||||
| C << r1.C; | ||||
| ret << r1.ret; | ||||
| @@ | ||||
| cocci.print_main("unneeded \"" + ret + "\" variable", p1) | ||||
| cocci.print_sec("return " + C + " here", p2) | ||||
|  | @ -223,4 +223,3 @@ while [ "$1" != "" ] ; do | |||
| 		;; | ||||
| 	esac | ||||
| done | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								scripts/dtc/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								scripts/dtc/.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -2,4 +2,3 @@ dtc | |||
| dtc-lexer.lex.c | ||||
| dtc-parser.tab.c | ||||
| dtc-parser.tab.h | ||||
| 
 | ||||
|  |  | |||
|  | @ -88,4 +88,3 @@ struct boot_info *dt_from_fs(const char *dirname) | |||
| 
 | ||||
| 	return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -81,4 +81,3 @@ int fdt_create_empty_tree(void *buf, int bufsize) | |||
| 
 | ||||
| 	return fdt_open_into(buf, buf, bufsize); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -281,4 +281,3 @@ void dt_to_source(FILE *f, struct boot_info *bi) | |||
| 
 | ||||
| 	write_tree_source_node(f, bi->dt, 0); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -28,5 +28,3 @@ for arch in ${archs}; do | |||
| 		;; | ||||
| 	esac | ||||
| done | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -319,4 +319,3 @@ $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck | |||
| $(obj)/gconf.glade.h: $(obj)/gconf.glade | ||||
| 	$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
 | ||||
| 	$(obj)/gconf.glade | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,4 +11,3 @@ EOF | |||
| if [ ! "$?" -eq "0"  ]; then | ||||
| 	echo -DKBUILD_NO_NLS; | ||||
| fi | ||||
| 
 | ||||
|  |  | |||
|  | @ -1034,4 +1034,3 @@ int main(int ac, char **av) | |||
| 
 | ||||
| 	return res; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1554,4 +1554,3 @@ int main(int ac, char **av) | |||
| 	endwin(); | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -155,5 +155,3 @@ void *xcalloc(size_t nmemb, size_t size) | |||
| 	fprintf(stderr, "Out of memory.\n"); | ||||
| 	exit(1); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -367,4 +367,3 @@ OPTION: | |||
| EOT | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -42,4 +42,3 @@ | |||
| # (At least sparc64 has __crc_ in the middle). | ||||
| 
 | ||||
| $NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										1
									
								
								scripts/mod/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								scripts/mod/.gitignore
									
									
									
									
										vendored
									
									
								
							|  | @ -2,4 +2,3 @@ elfconfig.h | |||
| mk_elfconfig | ||||
| modpost | ||||
| devicetable-offsets.h | ||||
| 
 | ||||
|  |  | |||
|  | @ -650,13 +650,11 @@ static int do_of_entry (const char *filename, void *symval, char *alias) | |||
| 	DEF_FIELD_ADDR(symval, of_device_id, type); | ||||
| 	DEF_FIELD_ADDR(symval, of_device_id, compatible); | ||||
| 
 | ||||
|     len = sprintf (alias, "of:N%sT%s", | ||||
|                     (*name)[0] ? *name : "*", | ||||
| 	len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*", | ||||
| 		      (*type)[0] ? *type : "*"); | ||||
| 
 | ||||
| 	if (compatible[0]) | ||||
|         sprintf (&alias[len], "%sC%s", | ||||
|                      (*type)[0] ? "*" : "", | ||||
| 		sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "", | ||||
| 			*compatible); | ||||
| 
 | ||||
| 	/* Replace all whitespace with underscores */ | ||||
|  |  | |||
|  | @ -54,4 +54,3 @@ main(int argc, char **argv) | |||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -25,25 +25,47 @@ | |||
| # | ||||
| # Note: 'make mrproper' will also remove .tmp_objdiff | ||||
| 
 | ||||
| GIT_DIR="`git rev-parse --git-dir`" | ||||
| SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd) | ||||
| 
 | ||||
| if [ -d "$GIT_DIR" ]; then | ||||
| 	TMPD="${GIT_DIR%git}tmp_objdiff" | ||||
| 
 | ||||
| 	[ -d "$TMPD" ] || mkdir "$TMPD" | ||||
| else | ||||
| 	echo "ERROR: git directory not found." | ||||
| if [ -z "$SRCTREE" ]; then | ||||
| 	echo >&2 "ERROR: Not a git repository." | ||||
| 	exit 1 | ||||
| fi | ||||
| 
 | ||||
| TMPD=$SRCTREE/.tmp_objdiff | ||||
| 
 | ||||
| usage() { | ||||
| 	echo "Usage: $0 <command> <args>" | ||||
| 	echo "  record    <list of object files>" | ||||
| 	echo "  diff      <commitA> <commitB>" | ||||
| 	echo "  clean     all | <commit>" | ||||
| 	echo >&2 "Usage: $0 <command> <args>" | ||||
| 	echo >&2 "  record    <list of object files or directories>" | ||||
| 	echo >&2 "  diff      <commitA> <commitB>" | ||||
| 	echo >&2 "  clean     all | <commit>" | ||||
| 	exit 1 | ||||
| } | ||||
| 
 | ||||
| get_output_dir() { | ||||
| 	dir=${1%/*} | ||||
| 
 | ||||
| 	if [ "$dir" = "$1" ]; then | ||||
| 		dir=. | ||||
| 	fi | ||||
| 
 | ||||
| 	dir=$(cd $dir; pwd) | ||||
| 
 | ||||
| 	echo $TMPD/$CMT${dir#$SRCTREE} | ||||
| } | ||||
| 
 | ||||
| do_objdump() { | ||||
| 	dir=$(get_output_dir $1) | ||||
| 	base=${1##*/} | ||||
| 	dis=$dir/${base%.o}.dis | ||||
| 
 | ||||
| 	[ ! -d "$dir" ] && mkdir -p $dir | ||||
| 
 | ||||
| 	# remove addresses for a cleaner diff | ||||
| 	# http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and | ||||
| 	$OBJDUMP -D $1 | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis | ||||
| } | ||||
| 
 | ||||
| dorecord() { | ||||
| 	[ $# -eq 0 ] && usage | ||||
| 
 | ||||
|  | @ -52,20 +74,16 @@ dorecord() { | |||
| 	CMT="`git rev-parse --short HEAD`" | ||||
| 
 | ||||
| 	OBJDUMP="${CROSS_COMPILE}objdump" | ||||
| 	OBJDIFFD="$TMPD/$CMT" | ||||
| 
 | ||||
| 	[ ! -d "$OBJDIFFD" ] && mkdir -p "$OBJDIFFD" | ||||
| 
 | ||||
| 	for f in $FILES; do | ||||
| 		dn="${f%/*}" | ||||
| 		bn="${f##*/}" | ||||
| 
 | ||||
| 		[ ! -d "$OBJDIFFD/$dn" ] && mkdir -p "$OBJDIFFD/$dn" | ||||
| 
 | ||||
| 		# remove addresses for a more clear diff | ||||
| 		# http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and | ||||
| 		$OBJDUMP -D "$f" | sed "s/^[[:space:]]\+[0-9a-f]\+//" \ | ||||
| 			>"$OBJDIFFD/$dn/$bn" | ||||
| 	for d in $FILES; do | ||||
| 		if [ -d "$d" ]; then | ||||
| 			for f in $(find $d -name '*.o') | ||||
| 			do | ||||
| 				do_objdump $f | ||||
| 			done | ||||
| 		else | ||||
| 			do_objdump $d | ||||
| 		fi | ||||
| 	done | ||||
| } | ||||
| 
 | ||||
|  | @ -90,12 +108,12 @@ dodiff() { | |||
| 	DSTD="$TMPD/$DST" | ||||
| 
 | ||||
| 	if [ ! -d "$SRCD" ]; then | ||||
| 		echo "ERROR: $SRCD doesn't exist" | ||||
| 		echo >&2 "ERROR: $SRCD doesn't exist" | ||||
| 		exit 1 | ||||
| 	fi | ||||
| 
 | ||||
| 	if [ ! -d "$DSTD" ]; then | ||||
| 		echo "ERROR: $DSTD doesn't exist" | ||||
| 		echo >&2 "ERROR: $DSTD doesn't exist" | ||||
| 		exit 1 | ||||
| 	fi | ||||
| 
 | ||||
|  | @ -114,7 +132,7 @@ doclean() { | |||
| 		if [ -d "$TMPD/$CMT" ]; then | ||||
| 			rm -rf $TMPD/$CMT | ||||
| 		else | ||||
| 			echo "$CMT not found" | ||||
| 			echo >&2 "$CMT not found" | ||||
| 		fi | ||||
| 	fi | ||||
| } | ||||
|  | @ -135,7 +153,7 @@ case "$1" in | |||
| 		doclean $* | ||||
| 		;; | ||||
| 	*) | ||||
| 		echo "Unrecognized command '$1'" | ||||
| 		echo >&2 "Unrecognized command '$1'" | ||||
| 		exit 1 | ||||
| 		;; | ||||
| esac | ||||
|  |  | |||
|  | @ -143,4 +143,3 @@ help: FORCE | |||
| 	@echo '  perf-targz-src-pkg  - Build $(perf-tar).tar.gz source tarball' | ||||
| 	@echo '  perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball' | ||||
| 	@echo '  perf-tarxz-src-pkg  - Build $(perf-tar).tar.xz source tarball' | ||||
| 
 | ||||
|  |  | |||
|  | @ -35,13 +35,15 @@ create_package() { | |||
| 	sparc*) | ||||
| 		debarch=sparc ;; | ||||
| 	s390*) | ||||
| 		debarch=s390 ;; | ||||
| 		debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;; | ||||
| 	ppc*) | ||||
| 		debarch=powerpc ;; | ||||
| 	parisc*) | ||||
| 		debarch=hppa ;; | ||||
| 	mips*) | ||||
| 		debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el || true) ;; | ||||
| 	arm64) | ||||
| 		debarch=arm64 ;; | ||||
| 	arm*) | ||||
| 		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;; | ||||
| 	*) | ||||
|  | @ -155,11 +157,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then | |||
| 			for module in $(find lib/modules/ -name *.ko); do | ||||
| 				mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module) | ||||
| 				# only keep debug symbols in the debug file | ||||
| 				objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module | ||||
| 				$OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module | ||||
| 				# strip original module from debug symbols | ||||
| 				objcopy --strip-debug $module | ||||
| 				$OBJCOPY --strip-debug $module | ||||
| 				# then add a link to those | ||||
| 				objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module | ||||
| 				$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module | ||||
| 			done | ||||
| 		) | ||||
| 	fi | ||||
|  |  | |||
|  | @ -136,4 +136,3 @@ esac | |||
| echo "Tarball successfully created in ${tarball}${file_ext}" | ||||
| 
 | ||||
| exit 0 | ||||
| 
 | ||||
|  |  | |||
|  | @ -512,4 +512,3 @@ int main(int argc, char *argv[]) | |||
|     } | ||||
|     exit(0); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -487,5 +487,3 @@ main(int argc, char *argv[]) | |||
| 	} | ||||
| 	return !!n_error; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -19,4 +19,3 @@ testit t3-l2-pi.tst | |||
| testit t4-l2-pi-deboost.tst | ||||
| testit t5-l4-pi-boost-deboost.tst | ||||
| testit t5-l4-pi-boost-deboost-setsched.tst | ||||
| 
 | ||||
|  |  | |||
|  | @ -216,5 +216,3 @@ while 1: | |||
| # Normal exit pass | ||||
| print "Pass" | ||||
| sys.exit(0) | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -66,4 +66,3 @@ if [ "eq$dodev" != "eq" ]; then | |||
| 	$SF file_contexts /dev | ||||
| 	mount --move /mnt /dev | ||||
| fi | ||||
| 
 | ||||
|  |  | |||
|  | @ -126,4 +126,3 @@ def main(): | |||
| 		print (convert_line(line, base_time),) | ||||
| 
 | ||||
| main() | ||||
| 
 | ||||
|  |  | |||
|  | @ -25,6 +25,9 @@ else | |||
| 	tree=${srctree}/ | ||||
| fi | ||||
| 
 | ||||
| # ignore userspace tools | ||||
| ignore="$ignore ( -path ${tree}tools ) -prune -o" | ||||
| 
 | ||||
| # Find all available archs | ||||
| find_all_archs() | ||||
| { | ||||
|  | @ -47,7 +50,8 @@ find_arch_sources() | |||
| 	for i in $archincludedir; do | ||||
| 		prune="$prune -wholename $i -prune -o" | ||||
| 	done | ||||
| 	find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" -print; | ||||
| 	find ${tree}arch/$1 $ignore $subarchprune $prune -name "$2" \ | ||||
| 		-not -type l -print; | ||||
| } | ||||
| 
 | ||||
| # find sources in arch/$1/include | ||||
|  | @ -57,14 +61,15 @@ find_arch_include_sources() | |||
| 					-name include -type d -print); | ||||
| 	if [ -n "$include" ]; then | ||||
| 		archincludedir="$archincludedir $include" | ||||
| 		find $include $ignore -name "$2" -print; | ||||
| 		find $include $ignore -name "$2" -not -type l -print; | ||||
| 	fi | ||||
| } | ||||
| 
 | ||||
| # find sources in include/ | ||||
| find_include_sources() | ||||
| { | ||||
| 	find ${tree}include $ignore -name config -prune -o -name "$1" -print; | ||||
| 	find ${tree}include $ignore -name config -prune -o -name "$1" \ | ||||
| 		-not -type l -print; | ||||
| } | ||||
| 
 | ||||
| # find sources in rest of tree | ||||
|  | @ -73,7 +78,7 @@ find_other_sources() | |||
| { | ||||
| 	find ${tree}* $ignore \ | ||||
| 	     \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ | ||||
| 	       -name "$1" -print; | ||||
| 	       -name "$1" -not -type l -print; | ||||
| } | ||||
| 
 | ||||
| find_sources() | ||||
|  | @ -187,6 +192,10 @@ exuberant() | |||
| 	--regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ | ||||
| 	--regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ | ||||
| 	--regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'		\ | ||||
| 	--regex-c++='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/'		\ | ||||
| 	--regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/'		\ | ||||
| 	--regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/'	\ | ||||
| 	--regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ | ||||
| 	--regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ | ||||
| 	--regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ | ||||
| 	--regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/'	\ | ||||
|  | @ -201,7 +210,8 @@ exuberant() | |||
| 	--regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/'	\ | ||||
| 	--regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/'		\ | ||||
| 	--regex-c='/(^\s)OFFSET\((\w*)/\2/v/'				\ | ||||
| 	--regex-c='/(^\s)DEFINE\((\w*)/\2/v/' | ||||
| 	--regex-c='/(^\s)DEFINE\((\w*)/\2/v/'				\ | ||||
| 	--regex-c='/DEFINE_HASHTABLE\((\w*)/\1/v/' | ||||
| 
 | ||||
| 	all_kconfigs | xargs $1 -a                              \ | ||||
| 	--langdef=kconfig --language-force=kconfig              \ | ||||
|  | @ -244,9 +254,14 @@ emacs() | |||
| 	--regex='/__CLEARPAGEFLAG_NOOP(\([^,)]*\).*/__ClearPage\1/' \ | ||||
| 	--regex='/TESTCLEARFLAG_FALSE(\([^,)]*\).*/TestClearPage\1/' \ | ||||
| 	--regex='/__TESTCLEARFLAG_FALSE(\([^,)]*\).*/__TestClearPage\1/' \ | ||||
| 	--regex='/TESTPCGFLAG\(([^,)]*).*/PageCgroup\1/'	\ | ||||
| 	--regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/'	\ | ||||
| 	--regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/'	\ | ||||
| 	--regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ | ||||
| 	--regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'		\ | ||||
| 	--regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ | ||||
| 	--regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/' | ||||
| 	--regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\ | ||||
| 	--regex='/DEFINE_HASHTABLE\((\w*)/\1/v/' | ||||
| 
 | ||||
| 	all_kconfigs | xargs $1 -a                              \ | ||||
| 	--regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Linus Torvalds
						Linus Torvalds