aboutsummaryrefslogtreecommitdiffstats
path: root/scripts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-24bugon.cocci: fix Options at the macroMauro Carvalho Chehab1-1/+1
The comma after --no-includes makes coccinelle to not run the script: /usr/bin/spatch -D report --very-quiet --no-show-diff --cocci-file ./scripts/coccinelle/misc/bugon.cocci --no-includes, --include-headers --patch . --dir drivers/media/platform/coda/ -I ./arch/x86/include -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -I ./include/linux/kconfig.h Usage: spatch.opt --sp-file <SP> <infile> [-o <outfile>] [--iso-file <iso>] [options] Options are: --sp-file <file> the semantic patch file -o <file> the output file --in-place do the modification on the file directly --backup-suffix suffix to use when making a backup for inplace ... At least with Fedora 20 coccinelle package: coccinelle-1.0.0-0.rc20.1.fc21.x86_64 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Tested-by: Wolfram Sang <wsa@the-dreams.de> Fixes: 5be1df66 (Coccinelle: Script to replace if and BUG with BUG_ON) Cc: stable@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-11-20Replace mentions of "list_struct" to "list_head"Andrey Utkin1-3/+3
There's no such thing as "list_struct". Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-11-08checkkconfigsymbols.py: improve detection of defectsValentin Rothberg1-30/+27
This patch improves the detection of defects by updating the regular expression to find Kconfig identifiers in the source code, and fixes some cases of false positives. The following changes are made: - improve regex to find Kconfig identifiers in the source - exclude .log files from analysis - improve filtering of false positives (e.g, CONFIG_XXX) - change output format from (feature:\tlist) to (feature\tlist) Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07checkkconfigsymbols.sh: reimplementation in pythonValentin Rothberg2-59/+142
The scripts/checkkconfigsymbols.sh script searches Kconfig features in the source code that are not defined in Kconfig. Such identifiers always evaluate to false and are the source of various kinds of bugs. However, the shell script is slow and it does not detect such broken references in Kbuild and Kconfig files (e.g., ``depends on UNDEFINED´´). Furthermore, it generates false positives. The script is also hard to read and understand, and is thereby difficult to maintain. This patch replaces the shell script with an implementation in Python, which: (a) detects the same bugs, but does not report previous false positives (b) additionally detects broken references in Kconfig and all non-Kconfig files, such as Kbuild, .[cSh], .txt, .sh, defconfig, etc. (c) is up to 75 times faster than the shell script (d) only checks files under version control The new script reduces the runtime on my machine (i7-2620M, 8GB RAM, SSD) from 3m47s to 0m3s, and reports 938 broken references in Linux v3.17-rc1; 419 additional reports of which 16 are located in Kconfig files, 287 in defconfigs, 63 in ./Documentation, 1 in Kbuild. Moreover, we intentionally include references in comments, which have been ignored until now. Such comments may be leftovers of features that have been removed or renamed in Kconfig (e.g., ``#endif /* CONFIG_MPC52xx */´´). These references can be misleading and should be removed or replaced. Note that the output format changed from (file list <tab> feature) to (feature <tab> file list) as it simplifies the detection of the Kconfig feature for long file lists. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-06coccinelle: api: add spatch to prevent unnecessary .ownerWolfram Sang1-0/+106
There are calls which silently set the owner of a module. This is the preferred way [1], so avoid setting it manually. Currently, we only care about platform drivers, but there might be more calls to be added later. [1] https://lkml.org/lkml/2014/10/12/87 Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27s390/ftrace,kprobes: allow to patch first instructionHeiko Carstens2-2/+2
If the function tracer is enabled, allow to set kprobes on the first instruction of a function (which is the function trace caller): If no kprobe is set handling of enabling and disabling function tracing of a function simply patches the first instruction. Either it is a nop (right now it's an unconditional branch, which skips the mcount block), or it's a branch to the ftrace_caller() function. If a kprobe is being placed on a function tracer calling instruction we encode if we actually have a nop or branch in the remaining bytes after the breakpoint instruction (illegal opcode). This is possible, since the size of the instruction used for the nop and branch is six bytes, while the size of the breakpoint is only two bytes. Therefore the first two bytes contain the illegal opcode and the last four bytes contain either "0" for nop or "1" for branch. The kprobes code will then execute/simulate the correct instruction. Instruction patching for kprobes and function tracer is always done with stop_machine(). Therefore we don't have any races where an instruction is patched concurrently on a different cpu. Besides that also the program check handler which executes the function trace caller instruction won't be executed concurrently to any stop_machine() execution. This allows to keep full fault based kprobes handling which generates correct pt_regs contents automatically. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-10-21dts, kbuild: Implement support for dtb vendor subdirsRobert Richter1-5/+18
This patch adds support of vendor sub directories for dtb files. Subdirectories can be specified in $(dts-dirs). Kbuild traverses over all directories while building and installing dtb files. The directory tree is also reflected in the install path. Tested-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Robert Richter <rrichter@cavium.com>
2014-10-21dts, kbuild: Factor out dtbs install rules to Makefile.dtbinstRobert Richter3-12/+44
Move dtbs install rules to Makefile.dtbinst. This change is needed to implement support for dts vendor subdirs. The change makes Makefiles easier and smaller as no longer the dtbs_install rule needs to be defined. Another advantage is that install goals are not encoded in targets anymore (%.dtb_dtbinst_). Signed-off-by: Robert Richter <rrichter@cavium.com>
2014-10-14Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds3-23/+193
Pull misc kbuild updates from Michal Marek: "This is the less critical kbuild stuff for v3.18-rc1: - make deb-pkg debuginfo fix, ppc64el support and warning fix for recent dpkg tools - make TAGS fixes - new coccinelle patch - kbuild documentation improvements" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: deb-pkg: remove obsolete -isp option to dpkg-gencontrol coccinelle: misc: semantic patch to delete overly complex return code processing deb-pkg: Add support for powerpc little endian builddeb: put the dbg files into the correct directory scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case scripts/tags.sh: remove *PCGFLAGS regular expressions scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags Documentation: kbuild: Improve grammar Documentation: kbuild: Remove obsolete dtc_cpp section Documentation: kbuild: Improve if_changed documentation Documentation: kbuild: Remove obsolete include/asm symlink step
2014-10-14Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuildLinus Torvalds31-52/+35
Pull kbuild changes from Michal Marek: - fix for handling dependencies of *-objs targets by Masahiro Yamada - lots of cleanups in the kbuild machinery, also by Masahiro - fixes for the kconfig build to use an UTF-8 capable ncurses library if possible and to build on not-so-standard installs - some more minor fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Do not reference *-n variables in the Makefile kbuild: simplify build, clean, modbuiltin shorthands kbuild: arm: Do not define "comma" twice kbuild: remove obj-n and lib-n handling kbuild: remove unnecessary variable initializaions kbuild: remove unnecessary "obj- := dummy.o" trick kbuild: handle C=... and M=... after entering into build directory kbuild: use $(Q) for sub-make target kbuild: fake the "Entering directory ..." message more simply kconfig/lxdialog: get ncurses CFLAGS with pkg-config kconfig: nconfig: fix multi-byte UTF handling kconfig: lxdialog: fix spelling kbuild: Make scripts executable kbuild: remove redundant clean-files from scripts/kconfig/Makefile kbuild: refactor script/kconfig/Makefile kbuild: handle the dependency of multi-objs hostprogs appropriately kbuild: handle multi-objs dependency appropriately
2014-10-14Merge branch 'akpm' (patches from Andrew Morton)Linus Torvalds4-13/+1142
Merge second patch-bomb from Andrew Morton: - a few hotfixes - drivers/dma updates - MAINTAINERS updates - Quite a lot of lib/ updates - checkpatch updates - binfmt updates - autofs4 - drivers/rtc/ - various small tweaks to less used filesystems - ipc/ updates - kernel/watchdog.c changes * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (135 commits) mm: softdirty: enable write notifications on VMAs after VM_SOFTDIRTY cleared kernel/param: consolidate __{start,stop}___param[] in <linux/moduleparam.h> ia64: remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] frv: remove unused declarations of __start___ex_table and __stop___ex_table kvm: ensure hard lockup detection is disabled by default kernel/watchdog.c: control hard lockup detection default staging: rtl8192u: use %*pEn to escape buffer staging: rtl8192e: use %*pEn to escape buffer staging: wlan-ng: use %*pEhp to print SN lib80211: remove unused print_ssid() wireless: hostap: proc: print properly escaped SSID wireless: ipw2x00: print SSID via %*pE wireless: libertas: print esaped string via %*pE lib/vsprintf: add %*pE[achnops] format specifier lib / string_helpers: introduce string_escape_mem() lib / string_helpers: refactoring the test suite lib / string_helpers: move documentation to c-file include/linux: remove strict_strto* definitions arch/x86/mm/numa.c: fix boot failure when all nodes are hotpluggable fs: check bh blocknr earlier when searching lru ...
2014-10-14Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linuxLinus Torvalds2-11/+0
Pull s390 updates from Martin Schwidefsky: "This patch set contains the main portion of the changes for 3.18 in regard to the s390 architecture. It is a bit bigger than usual, mainly because of a new driver and the vector extension patches. The interesting bits are: - Quite a bit of work on the tracing front. Uprobes is enabled and the ftrace code is reworked to get some of the lost performance back if CONFIG_FTRACE is enabled. - To improve boot time with CONFIG_DEBIG_PAGEALLOC, support for the IPTE range facility is added. - The rwlock code is re-factored to improve writer fairness and to be able to use the interlocked-access instructions. - The kernel part for the support of the vector extension is added. - The device driver to access the CD/DVD on the HMC is added, this will hopefully come in handy to improve the installation process. - Add support for control-unit initiated reconfiguration. - The crypto device driver is enhanced to enable the additional AP domains and to allow the new crypto hardware to be used. - Bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (39 commits) s390/ftrace: simplify enabling/disabling of ftrace_graph_caller s390/ftrace: remove 31 bit ftrace support s390/kdump: add support for vector extension s390/disassembler: add vector instructions s390: add support for vector extension s390/zcrypt: Toleration of new crypto hardware s390/idle: consolidate idle functions and definitions s390/nohz: use a per-cpu flag for arch_needs_cpu s390/vtime: do not reset idle data on CPU hotplug s390/dasd: add support for control unit initiated reconfiguration s390/dasd: fix infinite loop during format s390/mm: make use of ipte range facility s390/setup: correct 4-level kernel page table detection s390/topology: call set_sched_topology early s390/uprobes: architecture backend for uprobes s390/uprobes: common library for kprobes and uprobes s390/rwlock: use the interlocked-access facility 1 instructions s390/rwlock: improve writer fairness s390/rwlock: remove interrupt-enabling rwlock variant. s390/mm: remove change bit override support ...
2014-10-14scripts/sortextable: suppress warning: `relocs_size' may be used uninitializedTim Gardner1-1/+1
In file included from scripts/sortextable.c:194:0: scripts/sortextable.c: In function `main': scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:106:6: note: `relocs_size' was declared here int relocs_size; ^ In file included from scripts/sortextable.c:192:0: scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:106:6: note: `relocs_size' was declared here int relocs_size; ^ gcc 4.9.1 Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Reviewed-by: Jamie Iles <jamie.iles@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14scripts/headers_install.sh: fix error handlingJavier Barrio1-2/+2
- headers_install requires at least two arguments - missed closing quote Signed-off-by: Javier Barrio <javier.barrio.mart@gmail.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: warn on logging functions with KERN_<LEVEL>Joe Perches1-0/+11
Warn on probable misuses of logging functions with KERN_<LEVEL> like pr_err(KERN_ERR "foo\n"); Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: add exception to return then else testJoe Perches1-1/+5
Add an exception to the return before else warning when the line following it is also a return like: if (foo) return bar; else return baz; This form of a test then return is at least as readable as if (foo) return bar; return baz; so don't emit a warning on the first form. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Cc: Elshad Mustafayev <elshadimo@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: look for common misspellingsKees Cook2-1/+1085
Check for misspellings, based on Debian's lintian list. Several false positives were removed, and several additional words added that were common in the kernel: backword backwords invalide valide recieves singed unsinged While going back and fixing existing spelling mistakes isn't a high priority, it'd be nice to try to catch them before they hit the tree. In the 13830 commits between 3.15 and 3.16, the script would have noticed 560 spelling mistakes. The top 25 are shown here: $ git log --pretty=oneline v3.15..v3.16 | wc -l 13830 $ git log --format='%H' v3.15..v3.16 | \ while read commit ; do \ echo "commit $commit" ; \ git log --format=email --stat -p -1 $commit | \ ./scripts/checkpatch.pl --types=typo_spelling --no-summary - ; \ done | tee spell_v3.15..v3.16.txt | grep "may be misspelled" | \ awk '{print $2}' | tr A-Z a-z | sort | uniq -c | sort -rn 21 'seperate' 17 'endianess' 15 'sucess' 13 'noticable' 11 'occured' 11 'accomodate' 10 'interrup' 9 'prefered' 8 'unecessary' 8 'explicitely' 7 'supress' 7 'overriden' 7 'immediatly' 7 'funtion' 7 'defult' 7 'childs' 6 'succesful' 6 'splitted' 6 'specifc' 6 'reseting' 6 'recieve' 6 'changable' 5 'tmis' 5 'singed' 5 'preceeding' Thanks to Joe Perches for rewrites, suggestions, additional misspelling entries, and testing. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Joe Perches <joe@perches.com> Cc: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: warn on macros with flow control statementsJoe Perches1-0/+18
Macros with flow control statements (goto and return) are not very nice to read as any flow movement is unexpected. Try to highlight them and emit a warning on their definition. Avoid warning on macros that use argument concatenation as those macros commonly create another function where the concatenation is used in the function name definition like: #define FOO_FUNC(name, rtn_type) \ rtn_type func##name(arg1, ...) \ { \ rtn_type rtn; \ [code...] \ return rtn; \ } Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: remove unnecessary + after {8,8}Joe Perches1-1/+1
There's a useless "+" use that needs to be removed as perl 5.20 emits a "Useless use of greediness modifier '+'" message each time it's hit. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: add --strict test for concatenated string elementsJoe Perches1-0/+6
Using a space between concatenated string elements is easier for a human to read. ie: "String"FOO"bar" is easier to read as: "String" FOO "bar" So suggest this style with a --strict command line option. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: allow optional shorter config descriptionsVadim Bendebury1-2/+7
This script is used by many other projects, and in some of them the requirement of at least 4 line long description for all Kconfig items is excessive. This patch adds a command line option to control the required minimum length. Tested running this script over a patch including a two line config description. The script generated a warning when invoked as is, and did not generate it when invoked with --min-conf-desc-length=2. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: enable whitespace checks for DTS filesGeert Uytterhoeven1-2/+2
When run on *.dtsi or *.dts files, the whitespace checks were skipped, while they are valid for DTS files. Hence stop skipping them. I ran checkpatch on all in-tree DTS files, and didn't notice any error or warning messages that are inappropriate for DTS files. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: update $allowed_asm_includes macros, add reboot.h and time.hSergey Ryazanov1-1/+3
Several architectures (e.g. x86, MIPS, Blackfin) have asm/reboot.h and asm/time.h header files, which are not included in linux/reboot.h and linux/time.h headers. This lead to generation of false positive errors. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: remove debugging messageJoe Perches1-1/+0
An unnecessary --fix debugging left-over is removed. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14checkpatch: fix spelloAndrew Morton1-1/+1
The plural of parenthesis is parentheses. Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-09s390/ftrace: remove 31 bit ftrace supportHeiko Carstens2-11/+0
31 bit and 64 bit diverge more and more and it is rather painful to keep both parts running. To make things simpler just remove the 31 bit support which nobody uses anyway. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2014-10-08Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linuxLinus Torvalds2-2/+2
Pull arm64 updates from Catalin Marinas: - eBPF JIT compiler for arm64 - CPU suspend backend for PSCI (firmware interface) with standard idle states defined in DT (generic idle driver to be merged via a different tree) - Support for CONFIG_DEBUG_SET_MODULE_RONX - Support for unmapped cpu-release-addr (outside kernel linear mapping) - set_arch_dma_coherent_ops() implemented and bus notifiers removed - EFI_STUB improvements when base of DRAM is occupied - Typos in KGDB macros - Clean-up to (partially) allow kernel building with LLVM - Other clean-ups (extern keyword, phys_addr_t usage) * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (51 commits) arm64: Remove unneeded extern keyword ARM64: make of_device_ids const arm64: Use phys_addr_t type for physical address aarch64: filter $x from kallsyms arm64: Use DMA_ERROR_CODE to denote failed allocation arm64: Fix typos in KGDB macros arm64: insn: Add return statements after BUG_ON() arm64: debug: don't re-enable debug exceptions on return from el1_dbg Revert "arm64: dmi: Add SMBIOS/DMI support" arm64: Implement set_arch_dma_coherent_ops() to replace bus notifiers of: amba: use of_dma_configure for AMBA devices arm64: dmi: Add SMBIOS/DMI support arm64: Correct ftrace calls to aarch64_insn_gen_branch_imm() arm64:mm: initialize max_mapnr using function set_max_mapnr setup: Move unmask of async interrupts after possible earlycon setup arm64: LLVMLinux: Fix inline arm64 assembly for use with clang arm64: pageattr: Correctly adjust unaligned start addresses net: bpf: arm64: fix module memory leak when JIT image build fails arm64: add PSCI CPU_SUSPEND based cpu_suspend support arm64: kernel: introduce cpu_init_idle CPU operation ...
2014-10-07Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds2-3/+6
Pull "trivial tree" updates from Jiri Kosina: "Usual pile from trivial tree everyone is so eagerly waiting for" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Remove MN10300_PROC_MN2WS0038 mei: fix comments treewide: Fix typos in Kconfig kprobes: update jprobe_example.c for do_fork() change Documentation: change "&" to "and" in Documentation/applying-patches.txt Documentation: remove obsolete pcmcia-cs from Changes Documentation: update links in Changes Documentation: Docbook: Fix generated DocBook/kernel-api.xml score: Remove GENERIC_HAS_IOMAP gpio: fix 'CONFIG_GPIO_IRQCHIP' comments tty: doc: Fix grammar in serial/tty dma-debug: modify check_for_stack output treewide: fix errors in printk genirq: fix reference in devm_request_threaded_irq comment treewide: fix synchronize_rcu() in comments checkstack.pl: port to AArch64 doc: queue-sysfs: minor fixes init/do_mounts: better syntax description MIPS: fix comment spelling powerpc/simpleboot: fix comment ...
2014-10-07Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linuxLinus Torvalds3-14/+20
Pull module update from Rusty Russell: "Nothing major: support for compressing modules, and auto-tainting params. PS. My virtio-next tree is empty: DaveM took the patches I had. There might be a virtio-rng starvation fix, but so far it's a bit voodoo so I will get to that in the next two days or it will wait" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: moduleparam: Resolve missing-field-initializer warning kbuild: handle module compression while running 'make modules_install'. modinst: wrap long lines in order to enhance cmd_modules_install modsign: lookup lines ending in .ko in .mod files modpost: simplify file name generation of *.mod.c files modpost: reduce visibility of symbols and constify r/o arrays param: check for tainting before calling set op. drm/i915: taint the kernel if unsafe module parameters are set module: add module_param_unsafe and module_param_named_unsafe module: make it possible to have unsafe, tainting module params module: rename KERNEL_PARAM_FL_NOARG to avoid confusion
2014-10-07Merge tag 'tiny/for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linuxLinus Torvalds2-0/+21
Pull "tinification" patches from Josh Triplett. Work on making smaller kernels. * tag 'tiny/for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux: bloat-o-meter: Ignore syscall aliases SyS_ and compat_SyS_ mm: Support compiling out madvise and fadvise x86: Support compiling out human-friendly processor feature names x86: Drop support for /proc files when !CONFIG_PROC_FS x86, boot: Don't compile early_serial_console.c when !CONFIG_EARLY_PRINTK x86, boot: Don't compile aslr.c when !CONFIG_RANDOMIZE_BASE x86, boot: Use the usual -y -n mechanism for objects in vmlinux x86: Add "make tinyconfig" to configure the tiniest possible kernel x86, platform, kconfig: move kvmconfig functionality to a helper
2014-10-06deb-pkg: remove obsolete -isp option to dpkg-gencontrolAsbjoern Sloth Toennesen1-1/+1
The -isp option has been deprecated, after it became the default behaviour back in 2006. Since dpkg 1.17.11, dpkg-gencontrol emits a warning on -isp usage. References: https://bugs.debian.org/215233 Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-10-02aarch64: filter $x from kallsymsKyle McMartin2-2/+2
Similar to ARM, AArch64 is generating $x and $d syms... which isn't terribly helpful when looking at %pF output and the like. Filter those out in kallsyms, modpost and when looking at module symbols. Seems simplest since none of these check EM_ARM anyway, to just add it to the strchr used, rather than trying to make things overly complicated. initcall_debug improves: dmesg_before.txt: initcall $x+0x0/0x154 [sg] returned 0 after 26331 usecs dmesg_after.txt: initcall init_sg+0x0/0x154 [sg] returned 0 after 15461 usecs Signed-off-by: Kyle McMartin <kyle@redhat.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-10-02kbuild: simplify build, clean, modbuiltin shorthandsMasahiro Yamada2-3/+3
$(if $(KBUILD_SRC),$(srctree)/) was a useful strategy to omit a long absolute path for in-source-tree build prior to commit 890676c65d699db3ad82e7dddd0cf8fb449031af (kbuild: Use relative path when building in the source tree). Now $(srctree) is "." when building in the source tree. It would not be annoying to add "$(srctree)/" all the time. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-10-02kbuild: remove obj-n and lib-n handlingMasahiro Yamada3-6/+4
Kconfig never defines CONFIG_* as 'n'. Now obj-n is only used in firmware/Makefile and it can be replaced with obj-. No makefile uses lib-n. Let's rip off obj-n and lib-n. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Peter Foley <pefoley2@pefoley.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-09-27Merge branch 'for-3.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroupLinus Torvalds1-0/+6
Pull cgroup fixes from Tejun Heo: "This is quite late but these need to be backported anyway. This is the fix for a long-standing cpuset bug which existed from 2009. cpuset makes use of PF_SPREAD_{PAGE|SLAB} flags to modify the task's memory allocation behavior according to the settings of the cpuset it belongs to; unfortunately, when those flags have to be changed, cpuset did so directly even whlie the target task is running, which is obviously racy as task->flags may be modified by the task itself at any time. This obscure bug manifested as corrupt PF_USED_MATH flag leading to a weird crash. The bug is fixed by moving the flag to task->atomic_flags. The first two are prepatory ones to help defining atomic_flags accessors and the third one is the actual fix" * 'for-3.17-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags sched: add macros to define bitops for task atomic flags sched: fix confusing PFA_NO_NEW_PRIVS constant
2014-09-26coccinelle: misc: semantic patch to delete overly complex return code processingJulia Lawall1-0/+180
This semantic patch simplifies cases where the effect of the processing of a function call's return code is just to return the result of the function directly. It may also delete a local return flag variable, if this is no longer used. This was proposed by Uwe Kleine-König. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-09-24sched: add macros to define bitops for task atomic flagsZefan Li1-0/+6
This will simplify code when we add new flags. v3: - Kees pointed out that no_new_privs should never be cleared, so we shouldn't define task_clear_no_new_privs(). we define 3 macros instead of a single one. v2: - updated scripts/tags.sh, suggested by Peter Cc: Ingo Molnar <mingo@kernel.org> Cc: Miao Xie <miaox@cn.fujitsu.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Zefan Li <lizefan@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2014-09-23kconfig/lxdialog: get ncurses CFLAGS with pkg-configBjørn Forsman1-1/+5
This makes "make menuconfig" also work on systems where ncurses is not installed in a standard location (such as on NixOS). This patch changes ccflags() so that it tries pkg-config first, and only if pkg-config fails does it go back to the fallback/manual checks. This is the same algorithm that ldflags() already uses. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-09-22Merge branches 'tiny/bloat-o-meter-no-SyS', 'tiny/more-procless', 'tiny/no-advice', 'tiny/tinyconfig' and 'tiny/x86-boot-compressed-use-yn' into tiny/nextJosh Triplett1-0/+19
2014-09-12deb-pkg: Add support for powerpc little endianMichael Neuling1-1/+1
The Debian powerpc little endian architecture is called ppc64el. This is the default architecture used by Ubuntu for powerpc. The below checks the kernel config to see if we are compiling little endian and sets the Debian arch appropriately. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-09-10checkpatch: allow commit descriptions on separate line from commit idJoe Perches1-1/+4
The general form for commit id and description is 'Commit <12+hexdigits> ("commit description/subject line")' but commit logs often have relatively long commit ids and the commit description emds on the next line like: Some explanation as to why commit <12+hexdigits> ("commit foo description/subject line") is improved. Allow this form. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Joe Lawrence <joe.lawrence@stratus.com> Tested-by: Joe Lawrence <joe.lawrence@stratus.com> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-09-01treewide: fix errors in printkMasanari Iida1-1/+1
This patch fix spelling typo in printk. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-08-29checkpatch: relax check for length of git commit IDsJoe Perches1-2/+2
Checkpatch currently warns if a git commit ID (in the changelog, usually) is less than 12 characters or more than 16. The "more than 16" is excessive. Change the check so we accept IDs from 12 to 40 chars in length. Cc: Geert Uytterhoeven <geert@linux-m68k.org Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-28checkstack.pl: port to AArch64Kyle McMartin1-2/+5
AArch64 stores the frame pointer and return pointer, and decrements the stack. Also remove my (no longer valid) email address. Signed-off-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-08-27kbuild: handle module compression while running 'make modules_install'.Bertrand Jacquin1-1/+2
Since module-init-tools (gzip) and kmod (gzip and xz) support compressed modules, it could be useful to include a support for compressing modules right after having them installed. Doing this in kbuild instead of per distro can permit to make this kind of usage more generic. This patch add a Kconfig entry to "Enable loadable module support" menu and let you choose to compress using gzip (default) or xz. Both gzip and xz does not used any extra -[1-9] option since Andi Kleen and Rusty Russell prove no gain is made using them. gzip is called with -n argument to avoid storing original filename inside compressed file, that way we can save some more bytes. On a v3.16 kernel, 'make allmodconfig' generated 4680 modules for a total of 378MB (no strip, no sign, no compress), the following table shows observed disk space gain based on the allmodconfig .config : | time | +-------------+-----------------+ | manual .ko | make | size | percent | compression | modules_install | | gain +-------------+-----------------+------+-------- - | | 18.61s | 378M | GZIP | 3m16s | 3m37s | 102M | 73.41% XZ | 5m22s | 5m39s | 77M | 79.83% The gain for restricted environnement seems to be interesting while uncompress can be time consuming but happens only while loading a module, that is generally done only once. This is fully compatible with signed modules while the signed module is compressed. module-init-tools or kmod handles decompression and provide to other layer the uncompressed but signed payload. Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Bertrand Jacquin <beber@meleeweb.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-08-27modinst: wrap long lines in order to enhance cmd_modules_installBertrand Jacquin1-1/+5
Note: shouldn't we use 'install -D $(2)/$@ $@' instead of mkdir and cp ? Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Bertrand Jacquin <beber@meleeweb.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-08-27modsign: lookup lines ending in .ko in .mod filesBertrand Jacquin1-1/+1
This does the same as commit ef591a5 (scripts/Makefile.modpost: error in finding modules from .mod files), but for scripts/Makefile.modsign Maybe we should also apply to Makefile.modsign and Makefile.modinst the change applied to Makefile.modpost by commit ea4054a (modpost: handle huge numbers of modules) ? Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Bertrand Jacquin <beber@meleeweb.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-08-27modpost: simplify file name generation of *.mod.c filesMathias Krause1-1/+1
Avoid the variable length array (vla), just use PATH_MAX instead. This not only makes this code clang friedly, it also leads to a code size reduction: text data bss dec hex filename 51765 2224 12416 66405 10365 scripts/mod/modpost.old 51677 2224 12416 66317 1030d scripts/mod/modpost.new Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-08-27modpost: reduce visibility of symbols and constify r/o arraysMathias Krause1-11/+12
Internally used symbols of modpost don't need to be externally visible; make them static. Also constify the string arrays so they resist in the r/o section instead of being runtime writable. Those changes lead to a small size reduction as can be seen below: text data bss dec hex filename 51381 2640 12416 66437 10385 scripts/mod/modpost.old 51765 2224 12416 66405 10365 scripts/mod/modpost.new Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-08-26scripts/kernel-doc: recognize __meminitRandy Dunlap1-0/+1
Fix scripts/kernel-doc to recognize __meminit in a function prototype and to strip it, as done with many other attributes. Fixes this warning: Warning(..//mm/page_alloc.c:2973): cannot understand function prototype: 'void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) ' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>