summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2015-08-28scripts: add stackusage scriptRasmus Villemoes
The current checkstack.pl script has a few problems, stemming from the overly simplistic attempt at parsing objdump output with regular expressions: For example, on x86_64 it doesn't take the push instruction into account, making it consistently underestimate the real stack use, and it also doesn't capture stack pointer adjustments of exactly 128 bytes [1]. Since newer gcc (>= 4.6) knows about -fstack-usage, we might as well take the information straight from the horse's mouth. This patch introduces scripts/stackusage, which is a simple wrapper for running make with KCFLAGS set to -fstack-usage. Example use is scripts/stackusage -o out.su -j8 lib/ The script understands "-o foo" for writing to 'foo' and -h for a trivial help text; anything else is passed to make. Afterwards, we find all newly created .su files, massage them a little, sort by stack use and write the result to a single output file. Note that the function names printed by (at least) gcc 4.7 are sometimes useless. For example, the first three lines of out.su generated above are ./lib/decompress_bunzip2.c:155 get_next_block 448 static ./lib/decompress_unlzma.c:537 unlzma 336 static ./lib/vsprintf.c:616 8 304 static That function '8' is really the static symbol_string(), but it has been subject to 'interprocedural scalar replacement of aggregates', so its name in the object file is 'symbol_string.isra.8'. gcc 5.0 doesn't have this problem; it uses the full name as seen in the object file. [1] Since gcc encodes that by 48 83 c4 80 add $0xffffffffffffff80,%rsp and not 48 81 ec 80 00 00 00 sub $0x80,%rsp since -128 fits in an imm8. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-08-26kbuild: avoid listing /lib/modules in kernel spec fileMike Marciniszyn
This causes conflicts when using multiple kernels built with this mechanism. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-08-19fallback to hostname in scripts/package/builddebChristian Kujau
I happened to build a kernel with "make deb-pkg" on a machine with no network connectivity, but this failed with: [...] INSTALL debian/headertmp/usr/include/asm/ (65 files) hostname: Name or service not known ../scripts/package/Makefile:90: recipe for target 'deb-pkg' failed make[2]: *** [deb-pkg] Error 1 In scripts/package/builddeb it tries to construct an email address (that can be queried in /proc/version later on) but with no network, the "hostname -f" fails. The following patch falls back to just use the shortname if we cannot determine our FQDN. Signed-off-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-08-19coccinelle: api: extend spatch for dropping unnecessary ownerKrzysztof Kozlowski
i2c_add_driver (through i2c_register_driver) sets the owner field so we can drop it also from i2c drivers, just like from platform drivers. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-08-19deb-pkg: simplify directory creationRiku Voipio
Every package needs /usr/share/doc/$package_name and DEBIAN directory, so create them as part of create_package function. Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-08-19scripts/tags.sh: Include trace_*_rcuidle() in tagsStephen Boyd
Every tracepoint creates two functions, the usual one 'trace_*()' and the rcuidle one 'trace_*_rcuidle()'. Add regex for the rcuidle variant so that we can jump to the tracepoints that use rcuidle. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michal Marek <mmarek@suse.com>
2015-06-15scripts/package/Makefile: rpmbuild is needed for rpm targetsJim Davis
Before rpm release 4.1, in 2002, either the rpm command or the rpmbuild command could be used in the rpm-pkg or binrpm-pkg targets, and the Makefile chose the rpm command if the rpmbuild command wasn't found. After release 4.1, however, the rpm command could no longer be used in place of the rpmbuild command. As the rpmbuild command is not installed by default, this can lead to failures with the rpm-pkg and binrpm-pkg targets: rpm --define "_builddir ." --target \ x86_64 -bb ./binkernel.spec rpm --target: unknown option scripts/package/Makefile:60: recipe for target 'binrpm-pkg' failed Change the Makefile to use rpmbuild unconditionally to avoid this. Signed-off-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-06-03coccinelle: simple_return: Add a blank lineFabio Estevam
Insert a blank line in order to improve the readability of the generated patch and also make it consistent with the other .cocci files. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-25coccinelle: irqf_oneshot.cocci: Improve the generated commit logFabio Estevam
Improve the commit log of the generated patch by mentioning the commit log that makes threaded IRQs without a primary handler to be requested with the IRQF_ONESHOT flag. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked- by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-21coccinelle: api: add vma_pages.cocciDmitry Kalinkin
This semantic patch replaces explicit computations of vma page count with explicit function call. Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-21scripts/coccinelle/misc/irqf_oneshot.cocci: Fix grammarFabio Estevam
Correct form is 'always requested'. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-21scripts/coccinelle/misc/semicolon.cocci: Use imperative moodFabio Estevam
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour. So do as recommended. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-20coccinelle: simple_open: Use imperative moodFabio Estevam
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." So do as recommended. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-20coccinelle: ifaddr: Fix the sentenceFabio Estevam
Make the sentence sensible. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-20coccinelle: returnvar: Use imperative moodFabio Estevam
According to Documentation/SubmittingPatches: "Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behaviour." So do as recommended. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-20coccinelle: pm_runtime: Insert blank lineFabio Estevam
Insert a blank line in order to improve the readability of the generated patch and also make it consistent with the other .cocci files. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-20deb-pkg: Add device tree blobs to the packageArnaud Patard (Rtp)
When building a package with make deb-pkg (say, for arm), the dtb files are not added to the package. Given that things are still evolving on arm, it make sense to have them along with the kernel and modules. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-05-06builddeb: fix stripped module signatures if CONFIG_DEBUG_INFO and ↵Andrey Skvortsov
CONFIG_MODULE_SIG_ALL are set If CONFIG_MODULE_SIG_ALL is set, then user expects that all modules are automatically signed in the result package, as it's for rpm-pkg, binrpm-pkg, tar, tar-*. For deb-pkg this is correct only if CONFIG_DEBUG_INFO is NOT set. In that case deb-package contains signed modules. But if CONFIG_DEBUG_INFO is set, builddeb creates separate package with debug information. To do that, debug information from all modules is copied into separate files by objcopy. And loadable kernel modules are stripped afterwards. Stripping removes previously (during modules_install) added signatures from loadable kernel modules. Therefore final deb-package contains unsigned modules despite of set option CONFIG_MODULE_SIG_ALL. This patch resigns all stripped modules if CONFIG_MODULE_SIG_ALL is set to solve this problem. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-04-27deb-pkg: move setting debarch for a separate functionRiku Voipio
create_package() function tries to resolve used architecture for everry package. Split the setting the architecture to a new function, set_debarch(), called once on startup. This allows using debarch from other parts of script as needed. v2: Follow Michals suggestion on setting variables at top scope and also setting the fallback $debarch in the new function Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-04-27kbuild/mkspec: Simplify vmlinux.bz2 creationBorislav Petkov
No need for the intermediary vmlinux.orig - bzip2 can keep the original files used for compression with --keep. Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-04-22Merge tag 'modules-next-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell: "Quentin opened a can of worms by adding extable entry checking to modpost, but most architectures seem fixed now. Thanks to all involved. Last minute rebase because I noticed a "[PATCH]" had snuck into a commit message somehow" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: modpost: don't emit section mismatch warnings for compiler optimizations modpost: expand pattern matching to support substring matches modpost: do not try to match the SHT_NUL section. modpost: fix extable entry size calculation. modpost: fix inverted logic in is_extable_fault_address(). modpost: handle -ffunction-sections modpost: Whitelist .text.fixup and .exception.text params: handle quotes properly for values not of form foo="bar". modpost: document the use of struct section_check. modpost: handle relocations mismatch in __ex_table. scripts: add check_extable.sh script. modpost: mismatch_handler: retrieve tosym information only when needed. modpost: factorize symbol pretty print in get_pretty_name(). modpost: add handler function pointer to sectioncheck. modpost: add .sched.text and .kprobes.text to the TEXT_SECTIONS list. modpost: add strict white-listing when referencing sections. module: do not print allocation-fail warning on bogus user buffer size kernel/module.c: fix typos in message about unused symbols
2015-04-22Merge tag 'armsoc-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Here's the usual "low-priority fixes that didn't make it into the last few -rcs, with a twist: We had a fixes pull request that I didn't send in time to get into 4.0, so we'll send some of them to Greg for -stable as well. Contents here is as usual not all that controversial: - a handful of randconfig fixes from Arnd, in particular for older Samsung platforms - Exynos fixes, !SMP building, DTS updates for MMC and lid switch - Kbuild fix to create output subdirectory for DTB files - misc minor fixes for OMAP" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits) ARM: at91/dt: sama5d3 xplained: add phy address for macb1 kbuild: Create directory for target DTB ARM: mvebu: Disable CPU Idle on Armada 38x ARM: DRA7: Enable Cortex A15 errata 798181 ARM: dts: am57xx-beagle-x15: Add thermal map to include fan and tmp102 ARM: dts: DRA7: Add bandgap and related thermal nodes bus: ocp2scp: SYNC2 value should be changed to 0x6 ARM: dts: am4372: Add "ti,am437x-ocp2scp" as compatible string for OCP2SCP ARM: OMAP2+: remove superfluous NULL pointer check ARM: EXYNOS: Fix build breakage cpuidle on !SMP ARM: dts: fix lid and power pin-functions for exynos5250-spring ARM: dts: fix mmc node updates for exynos5250-spring ARM: OMAP4: remove dead kconfig option OMAP4_ERRATA_I688 MAINTAINERS: add OMAP defconfigs under OMAP SUPPORT ARM: OMAP1: PM: fix some build warnings on 1510-only Kconfigs ARM: cns3xxx: don't export static symbol ARM: S3C24XX: avoid a Kconfig warning ARM: S3C24XX: fix header file inclusions ARM: S3C24XX: fix building without PM_SLEEP ARM: S3C24XX: use SAMSUNG_WAKEMASK for s3c2416 ...
2015-04-22modpost: don't emit section mismatch warnings for compiler optimizationsPaul Gortmaker
Currently an allyesconfig build [gcc-4.9.1] can generate the following: WARNING: vmlinux.o(.text.unlikely+0x3864): Section mismatch in reference from the function cpumask_empty.constprop.3() to the variable .init.data:nmi_ipi_mask which comes from the cpumask_empty usage in arch/x86/kernel/nmi_selftest.c. Normally we would not see a symbol entry for cpumask_empty since it is: static inline bool cpumask_empty(const struct cpumask *srcp) however in this case, the variant of the symbol gets emitted when GCC does constant propagation optimization. Fix things up so that any locally optimized constprop variants don't warn when accessing variables that live in the __init sections. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: expand pattern matching to support substring matchesPaul Gortmaker
Currently the match() function supports a leading * to match any prefix and a trailing * to match any suffix. However there currently is not a combination of both that can be used to target matches of whole families of functions that share a common substring. Here we expand the *foo and foo* match to also support *foo* with the goal of targeting compiler generated symbol names that contain strings like ".constprop." and ".isra." Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: do not try to match the SHT_NUL section.Quentin Casasnovas
Trying to match the SHT_NUL section isn't useful and causes build failures on parisc and mn10300 since the addition of section strict white-listing and __ex_table sanitizing. Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Reported-by: Guenter Roeck <linux@roeck-us.net> Fixes: 050e57fd5936 ("modpost: add strict white-listing when referencing....") Fixes: 52dc0595d540 ("modpost: handle relocations mismatch in __ex_table.") Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: fix extable entry size calculation.Quentin Casasnovas
As Guenter pointed out, we were never really calculating the extable entry size because the pointer arithmetic was simply wrong. We want to check we're handling the second relocation in __ex_table to infer an entry size, but we were using (void*) pointers instead of Elf_Rel[a]* ones. This fixes the problem by moving that check in the caller (since we can deal with different types of relocations) and add is_second_extable_reloc() to make the whole thing more readable. Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Reported-by: Guenter Roeck <linux@roeck-us.net> CC: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: fix inverted logic in is_extable_fault_address().Quentin Casasnovas
As Guenter pointed out, we want to assert that extable_entry_size has been discovered and not the other way around. Moreover, this sanity check is only valid when we're not dealing with the first relocation in __ex_table, since we have not discovered the extable entry size at that point. This was leading to a divide-by-zero on some architectures and make the build fail. Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Reported-by: Guenter Roeck <linux@roeck-us.net> CC: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: handle -ffunction-sectionsRusty Russell
52dc0595d540 introduced OTHER_TEXT_SECTIONS for identifying what sections could validly have __ex_table entries. Unfortunately, it wasn't tested with -ffunction-sections, which some architectures use. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-22modpost: Whitelist .text.fixup and .exception.textThierry Reding
32-bit and 64-bit ARM use these sections to store executable code, so they must be whitelisted in modpost's table of valid text sections. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-04-21Merge tag 'char-misc-4.1-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver patchset for 4.1-rc1. Lots of different driver subsystem updates here, nothing major, full details are in the shortlog. All of this has been in linux-next for a while" * tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits) mei: trace: remove unused TRACE_SYSTEM_STRING DTS: ARM: OMAP3-N900: Add lis3lv02d support Documentation: DT: lis302: update wakeup binding lis3lv02d: DT: add wakeup unit 2 and wakeup threshold lis3lv02d: DT: use s32 to support negative values Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case mei: replace check for connection instead of transitioning mei: use mei_cl_is_connected consistently mei: fix mei_poll operation hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() Drivers: hv: hv_balloon: survive ballooning request with num_pages=0 Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function Drivers: hv: hv_balloon: do not online pages in offline blocks hv: remove the per-channel workqueue hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind() hv: run non-blocking message handlers in the dispatch tasklet coresight: moving to new "hwtracing" directory coresight-tmc: Adding a status interface to sysfs coresight: remove the unnecessary configuration coresight-default-sink ...
2015-04-20Merge branch 'misc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild updates: "This is the remaining part of kbuild stuff for v4.1-rc1: - One wew coccinelle script and a clarification of the proposed fix in bugon.coccinelle - CONFIG_KERNEL_LZ4 support for extract-ikconfig" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/coccinelle/misc/bugon.cocci: update bug_on conversion warning scripts/extract-ikconfig: Support LZ4-compressed images. irqf_oneshot.cocci: add check of devm_request_threaded_irq()
2015-04-17Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds
Pull MIPS updates from Ralf Baechle: "This is the main pull request for MIPS for Linux 4.1. Most noteworthy: - Add more Octeon-optimized crypto functions - Octeon crypto preemption and locking fixes - Little endian support for Octeon - Use correct CSR to soft reset Octeons - Support LEDs on the Octeon-based DSR-1000N - Fix PCI interrupt mapping for the Octeon-based DSR-1000N - Mark prom_free_prom_memory() as __init for a number of systems - Support for Imagination's Pistachio SOC. This includes arch and CLK bits. I'd like to merge pinctrl bits later - Improve parallelism of csum_partial for certain pipelines - Organize DTB files in subdirs like other architectures - Implement read_sched_clock for all MIPS platforms other than Octeon - Massive series of 38 fixes and cleanups for the FPU emulator / kernel - Further FPU remulator work to support new features. This sits on a separate branch which also has been pulled into the 4.1 KVM branch - Clean up and fixes for the SEAD3 eval board; remove unused file - Various updates for Netlogic platforms - A number of small updates for Loongson 3 platforms - Increase the memory limit for ATH79 platforms to 256MB - A fair number of fixes and updates for BCM47xx platforms - Finish the implementation of XPA support - MIPS FDC support. No, not floppy controller but Fast Debug Channel :) - Detect the R16000 used in SGI legacy platforms - Fix Kconfig dependencies for the SSB bus support" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (265 commits) MIPS: Makefile: Fix MIPS ASE detection code MIPS: asm: elf: Set O32 default FPU flags MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G MIPS: Kconfig: Disable SMP/CPS for 64-bit MIPS: Hibernate: flush TLB entries earlier MIPS: smp-cps: cpu_set FPU mask if FPU present MIPS: lose_fpu(): Disable FPU when MSA enabled MIPS: ralink: add missing symbol for RALINK_ILL_ACC MIPS: ralink: Fix bad config symbol in PCI makefile. SSB: fix Kconfig dependencies MIPS: Malta: Detect and fix bad memsize values Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores." MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard. MIPS: Fix cpu_has_mips_r2_exec_hazard. MIPS: kernel: entry.S: Set correct ISA level for mips_ihb MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter MIPS: unaligned: Fix regular load/store instruction emulation for EVA MIPS: unaligned: Surround load/store macros in do {} while statements ...
2015-04-17Merge branch 'akpm' (patches from Andrew)Linus Torvalds
Merge third patchbomb from Andrew Morton: - various misc things - a couple of lib/ optimisations - provide DIV_ROUND_CLOSEST_ULL() - checkpatch updates - rtc tree - befs, nilfs2, hfs, hfsplus, fatfs, adfs, affs, bfs - ptrace fixes - fork() fixes - seccomp cleanups - more mmap_sem hold time reductions from Davidlohr * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (138 commits) proc: show locks in /proc/pid/fdinfo/X docs: add missing and new /proc/PID/status file entries, fix typos drivers/rtc/rtc-at91rm9200.c: make IO endian agnostic Documentation/spi/spidev_test.c: fix warning drivers/rtc/rtc-s5m.c: allow usage on device type different than main MFD type .gitignore: ignore *.tar MAINTAINERS: add Mediatek SoC mailing list tomoyo: reduce mmap_sem hold for mm->exe_file powerpc/oprofile: reduce mmap_sem hold for exe_file oprofile: reduce mmap_sem hold for mm->exe_file mips: ip32: add platform data hooks to use DS1685 driver lib/Kconfig: fix up HAVE_ARCH_BITREVERSE help text x86: switch to using asm-generic for seccomp.h sparc: switch to using asm-generic for seccomp.h powerpc: switch to using asm-generic for seccomp.h parisc: switch to using asm-generic for seccomp.h mips: switch to using asm-generic for seccomp.h microblaze: use asm-generic for seccomp.h arm: use asm-generic for seccomp.h seccomp: allow COMPAT sigreturn overrides ...
2015-04-17kasan: Makefile: shut up warnings if CONFIG_COMPILE_TEST=yAndrey Ryabinin
It might be annoying to constantly see this: scripts/Makefile.kasan:16: Cannot use CONFIG_KASAN: -fsanitize=kernel-address is not supported by compiler while performing allmodconfig/allyesconfig build tests. Disable this warning if CONFIG_COMPILE_TEST=y. Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.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>
2015-04-17checkpatch: avoid "spaces required around that ':'" false positiveJoe Perches
Since commit 1f65f947a6a8 ("checkpatch: add checks for question mark and colon spacing") back in 2008, checkpatch has reported false positive for asm volatile uses of "::" checkpatch thinks colons should always have spaces around it. Add an exception for colons with colons on either side for this valid asm volatile (and c++) use. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Yehuda Yitschak <yehuday@marvell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: fix --fix use with a patch of multiple filesJoe Perches
If a patch touches multiple files, the --fix and --fix-inplace option doesn't keep the proper line count and makes the new patch file not able to be applied via bad offset line numbers when lines are added or deleted by the --fix option. Dunno how that extra backslash snuck in there. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch.pl: new instances of ENOSYS are errorsAndy Lutomirski
ENOSYS means that a nonexistent system call was called. We have a bad habit of using it for things like invalid operations on otherwise valid syscalls. We should avoid this in new code. Pervasive incorrect usage of ENOSYS came up at the kernel summit ABI review discussion. Let's see if checkpatch can help. I'll submit a separate patch for include/uapi/asm-generic/errno.h. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Michael Kerrisk <mtk.manpages@gmail.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>
2015-04-17checkpatch: add a test for const with __read_mostly usesJoe Perches
const objects shouldn't be __read_mostly. They are read-only. Marking these objects as __read_mostly causes section conflicts with LTO linking. So add a test to try to avoid this issue. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: improve operator spacing checkSam Bobroff
Code such as: x = timercmp(&now, &end, <); Will currently trigger a checkpatch error. e.g. ERROR: spaces required around that '<' This is because the "Ignore operators passed as parameters" check looks only for a comma following the operator. Improve the check by also looking for a close parenthesis. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.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>
2015-04-17checkpatch: add 'Prefer ARRAY_SIZE" testJoe Perches
Add a test for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo). 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>
2015-04-17checkpatch: add uart_ops to normally const structsJoe Perches
Add another struct to the list of normally const struct types Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: add #define foo "string" long line exceptionJoe Perches
There are #defines with long string constants like: #define foo "some really long string > 80 columns" Add a long line exception for them. Miscellanea: Use the $String variable for slightly better readability Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch, SubmittingPatches: suggest line wrapping commit messages at 75 ↵Joe Perches
columns Commit messages lines are sometimes overly long. Suggest line wrapping at 75 columns so the default git commit log indentation of 4 plus the commit message text still fits on an 80 column screen. Add a checkpatch test for long commit messages lines too. Signed-off-by: Joe Perches <joe@perches.com> Cc: David Miller <davem@davemloft.net> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Ian Morris <ipm@chirality.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: don't ask for asm/file.h to linux/file.h unconditionallyFabian Frederick
Currently checkpatch warns when asm/file.h is included and linux/file.h exists. That conversion can be made when linux/file.h includes asm/file.h which is not always the case.(See signal.h) Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Andy Whitcroft <apw@canonical.com> 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>
2015-04-17checkpatch: add test for repeated const usesJoe Perches
Using 'const <type> const *' is generally meant to be written 'const <type> * const'. Add a test for the miswritten form. 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>
2015-04-17checkpatch: improve return negative errno checkJoe Perches
Add a few conditions to the test to find return (ERRNO); Make the output message a bit less cryptic too. 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>
2015-04-17checkpatch: match more world writable permissionsJoe Perches
Currently checkpatch will fuss if one uses world writable settings in debugfs files and DEVICE_ATTR uses by testing S_IWUGO but not testing S_IWOTH, S_IRWXUGO or S_IALLUGO. Extend the check to catch all cases exporting world writable permissions including octal values. [akpm@linux-foundation.org: remove stray $] Signed-off-by: Joe Perches <joe@perches.com> Original-patch-by: Nicholas Mc Guire <hofrat@osadl.org> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: add optional --codespell dictionary to find more typosJoe Perches
If a codespell dictionary exists, use it if desired. default is off, maybe it could be turned on later. codespell's dictionary format allows multiple possible corrections, ignore that for now and only use the first suggestion. Also add \b to spelling test so that consecutive misspelled words are found properly. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Kees Cook <keescook@chromium.org> Cc: Masanari Iida <standby24x7@gmail.com> Cc: Lucas De Marchi <lucas.de.marchi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-17checkpatch: spell check reudceJani Nikula
References: http://mid.gmane.org/1424977312-24902-1-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.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>
2015-04-17checkpatch: add spell checking of email subject lineJoe Perches
Only commit log and patch additions are checked for typos and spelling errors currently. Add a check of the email subject line too. Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Tested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>