forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
50 changed files
with
293 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,3 @@ all: $(patsubst %, $(obj)/%, $(generic-y)) | |
|
||
$(obj)/%.h: | ||
$(call cmd,wrap) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,4 +173,3 @@ | |
|
||
# Sort output by size (last field) | ||
print sort { ($b =~ /:\t*(\d+)$/)[0] <=> ($a =~ /:\t*(\d+)$/)[0] } @stack; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,4 +223,3 @@ while [ "$1" != "" ] ; do | |
;; | ||
esac | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ dtc | |
dtc-lexer.lex.c | ||
dtc-parser.tab.c | ||
dtc-parser.tab.h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,3 @@ struct boot_info *dt_from_fs(const char *dirname) | |
|
||
return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,4 +81,3 @@ int fdt_create_empty_tree(void *buf, int bufsize) | |
|
||
return fdt_open_into(buf, buf, bufsize); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -281,4 +281,3 @@ void dt_to_source(FILE *f, struct boot_info *bi) | |
|
||
write_tree_source_node(f, bi->dt, 0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,5 +28,3 @@ for arch in ${archs}; do | |
;; | ||
esac | ||
done | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,3 @@ EOF | |
if [ ! "$?" -eq "0" ]; then | ||
echo -DKBUILD_NO_NLS; | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.