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 misc kbuild updates from Michal Marek: - deb-pkg: + module signing fix + dtb files are added to the package + do not require `hostname -f` to work during build + make deb-pkg generates a source package, bindeb-pkg has been added to only generate the binary package - rpm-pkg packages /lib/modules as well - new coccinelle patch and updates to existing ones - new stackusage & stackdelta script to collect and compare stack usage info (using gcc's -fstack-usage) - make tags understands trace_*_rcuidle() macros - .gitignore updates, misc cleanups * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (27 commits) deb-pkg: add source package package/Makefile: move source tar creation to a function scripts: add stackdelta script kbuild: remove *.su files generated by -fstack-usage .gitignore: add *.su pattern scripts: add stackusage script kbuild: avoid listing /lib/modules in kernel spec file fallback to hostname in scripts/package/builddeb coccinelle: api: extend spatch for dropping unnecessary owner deb-pkg: simplify directory creation scripts/tags.sh: Include trace_*_rcuidle() in tags scripts/package/Makefile: rpmbuild is needed for rpm targets Kbuild: Add ID files to .gitignore gitignore: Add MIPS vmlinux.32 to the list coccinelle: simple_return: Add a blank line coccinelle: irqf_oneshot.cocci: Improve the generated commit log coccinelle: api: add vma_pages.cocci scripts/coccinelle/misc/irqf_oneshot.cocci: Fix grammar scripts/coccinelle/misc/semicolon.cocci: Use imperative mood coccinelle: simple_open: Use imperative mood ...
- Loading branch information
Showing
17 changed files
with
345 additions
and
61 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
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/// | ||
/// Use vma_pages function on vma object instead of explicit computation. | ||
/// | ||
// Confidence: High | ||
// Keywords: vma_pages vma | ||
// Comment: Based on resource_size.cocci | ||
|
||
virtual context | ||
virtual patch | ||
virtual org | ||
virtual report | ||
|
||
//---------------------------------------------------------- | ||
// For context mode | ||
//---------------------------------------------------------- | ||
|
||
@r_context depends on context && !patch && !org && !report@ | ||
struct vm_area_struct *vma; | ||
@@ | ||
|
||
* (vma->vm_end - vma->vm_start) >> PAGE_SHIFT | ||
|
||
//---------------------------------------------------------- | ||
// For patch mode | ||
//---------------------------------------------------------- | ||
|
||
@r_patch depends on !context && patch && !org && !report@ | ||
struct vm_area_struct *vma; | ||
@@ | ||
|
||
- ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) | ||
+ vma_pages(vma) | ||
|
||
//---------------------------------------------------------- | ||
// For org mode | ||
//---------------------------------------------------------- | ||
|
||
@r_org depends on !context && !patch && (org || report)@ | ||
struct vm_area_struct *vma; | ||
position p; | ||
@@ | ||
|
||
(vma->vm_end@p - vma->vm_start) >> PAGE_SHIFT | ||
|
||
@script:python depends on report@ | ||
p << r_org.p; | ||
x << r_org.vma; | ||
@@ | ||
msg="WARNING: Consider using vma_pages helper on %s" % (x) | ||
coccilib.report.print_report(p[0], msg) | ||
@script:python depends on org@ | ||
p << r_org.p; | ||
x << r_org.vma; | ||
@@ | ||
msg="WARNING: Consider using vma_pages helper on %s" % (x) | ||
msg_safe=msg.replace("[","@(").replace("]",")") | ||
coccilib.org.print_todo(p[0], msg_safe) |
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
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.