- Nov 07, 2013
-
-
Josh Triplett authored
str.startswith has existed since at least Python 2.0, in 2000; use it rather than a fragile comparison against an initial slice of a string, which requires hard-coding the length of the string to compare against. Signed-off-by:
Josh Triplett <josh@joshtriplett.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Josh Triplett authored
linux_banner can change size due to changes in the compiler, build number, or the user@host the system was compiled on; ignore size changes in linux_banner entirely. Signed-off-by:
Josh Triplett <josh@joshtriplett.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Nov 06, 2013
-
-
Kees Cook authored
The modpost tool could overflow its stack buffer if someone was running with an insane shell environment. Regardless, it's technically a bug, so this fixes it to truncate the string instead of seg-faulting. Found by Coverity. Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Andi Kleen authored
Disable static detection: the static currently drops a lot of useful information including clones generated by gcc. Drop this. The statics will appear now without static. prefix. But remove the LTO .NUMBER postfixes that look ugly Signed-off-by:
Andi Kleen <ak@linux.intel.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Andi Kleen authored
Also warn for too long symbols v2: Add missing newline. Use 255 max (Joe Perches) Signed-off-by:
Andi Kleen <ak@linux.intel.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Sep 13, 2013
-
-
Clement Chauplannaz authored
Commit 229455bc02b87f7128f190c4491b4ceffff38648 accidentally changed the separator between sed `s' command and its parameters from ':' to '/'. Revert this change. Reported-and-tested-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Clement Chauplannaz <chauplac@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Sep 12, 2013
-
-
Joe Perches authored
As discussed recently on the arm [1] and lm-sensors [2] lists, it is possible to use section markers on variables in a way which gcc doesn't understand (or at least not the way the developer intended): static struct __initdata samsung_pll_clock exynos4_plls[nr_plls] = { does NOT put exynos4_plls in the .initdata section. The __initdata marker can be virtually anywhere on the line, EXCEPT right after "struct". The preferred location is before the "=" sign if there is one, or before the trailing ";" otherwise. [1] http://permalink.gmane.org/gmane.linux.ports.arm.kernel/258149 [2] http://lists.lm-sensors.org/pipermail/lm-sensors/2013-August/039836.html So, update checkpatch to find these misuses and report an error when it's immediately after struct or union, and a warning when it's otherwise not immediately before the ; or =. A similar patch was suggested by Andi Kleen https://lkml.org/lkml/2013/8/5/648 Signed-off-by:
Joe Perches <joe@perches.com> Suggested-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Guenter Roeck <linux@roeck-us.net> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Joe Perches authored
A previous patch ("checkpatch: add --types option to report only specific message types") uses a perl syntax introduced in perl version 5.14. Use the backward compatible perl syntax instead. Signed-off-by:
Joe Perches <joe@perches.com> Reported-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Joe Perches authored
There are some cases where checkpatch can take a long time to complete. Reduce the likelihood of this long run-time by adding a new test for lines with and without comments and eliminating checks on lines with only comments. This reduces the number of "ctx_statement_block" calls, and also the number of tests of $stat, which is now undefined for these blank lines. One test in particular, the "check for switch/default statements without a break", could take an extremely long time to parse as it tries to skip interleaving comments within the ctx_statement_block/$stat and that could be done multiple times unnecessarily. A small test case taken from cfg80211.h before this patch would take 1000's of seconds to run, now it's just a couple seconds. 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>
-
Joe Perches authored
Previous attempt at fixing SPACING errors could make a hash of several defects. This patch should make --fix be a lot better at correcting these defects. Trim left and right sides of these defects appropriately instead of a somewhat random attempt at it. Trim left spaces from any following bit of the modified line when only a single space is required around an operator. Signed-off-by:
Joe Perches <joe@perches.com> Cc: Phil Carmody <phil.carmody@partner.samsung.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>
-
Joe Perches authored
The tracing subsystem uses slightly odd #defines to set path/directory locations for include files. These #defines can cause false positives for the complex macro tests so add exclusions for these specific #defines (TRACE_SYSTEM, TRACE_INCLUDE_FILE, TRACE_INCLUDE_PATH). Signed-off-by:
Joe Perches <joe@perches.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Li Zefan <lizefan@huawei.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>
-
Joe Perches authored
Add a --types convenience option to show only specific message types. Combined with the --fix option, this can produce specific suggested formatting patches to files. 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>
-
Joe Perches authored
checkpatch can generate a false positive when inserting a new kernel-doc block and function above an existing kernel-doc block. Fix it by checking that the context line is also a newly inserted line. Signed-off-by:
Joe Perches <joe@perches.com> Reported-by:
Darren Hart <dvhart@linux.intel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Joe Perches authored
Using the extern keyword on function prototypes is superfluous visual noise so suggest removing it. Using extern can cause unnecessary line wrapping at 80 columns and unnecessarily long multi-line function prototypes. Signed-off-by:
Joe Perches <joe@perches.com> Suggested-by:
Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Joe Perches authored
Emit a warning when a signature is used more than once. 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>
-
Dave Hansen authored
I got a bug report from a couple of users who said checkpatch.pl was broken for them. It was erroring out on fairly random lines most commonly with messages like: Nested quantifiers in regex; marked by <--HERE in m/(\((?:[^\(\)]++ <-- HERE |(?-1))*\))/ at ./checkpatch.pl line 340. The bug reporter was running a version of perl 5.8 which was end-of-lifed in 2008: http://www.cpan.org/src/ . Versions of perl this old are at _best_ quite untested. At worst, they are crusty and known to be completely broken. If folks have a system _that_ old, then we should have mercy on them and give them a half-decent error message rather than fail with nutty error messages. This patch enforces that checkpatch.pl is run with perl 5.10, which was end-of-lifed in 2009. The new --ignore-perl-version command-line switch will let folks override this if they want. Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Cc: Joe Perches <joe@perches.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>
-
Joe Perches authored
$Lval is a test for complete name (ie: foo->bar.Baz[1]) If any of this is CamelCase, then the current test uses the entire $Lval. This isn't optimal because it can emit messages with foo->bar.Baz and bar.Baz when Baz is a variable specified in an include file. So instead, break the $Lval into words and check each word for CamelCase uses. 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>
-
Joe Perches authored
Suggest a few more single-line corrections. Remove DOS line endings Simplify removing trailing whitespace Remove global/static initializations to 0/NULL Convert pr_warning to pr_warn Add space after brace Convert binary constants to hex Remove whitespace after line continuation Use inline not __inline or __inline__ Use __printf and __scanf Use a single ; for statement terminations Convert __FUNCTION__ to __func__ 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>
-
- Sep 05, 2013
-
-
Yann E. MORIN authored
Previously, it was possible to have more than one symbol with the 'option modules' attached to them, although only the last one would in fact control tristates. Since this does not make much sense, only allow at most one symbol to control tristates. Note: it is still possible to have more than one symbol that control tristates, but indirectly: config MOD1 bool "mod1" select MODULES config MOD2 bool "mod2" select MODULES config MODULES bool option modules Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Yann E. MORIN authored
Regenerate bison parser after changes made in: 6902dccf: kconfig: do not special-case 'MODULES' symbol Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Yann E. MORIN authored
Currently, the 'MODULES' symbol is hard-coded to be the default symbol that enables/disables tristates, if no other symbol was declared with 'option modules'. While this used to be needed for the Linux kernel, we now have an explicit 'option modules' attached to the 'MODULES' symbol (since cset 11097a03), so we no longer need to special-case it in the kconfig code. Furthermore, kconfig is extensively used out of the Linux kernel, and other projects may have another meaning for a symbol named 'MODULES'. This patch changes the way we enable/disable tristates: if a symbol was found with 'option modules' attached to it, then that symbol controls enabling tristates. Otherwise, tristates are disabled, even if a symbol named 'MODULES' exists. Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Sep 01, 2013
-
-
Mike Pagano authored
Support past and active versions of python while maintaining backward compatibility. Script has been tested on python versions up to and including 3.3.X. Signed-off-by:
Mike Pagano <mpagano@gentoo.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Aug 30, 2013
-
-
Tony Lu authored
This commit adds support for static ftrace, graph function support, and dynamic tracer support. Signed-off-by:
Tony Lu <zlu@tilera.com> Signed-off-by:
Chris Metcalf <cmetcalf@tilera.com>
-
- Aug 28, 2013
-
-
Max Filippov authored
-e is a non-standard echo option, echo output is implementation-dependent when it is used. Replace echo -e with printf as suggested by POSIX echo manual. Signed-off-by:
Max Filippov <jcmvbkbc@gmail.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Aug 26, 2013
-
-
Stuart Longland authored
A lot of 64-bit systems supported by Linux/MIPS have boot firmware or bootloaders that only understand 32-bit ELF files, and as such, the vmlinux.32 target exists to support these systems. Therefore, it'd be nice if the tar-pkg target recognised this, and included the right version when packaging up a binary of the kernel. This updates buildtar to support MIPS targets. MIPS may use 'vmlinux' or 'vmlinux.32' depending on the target system. This uses 'vmlinux.32' in preference to 'vmlinux' where present (although I should check which is newer), including either file as /boot/vmlinux-${version}. Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1673/ Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
- Aug 20, 2013
-
-
Chen Gang authored
Need permit '.cranges' section for sh64 architecture, or modpost will report warning: LD init/built-in.o WARNING: init/built-in.o (.cranges): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. Signed-off-by:
Chen Gang <gang.chen@asianux.com> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au>
-
- Aug 19, 2013
-
-
Mike Pagano authored
Handle gracefully the instance where config files are not present. Compatible with python versions 2.5, 2.6 and 2.7. The try/except is forward compatible with python version 3 once the entire script is ported. Signed-off-by:
Mike Pagano <mpagano@gentoo.org> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Aug 15, 2013
-
-
Yann E. MORIN authored
When a symbol changes type from tristate to bool, and was previously set to 'm', a subsequent silentoldconfig would warn about inconsistency, such as: include/config/auto.conf:3014:warning: symbol value 'm' invalid for HOTPLUG_PCI_PCIE Seen by Linus with the merge in aa8032b6 (sequence to reproduce by Michal): git checkout 1fe0135b make mrproper make allmodconfig make silentoldconfig git checkout aa8032b6 make allmodconfig make silentoldconfig Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b6, it was previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig, but then was set to 'y' by the second allmodconfig. Then the second silentoldconfig prints the warning. The warning in this case is a spurious warning, which happens at the time kconfig tries to detect symbols that have changed, to touch the empty header files in include/config used for dependency-tracking by make. Silence the warning when we read the old auto.conf file, since it is perfectly legit that a symbol changed type since the previous call. Thread in: http://marc.info/?l=linux-pci&m=137569198904000&w=2 Reported-by:
Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Clement Chauplannaz authored
Script `config' relies on extensions of `GNU sed', and is thus not working on all Unixes: - in-place edition of files (-i), which can be replaced with a temporary file; - extended-regexps (-r), which can be split into basic regexps; - single-line calls to `a' command, while some implementations require a leading newline before the parameter. Rewrite calls to `sed' to comply with POSIX interface, and move them to helper functions. Signed-off-by:
Clement Chauplannaz <chauplac@gmail.com> Tested-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by:
Yann E. MORIN <yann.morin.1998@free.fr>
-
Kees Cook authored
Instead of using "long" for kconfig "hex" and "range" values, which may change in size depending on the host architecture, use "long long". This will allow values greater than INT_MAX on 32-bit hosts when cross compiling. Signed-off-by:
Kees Cook <keescook@chromium.org> Acked-by:
Geert Uytterhoeven <geert@linux-m68k.org> Tested-by:
"Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by:
"Yann E. MORIN" <yann.morin.1998@free.fr>
-
Heinrich Schuchardt authored
scripts/package/builddeb is used to create Debian packages. Currently the firmware package always gets the same version number irrespective of the Kernel version. The paths inside the firmware package depend on the Kernel version. With the patch supplied the Kernel version becomes part of the Debian firmware package number. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ben Hutchings <ben@decadent.org.uk> Acked-by:
maximilian attems <max@stro.at> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Aug 13, 2013
-
-
Rasmus Villemoes authored
This semantic patch replaces "return {0,1};" with "return {false,true};" in functions returning bool. Signed-off-by:
Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jul 25, 2013
-
-
Ramkumar Ramachandra authored
Signed-off-by:
Ramkumar Ramachandra <artagnon@gmail.com> Acked-by:
David Daney <david.daney@cavium.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jul 24, 2013
-
-
Anisse Astier authored
We now provide the installed image path to the kernel hooks. This should allow the package to better integrate with debian hooks, and should not be too disruptive of hooks supporting only one parameter. Signed-off-by:
Anisse Astier <anisse@astier.eu> Reviewed-by:
Ben Hutchings <ben@decadent.org.uk> Acked-by:
maximilian attems <max@stro.at> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Anisse Astier authored
Signed-off-by:
Anisse Astier <anisse@astier.eu> Reviewed-by:
Ben Hutchings <ben@decadent.org.uk> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Anisse Astier authored
This can reduce almost 3 times the size of the linux-image package, while keeping the debug symbols available for this particular build, in their own package. This mimics the way kernels are built in debian, ubuntu, or with make-kpkg, and comes at the price of a small slowdown in the building of packages. Signed-off-by:
Anisse Astier <anisse@astier.eu> Cc: Ben Hutchings <ben@decadent.org.uk> Acked-by:
maximilian attems <max@stro.at> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Anisse Astier authored
Signed-off-by:
Anisse Astier <anisse@astier.eu> Reviewed-by:
Ben Hutchings <ben@decadent.org.uk> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
- Jul 23, 2013
-
-
Mike Marciniszyn authored
Change the spec file to generate a kernel-devel module allowing for compilation of external kernel modules. This patch requires a new minimum RPM level of 4.0.3. Signed-off-by:
Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Mike Marciniszyn authored
Prior to this patch, firmware files were being installed in /lib/firmware with a potential conflict with already installed kernels. firmware files are now installed in /lib/firmware/<release> and packaged with the rest of the modules. Signed-off-by:
Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-
Mike Marciniszyn authored
/sbin/installkernel is used to insure grub hooks are inserted and the initramfs is created on the target system. The invokation installkernel will work with any kernel as long as: - /sbin/installkernel exists - the kernel and sysem map files are readable Signed-off-by:
Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by:
Michal Marek <mmarek@suse.cz>
-