aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2010-03-08Merge branch 'for-next' into for-linusJiri Kosina1-1/+1
Conflicts: Documentation/filesystems/proc.txt arch/arm/mach-u300/include/mach/debug-macro.S drivers/net/qlge/qlge_ethtool.c drivers/net/qlge/qlge_main.c drivers/net/typhoon.c
2010-03-08Revert "kbuild: specify absolute paths for cscope"Michal Marek1-7/+3
This reverts commit eb8f844c0a41c4529a7d06b7801296eca9ae67aa. Ian Campbell writes: > I keep my kernel source tree on a more powerful build box where I run my > builds etc (including "make cscope") but run my editor from my > workstation with an NFS mount to the source. This worked fine for me > using relative paths for cscope. Using absolute paths in cscope breaks > this previously working setup because the root path is not the same on > both systems. I guess this is similar to moving the source tree around. > > Without wanting to start a flamewar it really sounds to me like we are > working around a vim (or cscope) bug here, emacs with cscope bindings > works fine in this configuration. Given that absolute paths can be forced by make O=. cscope, change the default back to relative paths. Ian Campbell <[email protected]> Cc: Daniel Vetter <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07headers_install: use local file handlesStephen Hemminger1-9/+10
Better practice to use 3 arg open and local file handles. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07headers_check: fix perl warningsStephen Hemminger1-5/+6
According to PBP; best way practice is to use local reference for file handle and three argument open. Also perl prototypes are a mistake. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07export_report: fix perl warningsStephen Hemminger1-17/+20
Use local file handles, use three argument open. Don't modify arguments in perl grep (use sed instead) Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07profile2linkerlist: fix perl warningsStephen Hemminger1-5/+3
Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: WANG Cong <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07namespace: perlcritic warningsStephen Hemminger1-32/+33
Use local file handle not global. Make loop and other variables local in scope. Signed-off-by: Stephen Hemminger <[email protected]> Cc: Hui Zhu <[email protected]> Cc: Cong Wang <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07checkversion: perl cleanupStephen Hemminger1-12/+11
Turn on strict checking. Use three arguement open Standard practice in perl is to use undef not zero for false Signed-off-by: Stephen Hemminger <[email protected]> Cc: Cong Wang <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07checkincludes: fix perlcritic warningsStephen Hemminger1-10/+14
Turn on strict checking. Use local file handles. Use three argument open. Signed-off-by: Stephen Hemminger <[email protected]> Cc: Cong Wang <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07scripts: improve checkstackStephen Hemminger1-10/+6
Cleanup checkstack script: * Turn on strict checking * Fix resulting error message because the declaration syntax was incorrect. * Remove incorrect and misleading use of prototype - prototype not required for this type of sort function because $a and $b are being used in this contex - if prototype was being used it should be for both arguments * Use closure for sort function Signed-off-by: Stephen Hemminger <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Cong Wang <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-07kbuild: deb-pkg md5sumsFEJES Jozsef1-0/+2
This patch creates the standard md5sums file for 'make deb-pkg' just like the dh_md5sums debhelper script. Signed-off-by: Jozsef Fejes <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-06checkpatch: warn on unnecessary spaces before quoted newlinesJoe Perches1-0/+5
Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch.pl: warn if an adding line introduce spaces before tabs.Alberto Panizzo1-0/+6
Signed-off-by: Alberto Panizzo <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch.pl: extend list of expected-to-be-const structuresEmese Revfy1-2/+39
Based on Arjan's suggestion, extend the list of ops structures that should be const. Signed-off-by: Emese Revfy <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch.pl: add union and struct to the exceptions listStefani Seibold1-0/+2
Here is a small code snippet, which will be complained about by checkpatch.pl: #define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \ union { \ struct { \ unsigned int in; \ unsigned int out; \ }; \ char rectype[recsize]; \ ptrtype *ptr; \ const ptrtype *ptr_const; \ }; This construct is legal and safe, so checkpatch.pl should accept this. It should be also true for struct defined in a macro. Add the `struct' and `union' keywords to the exceptions list of the checkpatch.pl script, to prevent error message "Macros with multiple statements should be enclosed in a do - while loop". Otherwise it is not possible to build a struct or union with a macro. Signed-off-by: Stefani Seibold <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch: fix false positive on __initconstWolfram Sang1-1/+4
checkpatch falsely complained about '__initconst' because it thought the 'const' needed a space before. Fix this by changing the list of attributes: - add '__initconst' - force plain 'init' to contain a word-boundary at the end Signed-off-by: Wolfram Sang <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch.pl: allow > 80 char lines for logging functions not just printkJoe Perches1-1/+9
Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06checkpatch: trivial fix for trailing statements checkHidetoshi Seto1-1/+3
In case if the statement and the conditional are in one line, the line appears in the report doubly. And items of this check have no blank line before the next item. This patch fixes these trivial problems, to improve readability of the report. [sample.c] > if (cond1 > && cond2 > && cond3) func_foo(); > > if (cond4) func_bar(); Before: > ERROR: trailing statements should be on next line > #1: FILE: sample.c:1: > +if (cond1 > [...] > + && cond3) func_foo(); > ERROR: trailing statements should be on next line > #5: FILE: sample.c:5: > +if (cond4) func_bar(); > +if (cond4) func_bar(); > total: 2 errors, 0 warnings, 5 lines checked After: > ERROR: trailing statements should be on next line > #1: FILE: sample.c:1: > +if (cond1 > [...] > + && cond3) func_foo(); > > ERROR: trailing statements should be on next line > #5: FILE: sample.c:5: > +if (cond4) func_bar(); > > total: 2 errors, 0 warnings, 5 lines checked Signed-off-by: Hidetoshi Seto <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/checkpatch.pl: add WARN on sizeof(&foo)Joe Perches1-0/+5
sizeof(&foo) is frequently an error. Warn on its use. Signed-off-by: Joe Perches <[email protected]> Cc: Andy Whitcroft <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/get_maintainer.pl: fix possible infinite loopJoe Perches1-2/+2
If MAINTAINERS section entries are misformatted, it was possible to have an infinite loop. Correct the defect by always moving the index to the end of section + 1 Also, exit check for exclude as soon as possible. Signed-off-by: Joe Perches <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06get_maintainer: quote email address with periodStephen Hemminger1-2/+2
Picky mail systems won't accept email addresses where recipient has period in name; ie. David S. Miller <davemloft.net> will not work. Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06get_maintainer: fix perlcritic warningsStephen Hemminger1-14/+20
perlcritic is a standard checker for Perl Best Practices. This patch fixes most of the warnings in the get_maintainer script. If kernel programmers are going to have checkpatch they should write clean scripts as well... Bareword file handle opened at line 176, column 1. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 176, column 1. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 207, column 5. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 207, column 5. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 246, column 6. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 246, column 6. See page 207 of PBP. (Severity: 5) Bareword file handle opened at line 258, column 2. See pages 202,204 of PBP. (Severity: 5) Two-argument "open" used at line 258, column 2. See page 207 of PBP. (Severity: 5) Expression form of "eval" at line 983, column 17. See page 161 of PBP. (Severity: 5) Expression form of "eval" at line 985, column 17. See page 161 of PBP. (Severity: 5) Subroutine prototypes used at line 1186, column 1. See page 194 of PBP. (Severity: 5) Subroutine prototypes used at line 1206, column 1. See page 194 of PBP. (Severity: 5) Signed-off-by: Stephen Hemminger <[email protected]> Acked-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/get_maintainer.pl: add ability to read from STDINJoe Perches1-11/+15
Doesn't need or accept '-' as a trailing option to read stdin. Doesn't print usage() after bad options. Adds --usage as command line equivalent of --help Suggested-by: Borislav Petkov <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/get_maintainer.pl: change --sections to print in the same style as ↵Joe Perches1-0/+2
MAINTAINERS Signed-off-by: Joe Perches <[email protected]> Cc: Stefan Richter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/get_maintainer.pl: add --sections, print entire matched subsystemJoe Perches1-4/+32
Print the complete contents of the matched subsystems in pattern match depth order. Sample output: $ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c USB SMSC95XX ETHERNET DRIVER M:Steve Glendinning <[email protected]> L:[email protected] S:Supported F:drivers/net/usb/smsc95xx.* USB SUBSYSTEM M:Greg Kroah-Hartman <[email protected]> L:[email protected] W:http://www.linux-usb.org T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ S:Supported F:Documentation/usb/ F:drivers/net/usb/ F:drivers/usb/ F:include/linux/usb.h F:include/linux/usb/ NETWORKING DRIVERS L:[email protected] W:http://www.linuxfoundation.org/en/Net T:git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git S:Odd Fixes F:drivers/net/ F:include/linux/if_* F:include/linux/*device.h THE REST M:Linus Torvalds <[email protected]> L:[email protected] Q:http://patchwork.kernel.org/project/LKML/list/ T:git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git S:Buried alive in reporters F:* F:*/ Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06scripts/get_maintainer.pl: add --file-emails, find embedded email addressesJoe Perches1-7/+76
Add an imperfect option to search a source file for email addresses. New option: --file-emails or --fe email addresses in files are freeform text and are nearly impossible to parse. Still, might as well try to do a somewhat acceptable job of finding them. This code should find all addresses that are in the form [email protected] The code assumes that up to 3 alphabetic words along with dashes, commas, and periods that preceed the email address are a name. If 3 words are found for the name, and one of the first two words are a single letter and period, or just a single letter then the 3 words are use as name otherwise the last 2 words are used. Some variants that are shown correctly: John Smith <[email protected]> Random J. Developer <[email protected]> Random J. Developer ([email protected]) J. Random Developer [email protected] Variants that are shown nominally correctly: Written by First Last ([email protected]) is shown as: First Last <[email protected]> Variants that are shown incorrectly: Some Really Long Name <[email protected]> MontaVista Software, Inc. <[email protected]> are returned as: Long Name <[email protected]> "Software, Inc" <[email protected]> --roles and --rolestats show "(in file)" for matches. For instance: Without -file-emails: $ ./scripts/get_maintainer.pl -f -nogit -roles net/core/netpoll.c David S. Miller <[email protected]> (maintainer:NETWORKING [GENERAL]) [email protected] (open list) With -fe: $ ./scripts/get_maintainer.pl -f -fe -nogit -roles net/core/netpoll.c David S. Miller <[email protected]> (maintainer:NETWORKING [GENERAL]) Matt Mackall <[email protected]> (in file) Ingo Molnar <[email protected]> (in file) [email protected] (open list) [email protected] (open list:NETWORKING [GENERAL]) The number of email addresses in the file in not limited. Neither is the number of returned email addresses. Signed-off-by: Joe Perches <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-03-03tags: Add the ability to make tags for all archs using "all"John Kacur1-0/+11
make ALLSOURCE_ARCHS=all tags - Document this in kbuild.txt Without this change you have to type each arch separately. Signed-off-by: John Kacur <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-03-03tags: Fix spelling error in comment (is->if)John Kacur1-1/+1
Signed-off-by: John Kacur <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-28Merge branch 'tracing-core-for-linus' of ↵Linus Torvalds1-21/+18
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits) ftrace: Add function names to dangling } in function graph tracer tracing: Simplify memory recycle of trace_define_field tracing: Remove unnecessary variable in print_graph_return tracing: Fix typo of info text in trace_kprobe.c tracing: Fix typo in prof_sysexit_enable() tracing: Remove CONFIG_TRACE_POWER from kernel config tracing: Fix ftrace_event_call alignment for use with gcc 4.5 ftrace: Remove memory barriers from NMI code when not needed tracing/kprobes: Add short documentation for HAVE_REGS_AND_STACK_ACCESS_API s390: Add pt_regs register and stack access API tracing/kprobes: Make Kconfig dependencies generic tracing: Unify arch_syscall_addr() implementations tracing: Add notrace to TRACE_EVENT implementation functions ftrace: Allow to remove a single function from function graph filter tracing: Add correct/incorrect to sort keys for branch annotation output tracing: Simplify test for function_graph tracing start point tracing: Drop the tr check from the graph tracing path tracing: Add stack dump to trace_printk if stacktrace option is set tracing: Use appropriate perl constructs in recordmcount.pl tracing: optimize recordmcount.pl for offsets-handling ...
2010-02-26kernel-doc: drop the -filelist option, it doesn't workIlya Dryomov1-13/+1
I also found the -filelist option, but apparently the implementation is broken, and it was broken from the very first git commit. For the -filelist option I suggest the removal (I wasn't able to find any users of it, moreover it's not even listed in the usage() output, so presumably nobody knows about it). Signed-off-by: Ilya Dryomov <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-26kernel-doc: track line numbers for each file separatelyIlya Dryomov1-0/+2
The problem is that $. keeps track of the current record number (which is line number by default). But if you pass it multiple files, it does not wrap at the end of file, and therefore contains the *total* number of processed lines. I suppose we can fix line numbering by introducing a simple assignment $. = 1 before processing every new file. Signed-off-by: Ilya Dryomov <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-26Merge commit 'v2.6.33' into tracing/coreIngo Molnar6-40/+78
Conflicts: scripts/recordmcount.pl Merge reason: Merge up to v2.6.33. Signed-off-by: Ingo Molnar <[email protected]>
2010-02-25Merge branch 'for-linus-2' of ↵Linus Torvalds2-4/+69
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig: kconfig: Simplify LSMOD= handling kconfig: Add LSMOD=file to override the lsmod for localmodconfig kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl kconfig: Check for if conditions in Kconfig for localmodconfig kconfig: Create include/generated for localmodconfig
2010-02-25Merge branch 'for-linus-1' of ↵Linus Torvalds3-247/+44
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig: kconfig: simplification of scripts/extract-ikconfig
2010-02-22tags: Use $SRCARCHMichal Marek1-2/+2
$ make mrproper $ make tags GEN tags find: `arch/x86_64/': No such file or directory Caused by commit f81b1be (tags: include headers before source files) Cc: Guennadi Liakhovetski <[email protected]> Acked-by: WANG Cong <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-17tags: include headers before source filesGuennadi Liakhovetski1-6/+14
Currently looking up a structure definition in TAGS / tags takes one to one of multiple "static struct X" definitions in arch sources, which makes it for many structs practically impossible to get to the required header. This patch changes the order of sources being tagged to first scan architecture includes, then the top-level include/ directory, and only then the rest. It also takes into account, that many architectures have more than one include directory, i.e., not only arch/$ARCH/include, but also arch/$ARCH/mach-X/include etc. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: WANG Cong <[email protected]> [[email protected]: fix 'var+=text' bashism] Signed-off-by: Michal Marek <[email protected]>
2010-02-09tree-wide: Assorted spelling fixesDaniel Mack1-1/+1
In particular, several occurances of funny versions of 'success', 'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address', 'beginning', 'desirable', 'separate' and 'necessary' are fixed. Signed-off-by: Daniel Mack <[email protected]> Cc: Joe Perches <[email protected]> Cc: Junio C Hamano <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05markup_oops.pl: minor fixesHui Zhu1-5/+5
1. Fix a little format issue. 2. Check the return of "Getopt::Long::GetOptions". Output usage and exit if it get error. 3. Change $ARGV[$#ARGV] to $ARGV[0]. 4. Change the code which get $modulefile from modinfo. Replace the pipeline with `modinfo -F filename $module`. 4. Change usage from "Specify the module directory name" to "Specify the module filename". Signed-off-by: Hui Zhu <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-05markup_oops.pl: add options to improve cross-sompilation environmentsHui Zhu1-13/+36
The markup_oops.pl have 3 troubles to support cross-compiler environment: 1. It use objdump directly. 2. It use modinfo to get the message of module. 3. It use hex function that cannot support 64-bit number in 32-bit arch. This patch add 3 options to markup_oops.pl: 1. -c CROSS_COMPILE Specify the prefix used for toolchain. 2. -m MODULE_DIRNAME Specify the module directory name. 3. Change hex function to Math::BigInt->from_hex. After this patch, parse the x8664 oops in x86, we can: cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m ./e.ko vmlinux Thanks, Hui Signed-off-by: Hui Zhu <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: [email protected] Cc: Matthew Wilcox <[email protected]> Acked-by: WANG Cong <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-03kconfig: Simplify LSMOD= handlingMichal Marek1-5/+4
Signed-off-by: Michal Marek <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-02-02kconfig: Add LSMOD=file to override the lsmod for localmodconfigSteven Rostedt2-13/+38
Doing the following: make LSMOD=file localmodconfig Will make the streamline-config code use the given file instead of lsmod. If the file is an executable, it will execute it, otherwise it will read it as text. make LSMOD=/my/local/path/lsmod localmodconfig The above will execute the lsmod in /my/local/path instead of the lsmods that may be located elsewhere. make LSMOD=embedded_board_lsmod localmodconfig The above will read the "embedded_board_lsmod" as a text file. This is useful if you are doing a cross compile and need to run the config against modules that exist on an embedded device. Note, if the LSMOD= file does is not a path, it will add the path to the object directory. That is, the above example will look for "embedded_board_lsmod" in the directory that the binary will be built in (the O=dir directory). Signed-off-by: Steven Rostedt <[email protected]> On branch config/linus
2010-02-02markup_oops.pl: fix $func_offset error with x86_64Hui Zhu1-1/+1
When I use markup_oops.pl parse a x8664 oops, I got: objdump: --start-address: bad number: NaN No matching code found This is because: main::(./m.pl:228): open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump"; DB<3> p $decodestart NaN This NaN is from: main::(./m.pl:176): my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset"); DB<2> p $func_offset 0x175 There is already a "0x" in $func_offset, another 0x makes it a NaN. The $func_offset is from line: if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { $function = $1; $func_offset = $2; } I make a patch to change "(0x[0-9a-f]+)\/0x[a-f0-9]/)" to "0x([0-9a-f]+)\/0x[a-f0-9]/)". Signed-off-by: Hui Zhu <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-02get_maintainer.pl: teach git log to use --no-colorRichard Kennedy1-2/+2
When git has been set to always use color in .gitconfig then I get the warning message Bad divisor in main::vcs_assign: 0 This is caused by vcs_file_signoffs not matching any commits due to the pattern not understand the colour codes. Fix this by telling git log to never use colour. Signed-off-by: Richard Kennedy <[email protected]> Acked-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-02kconfig: Look in both /bin and /sbin for lsmod in streamline_config.plSteven Rostedt1-1/+14
Distributions now have lsmod in /bin instead of /sbin. But to handle both cases, we look for it in /sbin /bin /usr/bin and /usr/sbin. If lsmod is not found in any of those paths, it defaults to use just lsmod and hopes that it lies in the path of the user. Tested-by: Xavier Chantry <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-02-02Merge branch 'modpost' of git://git.pengutronix.de/git/ukl/linux-2.6 into ↵Michal Marek1-64/+88
kbuild/for-next Acked-by: Sam Ravnborg <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02scripts: use %_tmppath in "make rpm-pkg"John Saalwaechter1-1/+1
The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's BuildRoot. The user, however, may have a custom setting for %_tmppath, which should be used in BuildRoot. This patch changes mkspec's BuildRoot output to appropriately use %_tmppath. Signed-off-by: John Saalwaechter <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02markup_oops.pl: fix for faulting instruction in the first line of a rangeHui Zhu1-3/+4
I got a "No matching code found" when I use markup_oops.pl parse a error in a x86_64 module. cat e.c int init_module(void) { char *buf = 0; buf[0] = 3; return 0; } void cleanup_module(void) { //char *buf = 0; //buf[0] = 3; } MODULE_AUTHOR("Hui Zhu"); MODULE_LICENSE("GPL"); 0000000000000000 <init_module>: init_module(): /home/teawater/study/kernel/stack2core/example/e.c:10 0: c6 04 25 00 00 00 00 movb $0x3,0x0 7: 03 /home/teawater/study/kernel/stack2core/example/e.c:13 8: 31 c0 xor %eax,%eax a: c3 retq b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000000010 <cleanup_module>: cleanup_module(): /home/teawater/study/kernel/stack2core/example/e.c:20 10: f3 c3 repz retq 12: 90 nop 13: 90 nop Disassembly of section .modinfo: This is because the faulting instruction "movb $0x3,0x0" is the first line of the range. In the markup_oops.pl: main::(./scripts/markup_oops.pl:245): 245: if (InRange($1, $target)) { DB<2> p $line ffffffffa001b000: c6 04 25 00 00 00 00 movb $0x3,0x0 DB<3> p $counter 0 It just set $center in next loop. So it cannot get the $center. And even if $center is set to the right value 0. if ($center == 0) { print "No matching code found \n"; exit; } The first line $center will be 0, so I change the default value to -1. Signed-off-by: Hui Zhu <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02scripts: change scripts to use system python instead of envDon Zickus2-2/+2
Just a small change to a couple of scripts to go from #!/usr/bin/env python to #!/usr/bin/python This shouldn't effect anyone, unless they don't install python there. In preparation for python3, Fedora is doing a big push to change the scripts to use the system python. This allows developers to put the python3 in their path without fear of breaking existing scripts. Now I am pretty sure anyone using python3 for testing purposes will probably not run any of the scripts I changed, but Fedora has this automated tool that checks for this stuff so I thought I would try to push it upstream. Signed-off-by: Don Zickus <[email protected]> Acked-by: WANG Cong <[email protected]> Acked-by: Jarod Wilson <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02scripts/kallsyms: suppress build warningHimanshu Chauhan1-2/+4
Suppress a warn_unused_result warning. fgets is called as a part of error handling. It is called just to drop a line and return immediately. read_map is reading the file in a loop and read_symbol reads line by line. So I think there is no point in using return value for useful checking. Other checks like 3 items were returned or !EOF have already been done. Signed-off-by: Himanshu Chauhan <[email protected]> Cc: WANG Cong <[email protected]> Cc: Michal Marek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Michal Marek <[email protected]>
2010-02-02scripts/mkcompile_h: don't test for hardcoded pathsMichal Marek1-3/+2
Don't test for /bin/{dnsdomainname,domainname}, simply try to execute the command and check if it returned something. Reported-by: Glenn Sommer <[email protected]> Acked-by: WANG Cong <[email protected]> Tested-by: Glenn Sommer <[email protected]> Signed-off-by: Michal Marek <[email protected]>