This option is aimed to add the possibility to control a menu's visibility
without adding dependency to the expression to all the submenu.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
scripts/kernel-doc was leaving unescaped '<', '>', and '&' in
generated xml output for structs. This causes xml parser errors.
Convert these characters to "<", ">", and "&" as needed
to prevent errors.
Most of the conversion was already done; complete it just before
output.
Documentation/DocBook/device-drivers.xml:41883: parser error : StartTag: invalid element name
#define INPUT_KEYMAP_BY_INDEX (1 << 0)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
cmd_record_mcount is used to locate the _mcount symbols in the object
files, only the files compiled with -pg has the _mcount symbol, so, it
is only needed for such files, but the current cmd_record_mcount is used
for all of the object files, so, we need to fix it and speed it up.
Since -pg may be removed by the method used in kernel/trace/Makefile:
ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
Or may be removed by the method used in arch/x86/kernel/Makefile:
CFLAGS_REMOVE_file.o = -pg
So, we must check the last variable stores the compiling flags, that is
c_flags(Please refer to cmd_cc_o_c and rule_cc_o_c defined in
scripts/Makefile.build) and since the CFLAGS_REMOVE_file.o is already
filtered in _c_flags(Please refer to scripts/Makefile.lib) and _c_flags
has less symbols, therefore, we only need to check _c_flags.
---------------
Changes from v1:
o Don't touch Makefile for CONFIG_FTRACE_MCOUNT_RECORD is enough
o Use _c_flags intead of KBUILD_CFLAGS to cover CONFIG_REMOVE_file.o = -pg
(feedback from Steven Rostedt <rostedt@goodmis.org>)
Acked-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
LKML-Reference: <3dc8cddf022eb7024f9f2cf857529a15bee8999a.1288196498.git.wuzhangjin@gmail.com>
[ changed if [ .. == .. ] to if [ .. = .. ] to handle dash environments ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
I noticed fixdep uses ~2% of cpu time in kernel build, in function
use_config()
fixdep spends a lot of cpu cycles in linear searches in its internal
string array. With about 400 stored strings per dep file, this begins to
be noticeable.
Convert fixdep to use a hash table.
kbuild results on my x86_64 allmodconfig
Before patch :
real 10m30.414s
user 61m51.456s
sys 8m28.200s
real 10m12.334s
user 61m50.236s
sys 8m30.448s
real 10m42.947s
user 61m50.028s
sys 8m32.380s
After:
real 10m8.180s
user 61m22.506s
sys 8m32.384s
real 10m35.039s
user 61m21.654s
sys 8m32.212s
real 10m14.487s
user 61m23.498s
sys 8m32.312s
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
umask 077
make deb-pkg
<snipp ..>
dpkg-deb: building package `linux-image-2.6.36+' in `../linux-image-2.6.36+_2.6.36+-4_amd64.deb'.
dpkg-deb: control directory has bad permissions 700 (must be >=0755 and <=0775)
make[1]: *** [deb-pkg] Error 2
Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When expanding a parameterised string we may run out of space, this
triggers a realloc. When computing the new allocation size we do not
allow for the terminating '\0'. Allow for this when calculating the new
length.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
genirq: Fix up irq_node() for irq_data changes.
genirq: Add single IRQ reservation helper
genirq: Warn if enable_irq is called before irq is set up
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
semaphore: Remove mutex emulation
staging: Final semaphore cleanup
jbd2: Convert jbd2_slab_create_sem to mutex
hpfs: Convert sbi->hpfs_creation_de to mutex
Fix up trivial change/delete conflicts with deleted 'dream' drivers
(drivers/staging/dream/camera/{mt9d112.c,mt9p012_fox.c,mt9t013.c,s5k3e2fx.c})
Semaphores used as mutexes have been deprecated for years. Now that
all users are either converted to real semaphores or to mutexes remove
the cruft.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20100907125057.562399240@linutronix.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
kconfig: Have streamline_config process menuconfigs too
kconfig: Fix streamline_config to read multi line deps in Kconfig files
kconfig: Fix missing declaration of variable $dir in streamline_config.pl
kconfig: Fix variable name typo %prompts in streamline_config.pl
kconfig: Make localmodconfig handle environment variables
Since MIPS modules' address space differs from the core kernel space, to access
the _mcount in the core kernel, the kernel functions in modules must use long
call (-mlong-calls): load the _mcount address into one register and jump to the
address stored by the register:
c: 3c030000 lui v1,0x0 <--------> b label
c: R_MIPS_HI16 _mcount
c: R_MIPS_NONE *ABS*
c: R_MIPS_NONE *ABS*
10: 64630000 daddiu v1,v1,0
10: R_MIPS_LO16 _mcount
10: R_MIPS_NONE *ABS*
10: R_MIPS_NONE *ABS*
14: 03e0082d move at,ra
18: 0060f809 jalr v1
label:
In the old Perl version of recordmcount, we only need to record the position of
the 1st R_MIPS_HI16 type of _mcount, and later, in ftrace_make_nop(), replace
the instruction in this position by a "b label" and in ftrace_make_call(),
replace it back.
But, the default C version of recordmcount records all of the _mcount symbols,
so, we must filter the 2nd _mcount like the Perl version of recordmcount does.
The C version of recordmcount copes with the symbols before they are linked, So
It doesn't know the type of the symbols and therefore can not filter the
symbols as the Perl version of recordmcount does. But as we can see above, the
2nd _mcount symbols of the long call alawys follows the 1st _mcount symbol of
the same long call, which means the offset from the 1st to the 2nd is fixed, it
is 0x10-0xc = 4 here, 4 is the length of the 1st load instruciton, for MIPS has
fixed length of instructions, this offset is always 4.
And as we know, the _mcount is inserted into the entry of every kernel
function, the offset between the other _mcount's is expected to be always
bigger than 4. So, to filter the 2ns _mcount symbol of the long call, we can
simply check the offset between two _mcount symbols, If it is 4, then, filter
the 2nd _mcount symbol.
To avoid touching too much code, an 'empty' function fn_is_fake_mcount() is
added for all of the archs, and the specific archs can override it via chaning
the function pointer: is_fake_mcount in do_file() with the e_machine. e.g. This
patch adds MIPS_is_fake_mcount() to override the default fn_is_fake_mcount()
pointed by is_fake_mcount.
This fn_is_fake_mcount() checks if the _mcount symbol is fake, e.g. the 2nd
_mcount symbol of the long call is fake, for there are 2 _mcount symbols mapped
to one real mcount call, so, one of them is fake and must be filtered.
This fn_is_fake_mcount() is called in sift_rel_mcount() after finding the
_mcount symbols and before adding the _mcount symbol into mrelp, so, it can
prevent the fake mcount symbol going into the last __mcount_loc table.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
LKML-Reference: <b866f0138224340a132d31861fa3f9300dee30ac.1288176026.git.wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
MIPS64 has 'weird' Elf64_Rel.r_info[1,2], which must be used instead of
the generic Elf64_Rel.r_info, otherwise, the C version of recordmcount
will not work for "segmentation fault".
Usage of "union mips_r_info" and the functions MIPS64_r_sym() and
MIPS64_r_info() written by Maciej W. Rozycki <macro@linux-mips.org>
----
[1] http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
[2] arch/mips/include/asm/module.h
Tested-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
LKML-Reference: <AANLkTinwXjLAYACUfhLYaocHD_vBbiErLN3NjwN8JqSy@mail.gmail.com>
LKML-Reference: <910dc2d5ae1ed042df4f96815fe4a433078d1c2a.1288176026.git.wuzhangjin@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Some menuconfigs in the Kconfig files have prompts and dependencies.
Currently, streamline_config misses these, and this can cause
streamline_config to keep modules enabled that should not be, and
even worse, not enable those that should.
This patch makes streamline_config process menuconfigs just like it
would process a config.
Reported-by: member graysky <graysky@archlinux.us>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
I noticed that some Kconfig files have multi line dependencies
that continue with a backslash. Those dependencies on the next
line will be missed by streamline_config.
For example:
config CS89x0
tristate "CS89x0 support"
depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \
|| ARCH_IXDP2X01 || MACH_MX31ADS)
The "|| ARCH_IXDP2X01 || MACH_MX31ADS)" will not be processed.
This patch adds code to handle this case.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
On Fri, Aug 17, 2010 at 01:43PM +0800, Américo Wang wrote:
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
>
> BTW, I think we should add "use strict;" too.
Then I added "use strict;" to streamline_config.pl, I saw another
warning.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 286.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 287.
> Global symbol "$dir" requires explicit package name at
scripts/kconfig/streamline_config.pl line 288.
Then I added "my $dir;" to line 285.
Cc: Américo Wang <xiyou.wangcong@gmail.com>
Cc: Toralf Foerster <toralf.foerster@gmx.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com>
LKML-Reference: <1282042158.7160.9.camel@hiromu-Macbook>
[ changed to just add my in front of $dir instead of new line ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
When I added "use strict;" to streamline_config.pl, I saw the following
warnings:
> Global symbol "%prompt" requires explicit package name at
scripts/kconfig/streamline_config.pl line 183.
> Global symbol "%prompt" requires explicit package name at
scripts/kconfig/streamline_config.pl line 368.
The declaration of %prompt was incorrect, and should have been %prompts.
Cc: Toralf Foerster <toralf.foerster@gmx.de>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com>
LKML-Reference: <1281845597.11566.5.camel@camp10-laptop>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The commit 838a2e55e6
kbuild: migrate all arch to the kconfig mainmenu upgrade
Broke make localmodconfig. The reason was that it added a
environment variable to the kconfig source, which the
streamline_config.pl could not handle.
This patch changes streamline_config.pl to handle kconfig sources
using environment variables in their names.
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
scripts/package: don't break if %{_smp_mflags} isn't set
kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (39 commits)
Revert "namespace: add source file location exceptions"
Coccinelle: Add contextual message
Coccinelle: Fix documentation
Coccinelle: Find doubled arguments to boolean or bit operators.
Coccinelle: Find nested lock+irqsave functions that use the same flags variables.
namespace: add source file location exceptions
scripts/extract-ikconfig: add support for bzip2, lzma and lzo
kbuild: check return value of asprintf()
scripts/namespace.pl: improve to get more correct results
scripts/namespace.pl: some bug fixes
scripts/namespace.pl: update file exclusion list
scripts/namespace.pl: fix wrong source path
Coccinelle: Use the -no_show_diff option for org and report mode
Coccinelle: Add a new mode named 'chain'
Coccinelle: Use new comment format to explain kfree.cocci
Coccinelle: Improve user information with a new kind of comment
Coccinelle: Update documentation
MAINTAINERS: Coccinelle: Update email address
Documentation/kbuild: modules.txt cleanup
Documentation/kbuild: major edit of modules.txt sections 5-8
...
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (38 commits)
kbuild: convert `arch/tile' to the kconfig mainmenu upgrade
README: cite nconfig
Revert "kconfig: Temporarily disable dependency warnings"
kconfig: Use PATH_MAX instead of 128 for path buffer sizes.
kconfig: Fix realloc usage()
kconfig: Propagate const
kconfig: Don't go out from read config loop when you read new symbol
kconfig: fix menuconfig on debian lenny
kbuild: migrate all arch to the kconfig mainmenu upgrade
kconfig: expand file names
kconfig: use the file's name of sourced file
kconfig: constify file name
kconfig: don't emit warning upon rootmenu's prompt redefinition
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
kconfig: delay gconf window initialization
kconfig: expand by default the rootmenu's prompt
kconfig: add a symbol string expansion helper
kconfig: regen parser
kconfig: implement the `mainmenu' directive
kconfig: allow PACKAGE to be defined on the compiler's command-line
...
Fix up trivial conflict in arch/mn10300/Kconfig
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
initramfs: Fix build break on symbol-prefixed archs
initramfs: fix initramfs size calculation
initramfs: generalize initramfs_data.xxx.S variants
scripts/kallsyms: Enable error messages while hush up unnecessary warnings
scripts/setlocalversion: update comment
kbuild: Use a single clean rule for kernel and external modules
kbuild: Do not run make clean in $(srctree)
scripts/mod/modpost.c: fix commentary accordingly to last changes
kbuild: Really don't clean bounds.h and asm-offsets.h
This reverts commit 24a54f7974.
Stephen Hemminger <shemminger@vyatta.com> writes:
> That patch should not be included. It causes more problems than it
> solves, since then there are duplicate file locations which causes
> false duplicate symbol reports.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Change the message displayed to the user according
to the current mode used.
Fix trailing white-space and spelling
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Teach namespace checker about some special case files where the
source is in unusual location. This fixes many of the source file
not found errors (more can be added), and also prevents false positives
for functions not being used.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add support for kernels compressed with bzip2, lzma or lzo to the
extract-ikconfig script.
Fixes kernel bugzilla #19852:
https://bugzilla.kernel.org/show_bug.cgi?id=19852
Signed-off-by: Dick Streefland <dick@streefland.net>
Tested-by: Justin <jlec@gentoo.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Check return value of asprintf() in docsect() and exit if error
occurs. This removes following warning:
HOSTCC scripts/basic/docproc
scripts/basic/docproc.c: In function ‘docsect’:
scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Exclude more symbols from arch/x86/vdso/ and arch/x86/boot/; add some more
linker-defined symbols into exception list; add other cond_syscalls
besides "sys_*".
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
1. Teach namespace.pl to understand "V" and "v"
2. cond_syscalls are moved into kernel/sys_ni.c
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
File::Find will do chdir automatically, so we need to get the absolute
patch with $File::Find::dir.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add warnings for possible missing const uses of
static char foo[] = "bar"
that could be
static const char foo[] = "bar"
and
static const char *foo[] = {"bar", "baz"}
that could be
static const char * const foo[] = {"bar", "baz"}
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mike Frysinger <vapier.adi@gmail.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>
When tracking context to find a block or statement we need to use the
sanitised lines, else perentheses '(' & ')' and braces '{' & '}' can throw
the scanner out. Also fix up a couple of error outputs which include
those sanitised lines incorrectly.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Handly definitions similar to below. The definition macro spits out a
symbol with a prefix. Add matching of any identifier prefix:
DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
ata_scsi_lpm_show, ata_scsi_lpm_put);
EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Handle definitions such as the following correctly, it is not
a complex statement:
#define PREALLOC(NAME, START, END, FLAGS) { \
.name = (NAME), \
.start = (START), \
.end = (END), \
.flags = (FLAGS) \
},
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
On Wed, 2010-08-11 at 12:35 -0400, Dave Jones wrote:
> I just got this from a patch I merged..
>
> ERROR: need consistent spacing around '*' (ctx:WxV)
> #121: FILE: arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c:113:
> +static struct pcc_cpu __percpu *pcc_cpu_info;
> ^
> which doesn't seem right.
Perhaps these need to be added to checkpatch.
[apw@canonical.com: added tests]
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Throw an error when a source file has been given execute permissions using
the mode change line present in git diffs. Also alow the filename
matching to use the "diff" line in addition to the "+++" line, since the
mode change lines appear before any "+++" lines.
[apw@canonical.com: simplified filename logic slightly, added tests]
Cc: Andy Whitcroft <apw@canonical.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When checking the length of the help we need to be sure we are seeing the
whole story before erroring. Firstly we only want to check when adding
the help in the first place. Second we need to be sure that we are seeing
the end of the entry, nominally when there is no context below or that
context shows the start of the next entry.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commonise the code for missing spaces after struct, union, and enum such
that they share the same code. Ensure we cover all the common cases in
each case. Check against the sanitised line to ensure we do not report on
comments and strings.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add spacing checks for struct, union, and enum definitions. Check the
spacing after type and before the equals (=) and open brace ({).
Based on a patch by Joe Perches.
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add a (strict mode only) test to check for non-negative returns of what
appear to be errno values as the majority case these should indeed be
negative.
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The following incantation is triggering categorisation of its colon (:) as
a binary form, which it is not:
return foo ? (s8)bar : baz;
Handle casts differently from types in the categoriser, allowing us to
better track (s8)bar as a value and not a declaration.
Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When determining if a return () sequence is a function style bracketing we
simplify the expression one bracket at a time replacing each with a
constant. However this can trigger a false merge with expressions as
below:
return (foo)0;
Prevent this false merging.
Reported-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When we hit types of whitespace which may be fixed by scripts/cleanpatch
and scripts/cleanfile suggest their use in our report.
Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When the following form is used we have a type which fully fills a line.
This means that a type may end at the end of line as well as at the
following identifier.
int **
foo;
Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The patch "checkpatch: fix handling of leading spaces" added checks for
leading spaces on lines, but this introduces regressions. Firstly it does
not correctly detect when we are in a comment. Secondly it does not allow
for preprocessor command spacing. Finally it does not allow for label
indentation which is required to be less than one tab. Fix these up:
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix a defect with the first mailing list address being used for each
subsequent mailing list.
Updated to 0.26-beta6.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Use Florian Mickler's mailmap routine to reduce name duplication.
o Add subroutine deduplicate_email to centralize code
o Add hashes for deduplicate_(name|address)_hash
o Remove now unused @interactive_to
o Whitespace neatening
o Add command line --help text
o Add --mailmap command line option control
o Interactive changes:
- Add toggles for maintainer, git and list selections
- Default selection is all
- Add mailmap control
Update to 0.26-beta5
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
And a miscellaneous conversion of You to you in a help message
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Implement it, like it is described in git-shortlog.
Signed-off-by: Florian Mickler <florian@mickler.org>
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>
Case insensitive name and email address matching can help reduce
duplication when authors don't always use the exact same signature.
o Add a --interactive per-file exact_match hash so git history
can be checked on per-file only when there is no direct maintainer
o Make @interactive_to list global so save_commits_by_<foo> can check
email names & addresses against this list for duplication
o Don't allow --interactive and --sections
o rename subroutine get_maintainer to get_maintainers
o Added help text option to --interactive menu prompt
Update version to 0.26-beta4
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
o Added searching by git-blame as well as git-history
o Added different selection toggles
o Added ability to list commits by author or by sign-off-type
o Use custom git and hg formats to make searching for subject/author
a bit easier.
o Move inlined section matching and searching git/hg history to
new get_maintainer subroutine
o Added subroutines save_commits_by_author and save_commits_by_signer
o Removed subroutines vcs_get_shortlog and vcs_email_shortlog
o Rename camelcase signaturePattern to signature_pattern
Update to 0.26 beta3
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is a first version of an interactive mode for
scripts/get_maintainer.pl.
It allows the user to interact with the script. Each cc candidate can be
selected and deselected and a shortlog of authored commits can be
displayed for each candidate.
The menu is displayed via STDERR, the end result is outputted to STDOUT.
This unusual mechanism allows using get_maintainer.pl in interactive mode
via git send-email --cc-cmd.
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>
On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@vt.edu wrote:
> Any chance of getting that to be ~/.get_maintainer.conf rather than
> ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by
> "oh but you didn't create that file in *this* tree"
> (I usually have a linus git tree, a linux-next tree, and 3-4 -mm trees)
Sure.
Add a search path for the .conf file.
3 paths are added:
. customized per-tree configurations
$HOME user global configuration when per-tree configs don't exist
./scripts lk defaults to override script
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Adding commit signers when there is a listed MAINTAINER for a file
can make the output list longer than necessary.
Change the --git default from on to off.
Add a new --git-fallback option (default on) used to add commit signers
only when there is no MAINTAINER for a file.
git history is used when --git-fallback is enabled and the pattern
directory depth is not the same as the file directory depth.
For instance:
X86 ARCHITECTURE (32-BIT AND 64-BIT)
M: Thomas Gleixner <tglx@linutronix.de>
M: Ingo Molnar <mingo@redhat.com>
M: "H. Peter Anvin" <hpa@zytor.com>
M: x86@kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
S: Maintained
F: Documentation/x86/
F: arch/x86/
If using "./scripts/get_maintainer -f arch/x86/lib/atomic64_32.c", the pattern
for "arch/x86/" does not match the directory depth of "arch/x86/lib"
so the MAINTAINERS entries and git history is used to produce:
$ ./scripts/get_maintainer.pl -f --rolestats arch/x86/lib/atomic64_32.c
Thomas Gleixner <tglx@linutronix.de> (maintainer:X86 ARCHITECTURE...)
Ingo Molnar <mingo@redhat.com> (maintainer:X86 ARCHITECTURE...)
"H. Peter Anvin" <hpa@zytor.com> (maintainer:X86 ARCHITECTURE...,commit_signer:1/1=100%)
x86@kernel.org (maintainer:X86 ARCHITECTURE...)
Luca Barbieri <luca@luca-barbieri.com> (commit_signer:1/1=100%)
linux-kernel@vger.kernel.org (open list)
Luca Barbieri is added because he signed the only commit to
arch/x86/lib/atomic64_32.c during the last year and he meets the
other default qualifications.
--git-min-percent (default:10)
--git-min-signatures (default:1)
If current users of ./scripts/get_maintainers.pl have scripts
that use --nogit that expect git history to be excluded, those
scripts should be updated to include --nogit-fallback or a
.get_maintainer.conf file should be created with --nogit-fallback.
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>
Keyword matching uses K: patterns from MAINTAINERS, so if looking for the
MAINTAINERS maintainer, don't search MAINTAINERS for pattern matches.
MAINTAINERS also has rather a lot of email addresses and is easily
searched using grep "^M:", so skip it.
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>
When options --git-blame and --rolestats are specified, add
the maintainers with the qualifying --git-min-percent amount
of lines authored of the complete file. Does not add more
authors than specified by --git-max-maintainers.
For anyone using hg, this option works but is _very_ slow.
It's orders of magnitude slower than git slow.
The get_maintainer.pl version was incremented to 0.25.
This can be used with or without --git.
For instance:
$ ./scripts/get_maintainer.pl --git-blame --nogit --rolestats -f lib/bitmap.c
Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%)
Akinobu Mita <mita@miraclelinux.com> (authored lines:87/613=14%,commits:3/20=15%)
Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%)
Andrew Morton <akpm@linux-foundation.org> (commits:16/20=80%)
Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%)
Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%)
$ ./scripts/get_maintainer.pl --git-blame --git --rolestats -f lib/bitmap.c
Andrew Morton <akpm@linux-foundation.org> (commit_signer:4/5=80%,commits:16/20=80%)
Akinobu Mita <akinobu.mita@gmail.com> (commit_signer:2/5=40%,authored lines:87/613=14%,commits:3/20=15%)
Jack Steiner <steiner@sgi.com> (commit_signer:1/5=20%)
Ben Hutchings <ben@decadent.org.uk> (commit_signer:1/5=20%)
Lee Schermerhorn <lee.schermerhorn@hp.com> (commit_signer:1/5=20%)
Paul Jackson <pj@sgi.com> (authored lines:406/613=66%,commits:7/20=35%)
Reinette Chatre <reinette.chatre@linux.intel.com> (authored lines:42/613=7%)
Paul Mundt <lethal@linux-sh.org> (commits:3/20=15%)
Randy Dunlap <randy.dunlap@oracle.com> (commits:2/20=10%)
linux-kernel@vger.kernel.org (open list)
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (278 commits)
arm: remove machine_desc.io_pg_offst and .phys_io
arm: use addruart macro to establish debug mappings
arm: return both physical and virtual addresses from addruart
arm/debug: consolidate addruart macros for CONFIG_DEBUG_ICEDCC
ARM: make struct machine_desc definition coherent with its comment
eukrea_mbimxsd-baseboard: Pass the correct GPIO to gpio_free
cpuimx27: fix compile when ULPI is selected
mach-pcm037_eet: fix compile errors
Fixing ethernet driver compilation error for i.MX31 ADS board
cpuimx51: update board support
mx5: add cpuimx51sd module and its baseboard
iomux-mx51: fix GPIO_1_xx 's IOMUX configuration
imx-esdhc: update devices registration
mx51: add resources for SD/MMC on i.MX51
iomux-mx51: fix SD1 and SD2's iomux configuration
clock-mx51: rename CLOCK1 to CLOCK_CCGR for better readability
clock-mx51: factorize clk_set_parent and clk_get_rate
eukrea_mbimxsd: add support for DVI displays
cpuimx25 & cpuimx35: fix OTG port registration in host mode
i.MX31 and i.MX35 : fix errate TLSbo65953 and ENGcm09472
...
When DYNAMIC_FTRACE is enabled and we use the C version of recordmcount,
all objects are run through the recordmcount program to create a
separate section that stores all the callers of mcount.
The build process has a special file: scripts/mod/empty.o. This is
built from empty.c which is literally an empty file (except for a
single comment). This file is used to find information about the target
elf format, like endianness and word size.
The problem comes up when we need to build recordmcount. The
build process requires that empty.o is built first. The build rules
for empty.o will try to execute recordmcount on the empty.o file.
We get an error that recordmcount does not exist.
To avoid this recursion, the build file will skip running recordmcount
if the file that it is building is script/mod/empty.o.
[ extra comment Suggested-by: Sam Ravnborg <sam@ravnborg.org> ]
Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The C version of recordmcount is compiled to a binary, which will
end up located in the objtree. If the kernel is built with O=path,
the srctree will not include the binary recordmcount caller.
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The file kernel/trace/ftrace.c references the mcount() call to
convert the mcount() callers to nops. But because it references
mcount(), the mcount() address is placed in the relocation table.
The C version of recordmcount reads the relocation table of all
object files, and it will add all references to mcount to the
__mcount_loc table that is used to find the places that call mcount()
and change the call to a nop. When recordmcount finds the mcount reference
in kernel/trace/ftrace.o, it saves that location even though the code
is not a call, but references mcount as data.
On boot up, when all calls are converted to nops, the code has a safety
check to determine what op code it is actually replacing before it
replaces it. If that op code at the address does not match, then
a warning is printed and the function tracer is disabled.
The reference to mcount in ftrace.c, causes this warning to trigger,
since the reference is not a call to mcount(). The ftrace.c file is
not compiled with the -pg flag, so no calls to mcount() should be
expected.
This patch simply makes recordmcount.c skip the kernel/trace/ftrace.c
file. This was the same solution used by the perl version of
recordmcount.
Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The elf reader for recordmcount.c had duplicate functions for both
32 bit and 64 bit elf handling. This was due to the need of using
the 32 and 64 bit elf structures.
This patch consolidates the two by using macros to define the 32
and 64 bit names in a recordmcount.h file, and then by just defining
a RECORD_MCOUNT_64 macro and including recordmcount.h twice we
create the funtions for both the 32 bit version as well as the
64 bit version using one code source.
Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This patch adds the support for the C version of recordmcount and
compile times show ~ 12% improvement.
After verifying this works, other archs can add:
HAVE_C_MCOUNT_RECORD
in its Kconfig and it will use the C version of recordmcount
instead of the perl version.
Cc: <linux-arch@vger.kernel.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: John Reiser <jreiser@bitwagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Currently, the mcount callers are found with a perl script that does
an objdump on every file in the kernel. This is a C version of that
same code which should increase the performance time of compiling
the kernel with dynamic ftrace enabled.
Signed-off-by: John Reiser <jreiser@bitwagon.com>
[ Updated the code to include .text.unlikely section as well as
changing the format to follow Linux coding style. ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Same fix as in 13797b77d4 is needed for the "new"
line invoking _smp_mflags for modules_install. Without the fix, `make
binrpm-pkg` fails with:
+ make '%{_smp_mflags}' KBUILD_SRC= modules_install
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
make[2]: *** No rule to make target `%{_smp_mflags}'. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.8S9B9e (%install)
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This allows to write the semantic patches with code sharing
for the matching parts.
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
spatch now returns -1 when a virtual rule (given with
-D on the command line) is not defined in the semantic patch.
Using this spatch feature, coccicheck is now
tries several modes by default, in the order:
patch, report, context, org
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use new comment format to separate proposed commit message
and information about generated false positives
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Improve user information with a new kind of comment
about semantic patch output.
Fix spelling.
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: fix oldnoconfig to do the right thing
kconfig: Temporarily disable dependency warnings
kconfig: delay symbol direct dependency initialization
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
if (input_mode == nonint_oldconfig ||
input_mode == oldnoconfig) {
if (input_mode == nonint_oldconfig &&
sym->name &&
!sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.
Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
After fixing a use-after-free bug in kconfig, a 'make defconfig' or
'make allmodconfig' fills the screen with warnings that were not
detected before. Given that we are close to the release now, disable the
warnings temporarily and deal with them after 2.6.36.
Signed-off-by: Michal Marek <mmarek@suse.cz>
This prevents the buffers being overflowed when using a config
file with a long name. PATH_MAX is used elsewhere in the same
file, so use it here as well.
Signed-off-by: Will Newton <will.newton@imgtec.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This fixes the use-after-free and associated crash in kconfig introduced
in commit 246cf9c26b.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Commit 2e7a091 made struct file->name a const char*, but forgot to
constify all users of it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
commit 8baefd30b5 of linux-next replaced
a `switch()' statement with some `if()' statements, but left `break's
in the `switch()' statement untouched. This cause read config loop to
exit and so "make oldconfig" is not much usable (see below).
> $ make oldconfig
><snip>
> scripts/kconfig/conf --oldconfig Kconfig
> #
> # using defaults found in /boot/config-2.6.34-ccs-r1
> #
> *
> * Restart config...
> *
> *
> * General setup
> *
> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)
(I've already have "CONFIG_EXPERIMENTAL=y" in the old config file. But
that's not read here.)
This patch should fix this problem.
Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
As no error was handled, we wouldn't be able to know when an error does
occur. The fix preserves error messages while it doesn't let unnecessary
compiling warnings show up.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6:
kbuild: migrate all arch to the kconfig mainmenu upgrade
kconfig: expand file names
kconfig: use the file's name of sourced file
kconfig: constify file name
kconfig: don't emit warning upon rootmenu's prompt redefinition
kconfig: replace KERNELVERSION usage by the mainmenu's prompt
kconfig: delay gconf window initialization
kconfig: expand by default the rootmenu's prompt
kconfig: add a symbol string expansion helper
kconfig: regen parser
kconfig: implement the `mainmenu' directive
kconfig: allow PACKAGE to be defined on the compiler's command-line
kconfig: rephrase help texts/comments not to include the package name
kconfig: allow build-time definition of the internal config prefix
kconfig: rephrase help text not to mention the internal prefix
kconfig: replace a `switch()' statement by a more flexible `if()' statement
The following build bug occurs on distcc builds:
CC arch/x86/kernel/asm-offsets.s
In file included from include/linux/module.h:24,
from include/linux/crypto.h:22,
from arch/x86/kernel/asm-offsets_64.c:9,
from arch/x86/kernel/asm-offsets.c:5:
include/trace/events/module.h: In function 'trace_module_load':
include/trace/events/module.h:18: error: expected '(' before 'goto'
include/trace/events/module.h:18: error: expected identifier or '*' before '(' token
It triggers because distcc is invoked by turning $CC into "distcc gcc",
but gcc-goto.sh check script was using $1 not $@ to expand parameters.
Cc: Jason Baron <jbaron@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20100923034910.867858597@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Convert the 'dynamic debug' infrastructure to use jump labels.
Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <b77627358cea3e27d7be4386f45f66219afb8452.1284733808.git.jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
assembly gcc mechanism, we can now branch to labels from an 'asm goto'
statment. This allows us to create a 'no-op' fastpath, which can subsequently
be patched with a jump to the slowpath code. This is useful for code which
might be rarely used, but which we'd like to be able to call, if needed.
Tracepoints are the current usecase that these are being implemented for.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <ee8b3595967989fdaf84e698dc7447d315ce972a.1284733808.git.jbaron@redhat.com>
[ cleaned up some formating ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15),
support to link menuconfig with ncursesw library was added. To compute
the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow
ncursesw to be used as a replacement ncurses. However, when checking what
header file to include, we do not check /usr/include/ncursesw directory.
Add /usr/include/ncursesw to the list of directories that are checked.
With this patch, on my Debian Lenny box with libncursesw5-dev package but
not libncurses5-dev package, I can say "make menuconfig".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This will allow to use the following construct in source files:
config FOO
string
default "foo"
source "$FOO/Kconfig"
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
This silences the warning printed upon prompt redefinition for the rootmenu.
We will encounter this redefinition when a "mainmenu" statement is specified and
override the default prompt.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
Delay the window initialization to let the rootmenu's prompt be
initialized as it will be used to get the window's title.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
If specified, the directive must be placed at the top of the Kconfig file.
We need to change the grammar to make the mainmenu directive set the
`rootmenu' prompt. This reflect how menu_add_prompt() works internally, ie.
set the prompt of the `current_entry', pointing originally to `rootmenu'.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@xenotime.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
With the upcoming dynamical configuration prefix, we can no longer assume that
the prefix will start by a 'C'. As such, we can no longer hardcode this value in
the `case ...:', so replace the `switch() { ... }' statement by a more flexible
'if () { ... }' statement.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
As discussed, remove the DOCTYPE declaration since libglade validates
the file against itself..
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
On system with QT3 and QT4 qmake in PATH may be from QT3. So we use
pkg-config for proper QT4 detection.
By reqesting cflags and libs for either QtCore, QtGui and QtSupport include
dirs and libs get listed several times, but so we won't mis anything
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When getting the help for a choice menu with a help section (for example
the "Choose SLAB allocator" menu) nconfig pops up a window with nothing
inside it. This is due to show_help() passing an empty string to
show_scroll_win()'s 3rd argument. The option really does have help
though, but it isn't a config symbol, so just add the help text for
the option, and don't try to add anything else like the config option
name.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When you don't use !E or !I but only !F, then it's very easy to miss
including some functions, structs etc. in documentation. To help
finding which ones were missed, allow printing out the unused ones as
warnings.
For example, using this on mac80211 yields a lot of warnings like this:
Warning: didn't use docs for DOC: mac80211 workqueue
Warning: didn't use docs for ieee80211_max_queues
Warning: didn't use docs for ieee80211_bss_change
Warning: didn't use docs for ieee80211_bss_conf
when generating the documentation for it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There are valid attributes that could have upper case letters, but we
still want to remove, like for example
__attribute__((aligned(NETDEV_ALIGN)))
as encountered in the wireless code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
if (input_mode == nonint_oldconfig ||
input_mode == oldnoconfig) {
if (input_mode == nonint_oldconfig &&
sym->name &&
!sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.
Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Qt4 is now used by default and will get more testing. In case someone
still uses Qt3 and reports a bug, make it easy to recognize that this is
Qt3.
Acked-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Avoid an error when doing cp over the image when it does not contain
the full path to the file.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
A tagged repository state isn't enough, git describe only
looks at signed or annotated tags (git tag -a/-s). This
documentation update makes sure the comment matches the
current behaviour.
Signed-off-by: Michael Prokop <mika@grml.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Handle the different nop and call instructions for Thumb-2. Also, we
need to adjust the recorded mcount_loc addresses because they have the
lsb set.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org> [recordmcount.pl change]
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This adds mcount recording and updates dynamic ftrace for ARM to work
with the new ftrace dyamic tracing implementation. It also adds support
for the mcount format used by newer ARM compilers.
With dynamic tracing, mcount() is implemented as a nop. Callsites are
patched on startup with nops, and dynamically patched to call to the
ftrace_caller() routine as needed.
Acked-by: Steven Rostedt <rostedt@goodmis.org> [recordmcount.pl change]
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
On ARM, we have two ABIs, and the ABI used is controlled via a config
option. Object files built with one ABI can't be merged with object
files built with the other ABI. So, record_mcount.pl needs to use the
same compiler flags as the kernel when generating the object file with
the mcount locations. Ensure this by passing CFLAGS to the script.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
A straight forward port to QT4 using qt3to4 and compiling against
qt3support
* Use pkg-config to detect QT4 which is hopefully portable enough
* If no QT4, QT3 will by tried instead
* Classes renamed using qt3to4
* If build using QT3 renamed to QT3 class names using defines
* ConfigInfoView::menu has to be renamed as QT4 moc strips struct from
struct menu and creates a name conflict
* QT2 support has been dropped
* The hidden options inserted in 39a4897c1b
are use in native API
Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
NetBSD lacks getopt_long_only() whereas getopt_long() works just fine.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find confusingly indented code in or after an if. An if branch should
be indented. The code following an if should not be indented.
Sometimes, code after an if that is indented is actually intended to be
part of the if branch.
This has a high rate of false positives, because Coccinelle's column
calculation does not distinguish between spaces and tabs, so code that
is not visually aligned may be considered to be in the same column.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find duplicate field initializations. This has a high rate of false
positives due to #ifdefs, which Coccinelle is not aware of in a structure
initialization.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
alloc contains various semantic patches related
to the allocation APIs
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use kmemdup_user rather than duplicating its implementation
This is a little bit restricted to reduce false positives
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use kmemdup rather than duplicating its implementation
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use kstrdup rather than duplicating its implementation
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find a use after free. Values of variables may imply that some
execution paths are not possible, resulting in false positives.
Another source of false positives are macros such as
SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
list_for_each_entry uses its first argument to get from one element of
the list to the next, so it is usually not a good idea to reassign it.
The first rule finds such a reassignment and the second rule checks
that there is a path from the reassignment back to the top of the loop.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Many iterators have the property that the first argument is always bound
to a real list element, never NULL. False positives arise for some
iterators that do not have this property, or in cases when the loop
cursor is reassigned. The latter should only happen when the matched
code is on the way to a loop exit (break, goto, or return).
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
for_each_node iterators only exit normally when the loop cursor is
NULL, so there is no point to call of_node_put on the final value.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find missing unlocks. This semantic match considers the specific case
where the unlock is missing from an if branch, and there is a lock
before the if and an unlock after the if. False positives are due to
cases where the if branch represents a case where the function is
supposed to exit with the lock held, or where there is some preceding
function call that releases the lock.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find double locks. False positives may occur when some paths cannot
occur at execution, due to the values of variables, and when there is
an intervening function call that releases the lock.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Find functions that refer to GFP_KERNEL but are called with locks held.
The proposed change of converting the GFP_KERNEL is not necessarily the
correct one. It may be desired to unlock the lock, or to not call the
function under the lock in the first place.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
deref_null.cocci is moved to the 'null' directory
which contains other null related rules.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This semantic patch looks for kmalloc etc that are not followed by a
NULL check. It only gives a report in the case where there is some
error handling code later in the function, which may be helpful
in determining what the error handling code for the call to kmalloc etc
should be.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The various basic memory allocation functions don't return ERR_PTR
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This might be used by the user to specify extra arguments for the host
compiler.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The last commits
37ed19d5cc5003bab82d
have introduced new behaviour of sec2annotation() method. However, the
commentary inside the method was left as before. Let's fix it accordingly.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
setlocalversion: Ignote SCMs above the linux source tree
makefile: not need to regenerate kernel.release file when make kernelrelease
fixes for using make 3.82
kconfig: fix segfault when detecting recursive dependency
kconfig: fix savedefconfig with choice marked optional
Dan McGee <dpmcgee@gmail.com> writes:
> Note that when in git, you get the appended "+" sign. If
> LOCALVERSION_AUTO is set, you will get something like
> "eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still
> returns "eee"). It doesn't matter whether the working tree is dirty or
> clean.
>
> Is there a way to disable this? I'm building from a clean tarball that
> just happens to be unpacked inside a git repository. One would think
> setting LOCALVERSION_AUTO to false would do it, but no such luck...
Fix this by checking if the kernel source tree is the root of the git or
hg repository. No fix for svn: If the kernel source is not tracked in
the svn repository, it works as expected, otherwise determining the
'repository root' is not really a defined task.
Reported-and-tested-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
It doesn't like pattern and explicit rules to be on the same line,
and it seems to be more picky when matching file (or really directory)
names with different numbers of trailing slashes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Andrew Benton <b3nton@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
On BSD systems, `check-lxdialog' would select -lcurses as the default
curses library which would conflict with -lncurses at runtime: curses'
compatible symbols are getting handled by the system's curses library while the
ncurses-specific symbols are getting handled by the ports' ncurses.
This fixes `nconf' segmentation fault on these systems.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This fixes:
% gmake LKC_GENPARSER=1 menuconfig
[...]
scripts/kconfig/confdata.c:739: error: 'errno' undeclared (first use in this function)
scripts/kconfig/confdata.c:739: error: (Each undeclared identifier is reported only once
scripts/kconfig/confdata.c:739: error: for each function it appears in.)
scripts/kconfig/confdata.c:739: error: 'ENOENT' undeclared (first use in this function)
triggered on NetBSD.
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Remove the old hotkeys feature, and replace it by an interactive string
search.
From nconfig help:
Searching: pressing '/' triggers interactive search mode.
nconfig performs a case insensitive search for the string
in the menu prompts (no regex support).
Pressing the up/down keys highlights the previous/next
matching item. Backspace removes one character from the
match string. Pressing either '/' again or ESC exits
search mode. All other keys behave normally.
Miscellaneous other changes (including Rundy's and Justin's input).
Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Following sample Kconfig generated a segfault:
config FOO
bool
select PERF_EVENTS if HAVE_HW_BREAKPOINT
config PERF_EVENTS
bool
config HAVE_HW_BREAKPOINT
bool
depends on PERF_EVENTS
Fix by reverting back to a valid property if there was no
property on the stack of symbols.
The above pattern were seen in sh Kconfig.
A fix for the Kconfig file has been sent to the sh folks.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
savedefconfig failed to save the correct minimal config
when it encountered a choice marked optional.
Consider following minimal configuration:
$cat Kconfig
choice
prompt "choice"
optional
config A
bool "a"
config B
bool "b"
endchoice
$cat .config | grep -v ^#
CONFIG_A=y
$conf --savedefconfig=defconfig Kconfig
would before this fix result in an empty file, because
kconfig would assume that CONFIG_A=y is a default value.
But because the choice is optional the default is that
both A and B are =n.
Fix so we handle optional choices correct.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
setlocalversion: fix version for untaged nontip mercurial revs
Fix CONFIG_CROSS_COMPILE issue in .config
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kconfig: Fix warning: ignoring return value of 'fgets'
kconfig: Fix warning: ignoring return value of 'fwrite'
nconfig: Fix segfault when menu is empty
kconfig: fix tristate choice with minimal config
kconfig: fix savedefconfig for tristate choices
The manpage for cut says it will return all lines without the delimiter
unless -s is specified.
When I backed up my mecurial tree to generate modules, I found that the
scm part of localversion was turning up blank.
Signed-off-by: Milton Miller <miltonm@bga.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: "Michał Górny" <gentoo@mgorny.alt.pl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This fix facilitates fgets() either it returns on success or on error or
when end of file occurs.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This fix facilitates fwrite() in both confdata.c and expr.c, either it
succeeds in writing, or an error occurs, or the end of file is reached.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
nconf crush with segfault if press right arrow in empty menu.
Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits)
param: don't deref arg in __same_type() checks
param: update drivers/acpi/debug.c to new scheme
param: use module_param in drivers/message/fusion/mptbase.c
ide: use module_param_named rather than module_param_call
param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme
param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes.
param: lock myri10ge_fw_name against sysfs changes.
param: simple locking for sysfs-writable charp parameters
param: remove unnecessary writable charp
param: add kerneldoc to moduleparam.h
param: locking for kernel parameters
param: make param sections const.
param: use free hook for charp (fix leak of charp parameters)
param: add a free hook to kernel_param_ops.
param: silence .init.text references from param ops
Add param ops struct for hvc_iucv driver.
nfs: update for module_param_named API change
AppArmor: update for module_param_named API change
param: use ops in struct kernel_param, rather than get and set fns directly
param: move the EXPORT_SYMBOL to after the definitions.
...
Permit .GCC-command-line sections in modules. Otherwise modpost says things
like:
WARNING: drivers/mtd/chips/map_ram.o (.GCC-command-line): 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: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The mcount call on Blackfin systems includes some stack manipulation
around the actual call site, so extend the build time perl script to
support this. This way we can avoid doing the calculation at runtime.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
LKML-Reference: <1281079584-21205-1-git-send-email-vapier@gentoo.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
If a minimal config did not specify the value
of all choice values, the resulting configuration
could have wrong values.
Consider following example:
config M
def_bool y
option modules
choice
prompt "choice list"
config A
tristate "a"
config B
tristate "b"
endchoice
With a defconfig like this:
CONFIG_M=y
CONFIG_A=y
The resulting configuration would have
CONFIG_A=m
which was unexpected.
The problem was not not all choice values were set and thus
kconfig calculated a wrong value.
The fix is to set all choice values when we
read a defconfig files.
conf_set_all_new_symbols() is refactored such that
random choice values are now handled by a dedicated function.
And new choice values are set by set_all_choice_values().
This was not the minimal fix, but the fix that resulted
in the most readable code.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Arve Hjønnevåg <arve@android.com>
Tested-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
savedefconfig failed to save choice symbols equal to 'y'
for tristate choices.
This resulted in this value being lost.
In particular is fixes an issue where
make ARCH=avr32 atngw100_defconfig
make ARCH=avr32 savedefconfig
cp defconfig arch/avr32/configs/atngw100_defconfig
make ARCH=avr32 atngw100_defconfig
diff -u .config .config.old
failed to produce an identical .config.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Fix mtd/nand_base.c kernel-doc warnings and typos.
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'invert'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:930): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'mtd'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'ofs'
Warning(drivers/mtd/nand/nand_base.c:987): No description found for parameter 'len'
Warning(drivers/mtd/nand/nand_base.c:2087): No description found for parameter 'len'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ideally, we'd check that it was only the "set" function which was __init,
and that the permissions were r/o. But that's a little hard.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
These are caused by checkpatch incorrectly parsing its internal
representation of a statement block for struct's (or anything else that is
a statement block encapsulated in {}'s that also ends with a ';'). Fix
this by properly parsing a statement block.
An example:
+struct dummy_type dummy = {
+ .foo = "baz",
+};
+EXPORT_SYMBOL_GPL(dummy);
+
+static int dummy_func(void)
+{
+ return -EDUMMYCODE;
+}
+EXPORT_SYMBOL_GPL(dummy_func);
WARNING: EXPORT_SYMBOL(foo); should immediately \
follow its function/variable
#19: FILE: dummy.c:4:
+EXPORT_SYMBOL_GPL(dummy);
The above warning is issued when it should not be.
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
As explained in Documentation/timers/timers-howto.txt, msleep's of < 20ms
may sleep for as long as 20ms. Caller's of msleep(1) or msleep(2), etc
are likely not to expect this quirky behavior - warn them.
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When possible, sleeping is (usually) better than delaying; however, don't
bother callers of udelay < 10us, as those cases are generally not worth
the switch to usleep
[akpm@linux-foundation.org: fix mismatched parentheses]
Signed-off-by: Patrick Pannuto <ppannuto@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add new logging functions netdev_<level> and netif_<level>.
Don't complain if the only thing on a line is a quoted string.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make error message say 'ERROR: do not initialise globals to 0 or NULL'
rather than 'ERROR: do not initialise externals to 0 or NULL'. Makes more
sense in the context since there is an extern keyword in C and that is a
global declaration within the scope of the current file.
Signed-off-by: Joe Eloff <kagen101@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I've got a false positive when spaces are present at the beginning of a
line.
So I add this check, obviously excluding to check the lines in the middle of
comments.
For instance this code passes the checkpatch test:
+struct davinci_mcbsp_data {
+ unsigned int fmt;
+ int clk_div;
+};
+
+static struct davinci_mcbsp_data mcbsp_data;
Where, before the string "int clk_div", I have 4 spaces (\040
ascii character).
With v2.6.34 scripts/checkpatch.pl script I get:
scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
total: 0 errors, 0 warnings, 201 lines checked
0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch has no obvious style
problems and is ready for submission.
That is not correct. Instead with the proposed patch I get:
scripts/checkpatch.pl 0001-ASoC-DaVinci-Added-support-for-stereo-I2S.patch
WARNING: please, no space for starting a line,
excluding comments
#63: FILE: sound/soc/davinci/davinci-i2s.c:165:
+ int clk_div;$
WARNING: please, no space for starting a line,
excluding comments
#95: FILE: sound/soc/davinci/davinci-i2s.c:406:
+ return 0;$
total: 0 errors, 2 warnings, 201 lines checked
That is correct.
Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change the check suggesting replacement of asm-includes with
linux-includes. Exceptions to this rule are easier to extend now. Add
memory.h because ARM has a custom one.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
sec2annotation returns malloc'ed buffer directly to printf as an argument.
Free this buffer after printing.
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Cc: Trevor Keith <tsrk@tsrk.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: check kmalloc() result
arch/tile: catch up on various minor cleanups.
arch/tile: avoid erroneous error return for PTRACE_POKEUSR.
tile: set ARCH_KMALLOC_MINALIGN
tile: remove homegrown L1_CACHE_ALIGN macro
arch/tile: Miscellaneous cleanup changes.
arch/tile: Split the icache flush code off to a generic <arch> header.
arch/tile: Fix bug in support for atomic64_xx() ops.
arch/tile: Shrink the tile-opcode files considerably.
arch/tile: Add driver to enable access to the user dynamic network.
arch/tile: Enable more sophisticated IRQ model for 32-bit chips.
Move list types from <linux/list.h> to <linux/types.h>.
Add wait4() back to the set of <asm-generic/unistd.h> syscalls.
Revert adding some arch-specific signal syscalls to <linux/syscalls.h>.
arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). Feedback from fujita.tomonori@lab.ntt.co.jp.
arch/tile: core support for Tilera 32-bit chips.
Fix up the "generic" unistd.h ABI to be more useful.
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
tracing/kprobes: unregister_trace_probe needs to be called under mutex
perf: expose event__process function
perf events: Fix mmap offset determination
perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
perf, powerpc: Convert the FSL driver to use local64_t
perf tools: Don't keep unreferenced maps when unmaps are detected
perf session: Invalidate last_match when removing threads from rb_tree
perf session: Free the ref_reloc_sym memory at the right place
x86,mmiotrace: Add support for tracing STOS instruction
perf, sched migration: Librarize task states and event headers helpers
perf, sched migration: Librarize the GUI class
perf, sched migration: Make the GUI class client agnostic
perf, sched migration: Make it vertically scrollable
perf, sched migration: Parameterize cpu height and spacing
perf, sched migration: Fix key bindings
perf, sched migration: Ignore unhandled task states
perf, sched migration: Handle ignored migrate out events
perf: New migration tool overview
tracing: Drop cpparg() macro
perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
...
Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c
Linus wrote:
This seems to make "make oldconfig" a _lot_ more verbose than it
used to be. In a very annoying way.
I just did a quick git bisect. It's introduced by commit 4062f1a4c0
("kconfig: use long options in conf") by Sam Ravnborg. Apparently that
thing is totally buggy, and doesn't just change the option names, but
actively breaks them.
The old behaviour (from years ago) were reintroduced by accident. Fix
this so we are back to the version that are silent if there is nothing
to ask about.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
scripts/dtc: Fix a resource leak
Documentation: fix ubuntu distro name
MAINTAINERS: Update kbuild git URLs
Add support for the C variable in the coccicheck script
Add scripts/coccinelle/deref_null.cocci
Add scripts/coccinelle/err_cast.cocci
Add scripts/coccinelle/resource_size.cocci
Add scripts/coccinelle/alloc/kzalloc-simple.cocci
Add scripts/coccinelle/alloc/drop_kmalloc_cast.cocci
Add Documentation/coccinelle.txt
Add a target to use the Coccinelle checker
scripts: decodecode: remove bashisms
Makefile: clarify a comment
checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters
scripts: add nconf into gitignore file
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: Change section of generated debian packages to kernel
kbuild: Mark that the packages generated conform to Standards-Version 3.8.4
kbuild: Add homepage field to debian/control file
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (26 commits)
kconfig: add savedefconfig
kconfig: code refactoring in confdata.c
kconfig: refactor code in symbol.c
kconfig: add alldefconfig
kconfig: print more info when we see a recursive dependency
kconfig: save location of config symbols
kconfig: change nonint_oldconfig to listnewconfig
kconfig: rename loose_nonint_oldconfig => oldnoconfig
kconfig: use long options in conf
kconfig: fix MODULES-related bug in case of no .config
kconfig: make randconfig fair for booleans
kconfig: Don't write invisible choice values
kbuild: Warn on selecting symbols with unmet direct dependencies
scripts:conf.c Fix warning: variable 'type' set but not used
menuconfig: truncate list items
menuconfig: fix to center checklist correctly in a corner case
xconfig: add support to show hidden options which have prompts
xconfig: remove unused function
xconfig: clean up
gconfig: fix null pointer warning
...
This patch makes modpost able to process object files with more than
64k sections. Needed for huge kernel builds (allyesconfig, for example)
with -ffunction-sections. 64k sections handling is covered, for example,
by this document:
"IA-64 gABI Proposal 74: Section Indexes"
http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
It is now possible to assign options to AS and CC
on the command line - which is only used for built-in code.
{A,C}FLAGS_KERNEL was used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC without overriding
the original value.
Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
that is used by arch specific files and free up
{A,C}FLAGS_KERNEL so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.
{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.
Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.
All arch Makefiles that used the old variables has been updated.
Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.
Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
savedefconfig will save a minimal config to a file
named "defconfig".
The config symbols are saved in the same order as
they appear in the menu structure so it should
be possible to map them to the relevant menus
if desired.
The implementation was tested against several minimal
configs for arm which was created using brute-force.
There was one regression related to default numbers
which had their valid range further limited by another symbol.
Sample:
config FOO
int "foo"
default 4
config BAR
int "bar"
range 0 FOO
If FOO is set to 3 then BAR cannot take a value higher than 3.
But the current implementation will set BAR equal to 4.
This is seldomly used and the final configuration is OK,
and the fix was non-trivial.
So it was documented in the code and left as is.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add a a few local functions to avoid some code duplication
No functional changes.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Move logic to determine default for a choice to
a separate function.
No functional changes.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
alldefconfig create a configuration with all values set
to their default value (form the Kconfig files).
This may be useful when we try to use more sensible default
values and may also be used in combination with
the minimal defconfigs.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Consider following kconfig file:
config TEST1
bool "test 1"
depends on TEST2
config TEST2
bool "test 2"
depends on TEST1
Previously kconfig would report:
foo:6:error: found recursive dependency: TEST2 -> TEST1 -> TEST2
With the following patch kconfig reports:
foo:5:error: recursive dependency detected!
foo:5: symbol TEST2 depends on TEST1
foo:1: symbol TEST1 depends on TEST2
Note that we now report where the offending symbols are defined.
This can be a great help for complex situations involving
several files.
Patch is originally from Roman Zippel with a few adjustments by Sam.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
When we add a new config symbol save the file/line
so we later can refer to their location.
The information is saved as a property to a config symbol
because we may have multiple definitions of the same symbol.
This has the side-effect that a symbol always has
at least one property.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Rename to a name that better match the other kconfig targets.
listnewconfig shall read as:
- list new options compared to current configuration
New options are now written to stdout so one can redirect the output.
Do not exit with an error code if there is new options.
These are feature changes compared to the original
nonint_oldconfig - but as this feature has not yet been in a
released kernel it should not matter.
It is still possible to do:
make listnewconfig
lookup new config options in Kconfig*
edit .config
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Aristeu Rozanski <aris@redhat.com>
Acked-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Rename target to something that fall more in line
with the other kconfig targets.
oldnoconfig shall read as:
- read the old configuration and set all new options to no
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The list of options supported by conf is growing
and their abbreviation did not resemble anything usefull.
So drop the single letter options in favour of long options.
The long options are named equal to what we know from
the make target.
The internal implmentation was changed to match this,
resulting in much more readable code.
Support for short options is dropped - no one is supposed
to call this program direct anyway.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
There seems to be a kconfig bug due to MODULES not always being
evaluated if no .config is found. Take the following Kconfig as an
example:
config MODULES
def_bool y
config FOO
def_tristate m
With no .config, the following configuration is generated:
CONFIG_MODULES=y
CONFIG_FOO=y
With an empty .config, the following:
CONFIG_MODULES=y
CONFIG_FOO=m
Tristate choice statements can also exhibit the problem, due to having an
implicit rev_dep (select) containing "m".
The problem is that MODULES is never evaluted in conf_read_simple() unless
there's a .config. The following patch fixes this.
Signed-off-by: Ulf Magnusson <ulfalizer.lkml@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
nconfig segfaults when help text contains the character '%'. For a quick
example, navigate to the kernel compression options and get the help for
bzip2. Doing so triggers a call to mvwprintw() with a string containing
'%' and no extra arguments to fill in the specifier's value. Fix this
case by printing the literal string retrieved from the kconfig.
#0 0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
#1 0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
#2 0x00002b52b623991b in _nc_printf_string () from
/lib/libncursesw.so.5
#3 0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
#4 0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
#5 0x00000000004151d8 in fill_window (win=0x21b64c0,
text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
speed is intermediate.\nDecompression speed is slowest among the
three. The kernel\nsize is about 10% smaller with bzip2, in
comparison to gzip.\nBzip2 us"...)
at scripts/kconfig/nconf.gui.c:229
#6 0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
title=0x157fa30 "Bzip2",
text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
ratio and speed is intermediate.\nDecompression speed is
slowest among the three. The kernel\nsize is about 10%
smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
at scripts/kconfig/nconf.gui.c:535
#7 0x00000000004055b2 in show_help (menu=0x157f9d0)
at scripts/kconfig/nconf.c:1257
#8 0x0000000000405897 in conf_choice (menu=0x157f130)
at scripts/kconfig/nconf.c:1321
#9 0x0000000000405326 in conf (menu=0x157d130) at
scripts/kconfig/nconf.c:1208
#10 0x00000000004052e8 in conf (menu=0xb434a0) at
scripts/kconfig/nconf.c:1203
#11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)
Cc: Michal Marek <mmarek@suse.cz>
Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
I found this issue in a locally patched 2.6.32.x, current kernels have
moved the offending code to an __init function which is skipped by
recordmcount.pl, so the bug is not currently being exercised.
However, I think the patch is still a good idea, to avoid future
problems if _mcount were to ever have its address taken in normal
code.
This is what I originally saw:
Although arch/mips/kernel/ftrace.c is built without -pg, and thus
contains no calls to _mcount, it does use the address of _mcount
in ftrace_make_nop(). This was causing relocations to be emitted
for _mcount which recordmcount.pl erronously took to be _mcount
call sites. The result was that the text of ftrace_make_nop()
would be patched with garbage leading to a system crash.
In non-module code, all _mcount call sites will have R_MIPS_26
relocations, so we restrict $mcount_regex to only match on these.
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
LKML-Reference: <1278712325-12050-1-git-send-email-ddaney@caviumnetworks.com>
Cc: Li Hong <lihong.hi@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
make rpm was broken by commit 0915512:
make clean
set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl
/bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only >
/usr/src/iwlwifi-2.6/.scmversion
cat: .scmversion: input file is output file
make[1]: *** [rpm] Error 1
Reported-and-tested-by: "Zheng, Jiajia" <jiajia.zheng@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The 'source' builtin is a bash alias to the '.' (dot) builtin. While the
former is supported only by bash, the latter is specified in POSIX and
works fine with all POSIX-compliant shells I am aware of.
The '$_' special parameter is specific to bash. It is partially
supported in dash too but it always evaluates to the current script path
(which causes the script to enter a loop recursively re-executing
itself). This is why I have replaced the two occurences of '$_' with the
explicit parameter.
The 'local' builtin is another example of bash-specific code. Although
it is supported by all POSIX-compliant shells I am aware of, it is not
part of POSIX specification and thus the code should not rely on it
assigning a specific value to the local variable. Moreover, the 'posh'
shell has a limited version of 'local' builtin not supporting direct
variable assignments. Thus, I have broken one of the 'local'
declarations down into a (non-POSIX) 'local' declaration and a plain
(POSIX-compliant) variable assignment.
Signed-off-by: Michał Górny <gentoo@mgorny.alt.pl>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This makes it so "make oldconfig" really prompts for any choice where
options that previously weren't visible just became so. Previously one
would have to remember to go over all choice values and check whether
some that previously couldn't be selected now can be.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Gcc 4.5 is now generating out of line register save and restore
in the function prefix and postfix when we use -Os.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
The "select" statement in Kconfig files allows the enabling of options
even if they have unmet direct dependencies (i.e. "depends on" expands
to "no"). Currently, the "depends on" clauses are used in calculating
the visibility but they do not affect the reverse dependencies in any
way.
The patch introduces additional tracking of the "depends on" statements
and prints a warning on selecting an option if its direct dependencies
are not met.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
during a check of the current git head of the linux kernel with the
static code analysis tool cppcheck
(http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
the tool discovered a resource leak in linux-2.6/scripts/dtc/fstree.c.
Please refer the attached patch, that fixes the issue.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15363
Signed-off-by: Martin Ettl <ettl.martin@gmx.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This patch makes it possible to use the Coccinelle checker with the C
variable of the build system. To check only newly edited code, the
following command may be used:
'make C={1,2} CHECK="scripts/coccicheck"'
This runs every semantic patch in scripts/coccinelle by default. The
COCCI variable may additionally be used to only apply a single
semantic patch.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The initial pass at the generic ABI assumed that wait4() could be
easily expressed using waitid(). Although it's true that wait4()
can be built on waitid(), it's awkward enough that it makes more
sense to continue to include wait4 in the generic syscall ABI.
Since there is already a deprecated wait4 in the ABI, this change
converts that wait4 into old_wait, and puts wait4 in the next
available slot for new supported syscalls, after the platform-specific
syscalls at number 260.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Now that we run scripts/setlocalversion during every build, it makes
sense to move all the localversion logic there. This cleans up the
toplevel Makefile and also makes sure that the script is called only
once in 'make prepare' (previously, it would be called every time due to
a variable expansion in an ifneq statement). No user-visible change is
intended, unless one runs the setlocalversion script directly.
Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Alan <alan@clueserver.org> writes:
> program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
> Module.symvers -S vmlinux.o
>
> Program received signal SIGSEGV, Segmentation fault.
It just hit me.
It's the offset calculation in reloc_location() which overflows:
return (void *)elf->hdr + sechdrs[section].sh_offset +
(r->r_offset - sechdrs[section].sh_addr);
E.g. for the first rodata r entry:
r->r_offset < sechdrs[section].sh_addr
and the expression in the parenthesis produces 0xFFFFFFE0 or something
equally wise.
Reported-by: Alan <alan@clueserver.org>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Tested-by: Alan <alan@clueserver.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Not sure if this is correct or not, but with
make menuconfig
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'conf_sym':
scripts/kconfig/conf.c:159:6: warning: variable 'type' set but not used
scripts/kconfig/conf.c: In function 'conf_choice':
scripts/kconfig/conf.c:231:6: warning: variable 'type' set but not used
HOSTLD scripts/kconfig/mconf
I get this using gcc 4.6.0 the below change fixes this form me.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add a Coccinelle file to identify the dereferences of NULL variables
This semantic patch identifies when a variable is known to be NULL
after a test, but it is still dereferenced later.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add a Coccinelle file to use the ERR_CAST function
Before the release 2.6.25, one had to use ERR_PTR(PTR_ERR(...)) to
convert the pointer type of an error. Since then, the function
ERR_CAST has been available for that purpose.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This semantic patch replaces explicit computations
of resource size by a call to resource_size.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This semantic patch replaces a pair of calls to kmalloc and memset
by a single call to kzalloc.
It only looks for simple cases to avoid false positives.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The purpose of this semantic patch is to remove
useless casts, as mentioned in the Linux documentation.
See Chapter 14 in Documentation/CodingStyle for more information.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
A 'coccicheck' target is added. It can be called with four different
modes. Each one generates a different kind of output, i.e. context,
patch, org, report, according to the corresponding mode to be
activated.
The new target calls the 'coccicheck' front-end in the 'scripts'
directory with the MODE argument. Every SmPL file in the
subdirectories of 'scripts/coccinelle' is then given to the front-end
and applied to the entire source tree.
The four modes behave as follows:
'report' generates a list in the following format:
file:line:column-column: message
'patch' proposes a fix, when possible.
'context' highlights lines of interest and their context in a
diff-like style. Lines of interest are indicated with '-'.
'org' generates a report in the Org mode format of Emacs.
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Useful for when people want to try some version of the perf tools and don't
wants to download the kernel tarball.
Here is a session using this new target:
[root@emilia linux-2.6-tip]# make help | grep -i perf
perf-tar-src-pkg - Build perf-2.6.35-rc1.tar source tarball
perf-targz-src-pkg - Build perf-2.6.35-rc1.tar.gz source tarball
perf-tarbz2-src-pkg - Build perf-2.6.35-rc1.tar.bz2 source tarball
[root@emilia linux-2.6-tip]# make perf-tarbz2-src-pkg
TAR
[root@emilia linux-2.6-tip]# ls -la perf-2.6.35-rc1.tar.bz2
-rw-r--r-- 1 root root 295731 May 31 11:18 perf-2.6.35-rc1.tar.bz2
[root@emilia linux-2.6-tip]# tar xf perf-2.6.35-rc1.tar.bz2
[root@emilia linux-2.6-tip]# cd perf-2.6.35-rc1
[root@emilia perf-2.6.35-rc1]# ls
arch HEAD include lib tools
[root@emilia perf-2.6.35-rc1]# cd tools/perf
[root@emilia perf]# make -j9 2>&1 | tail
CC arch/x86/util/dwarf-regs.o
CC util/probe-finder.o
CC util/newt.o
CC util/scripting-engines/trace-event-perl.o
CC scripts/perl/Perf-Trace-Util/Context.o
CC perf.o
CC builtin-help.o
AR libperf.a
LINK perf
rm .perf.dev.null
[root@emilia perf]# ./perf record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.262 MB perf.data (~11457 samples) ]
[root@emilia perf]# ./perf report | head -12
# Events: 6K cycles
#
# Overhead Command Shared Object Symbol
# ........ ............... .................. ......
#
4.73% perf [kernel.kallsyms] [k] format_decode
4.49% perf libc-2.12.so [.] _IO_file_underflow_internal
4.38% init [kernel.kallsyms] [k] mwait_idle
3.29% perf [kernel.kallsyms] [k] vsnprintf
2.38% init [kernel.kallsyms] [k] sched_clock_local
2.35% init [kernel.kallsyms] [k] apic_timer_interrupt
1.86% sirq-timer/5 [kernel.kallsyms] [k] find_busiest_group
[root@emilia perf]#
Acked-by: Michal Marek <mmarek@suse.cz>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20100528185357.GA28009@ghostprotocols.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
commit 37a8d9f67f tried to combine some
duplicate code and accidentally broke how KBUILD_SYMTYPES worked
This fixes the code to match the original intention by the author who
originally added the code I believe.
The fixes include:
- removing extra whitespaces in the if-statements
- moving the if-statement from around the -r to the -T
- adding a second arg to cmd_gensymtypes to simplify the options passed
to genksyms.
Tested by instrumenting genksyms and seeing what options were passed in
during a make, KBUILD_SYMTYPES make, and when a foo.symref was created.
Everything compiled and looked ok.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Remove bashisms to make scripts/decodecode work with other shells.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Truncate list items to fit in a single line, otherwise those items
which have long prompts will cover some other items.
This follows the behavior of menubox.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Run:
make ARCH=arm menuconfig
And then select "System Type" -> "ARM system type". The kconfig
"choice" menu at this point looks empty.
It's because config ARCH_S3C2410 has a long prompt:
config ARCH_S3C2410
bool "Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443, S3C2450"
...
menuconfig centers the checklist according to this prompt without
considering the width of the list, and then things get wrong.
Reported-by: Nobin Mathew <nobin.mathew@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
To follow the way that Official Debian kernel packages are made, put the
generated packages in the right section, the kernel section. This also
avoids polluting the admin section.
Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The packages generated by the builddeb script conform to the Debian
Policy version 3.8.4. Make this explicit in the generated packages.
Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This helps when the user sees information of the packages on package
managers like aptitude.
Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Quite a few Kconfig symbols contain lowercase letters. The current
checkkconfigsymbols.sh code only contains A-Z in the regexp it uses to
find config symbols in source code, so it comes up with the wrong symbol
to look for in Kconfig files and then generates false positives when it
doesn't find that wrong symbol. For example checking drivers/net
generates a false positive for MAC89 because the the actual config
option is MAC89x0.
Fix this by also adding a-z to the regexp.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/kconfig/nconf is generated by 'make nconfig',
add it into .gitignore.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Making gconfig fails on fedora 13 as the linker cannot resolve dlsym.
Adding libdl to the link command fixes this.
make shows this error :-
/usr/bin/ld: scripts/kconfig/kconfig_load.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
tested on x86_64 fedora 13.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This feature has been supported in menuconfig and gconfig, so
here add it to xconfig.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
@ok is a pointer to a bool var, so we should check the value of
*ok. But actually we don't need to check it, so just remove the
if statement.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
In gconfig if you enable "Show all options", you'll see some "(null)"
config options, and clicking those options triggers a warning:
(gconf:9368): Gtk-CRITICAL **: gtk_text_buffer_insert_with_tags: assertion `text != NULL' failed
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Suggested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Those configs are not new:
$ cat .config
...
CONFIG_NAMESPACES=y
...
CONFIG_BLOCK=y
...
But are tagged as NEW:
$ yes "" | make config > myconf
$ cat myconf | grep '(NEW)'
Namespaces support (NAMESPACES) [Y/?] (NEW) y
...
Enable the block layer (BLOCK) [Y/?] (NEW) y
...
You can also notice this bug when using gconfig/xconfig.
It's because the SYMBOL_DEF_USER bit of an invisible symbol is cleared
when the config file is read:
int conf_read(const char *name)
{
...
for_all_symbols(i, sym) {
if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
/* Reset values of generates values, so they'll appear
* as new, if they should become visible, but that
* doesn't quite work if the Kconfig and the saved
* configuration disagree.
*/
if (sym->visible == no && !conf_unsaved)
sym->flags &= ~SYMBOL_DEF_USER;
...
}
But a menu item which represents an invisible symbol is still
visible, if it's sub-menu is visible, so its SYMBOL_DEF_USER
bit should be set to indicate it's not NEW.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Without this patch, one has to refer to the Kconfig file to find
out the range of an integer/hex symbol.
│ Symbol: NR_CPUS [=4]
│ Type : integer
│ Range : [2 8]
│ Prompt: Maximum number of CPUs
│ Defined at arch/x86/Kconfig:761
│ Depends on: SMP [=y] && !MAXSMP [=n]
│ Location:
│ -> Processor type and features
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Randy suggested to print out the symbol type in gconfig.
Note this change does more than Randy's suggestion, that it also
affects menuconfig and "make config".
│ Symbol: BLOCK [=y]
│ Type : boolean
│ Prompt: Enable the block layer
│ Defined at block/Kconfig:4
│ Depends on: EMBEDDED [=n]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This patch has been around for a long time in Fedora and Red Hat Enterprise
Linux kernels and it may be useful for others. The nonint_oldconfig target
will fail and print the unset config options while loose_nonint_oldconfig will
simply let the config option unset. They're useful in distro kernel packages
where the config files are built using a combination of smaller config files.
Arjan van de Ven wrote the initial nonint_config and Roland McGrath added the
loose_nonint_oldconfig.
Signed-off-by: Arjan van de Ven <arjan@redhat.com> [defunct email]
Whatevered-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
[mmarek: whitespace fixes]
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
kbuild: Revert part of e8d400a to resolve a conflict
kbuild: Fix checking of scm-identifier variable
gconfig: add support to show hidden options that have prompts
menuconfig: add support to show hidden options which have prompts
gconfig: remove show_debug option
gconfig: remove dbg_print_ptype() and dbg_print_stype()
kconfig: fix zconfdump()
kconfig: some small fixes
add random binaries to .gitignore
kbuild: Include gen_initramfs_list.sh and the file list in the .d file
kconfig: recalc symbol value before showing search results
.gitignore: ignore *.lzo files
headerdep: perlcritic warning
scripts/Makefile.lib: Align the output of LZO
kbuild: Generate modules.builtin in make modules_install
Revert "kbuild: specify absolute paths for cscope"
kbuild: Do not unnecessarily regenerate modules.builtin
headers_install: use local file handles
headers_check: fix perl warnings
export_report: fix perl warnings
...
Finding the list of Makefiles in streamline-config should not report errors.
Also move the "chomp" to the @makefiles array instead of doing it in the
for loop. This is more efficient, and does not make it any less readable
by C programmers.
Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>
LKML-Reference: <201005262022.02928.toralf.foerster@gmx.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Proper perl requires that local variables should be declared with 'my',
otherwise this may produce errors.
Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>
LKML-Reference: <201005281025.00358.toralf.foerster@gmx.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Add the necessary parts to be enable the use of LZO-compressed initramfs
build into the kernel.
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: "H. Peter Anvin" <hpa@zytor.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>
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I've seen various new Kconfigs with rather unhelpful one liner
descriptions. Add a Kconfig warning for a minimum length of the Kconfig
help section.
Right now I arbitarily chose 4. The exact value can be debated.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen <ak@linux.intel.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>
This changes the default of the option --git-all-signature-types to be
disabled by default.
The effect being, that only certain (currently Signed-Off-By:, Acked-by:
and Reviewed-By:) tags are used to get adresses of potential maintainers.
Motivated is this change by the desire to not 'spam' people unnecessary: A
Tested-By or a Reported-By is not ment as a hint that those people want
to/are able to review patches to the code in question.
In a quest to find resilient statistics for this i came up with this:
I produced a list of all the tag-signers not already covered with a
signed-off/acked/reviewed tag somewhere in the last year of git history.
Those were 650 addresses of "assumed non-developers".
And to check if those "assumed non-developers" are professional
testers/reporters worth cc'ing, i then counted their total appearences
in the git log:
469 were mentioned only once.
123 were mentioned twice.
38 three times
8 four times
5 six times
5 five times
1 eight times
1 fourteen times
I believe this supports my thesis, that the ''non-maintainer-tags'' are
not actively useful for patch-review. (except probably the guy mentioned
fourteen times...)
But of course one could also find arguments to poke holes in this
statistics, for example does this statistic not include code-locality: A
tested-by on a patch that touches some specific piece of code can be more
worth than a signed-off in another part of the tree.
But... let's play it safe and let's err on the "safe" side meaning to not
spam those people when in doubt. We already have the signed-off's and
Maintainers file. So this should be ok. And if need be, the maintainers
can always forward the patch.
[i probably could make a diploma thesis out of this changelog :)]
Signed-off-by: Florian Mickler <florian@mickler.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Joe Perches <joe@perches.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Allow the use of a .get_maintainer.conf file to control the default
options applied when scripts/get_maintainer.pl is run.
.get_maintainer.conf can contain any valid command-line argument.
File contents are prepended to any additional command line arguments.
Multiple lines may be used, blank lines ignored, # is a comment.
Updated scripts/get_maintainer.pl version to 0.24
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When using --git to determine who to send a patch to, get_maintainers will
currently include all signatures. This can include signers that simply
report an issue or test a patch. Signers that use this tag are not
necessarily good candidates to review new patches.
This patch allows get_maintainers to optionally restrict output to only
signatures that use Signed-off-by:, Acked-by:, or Reviewed-by:.
Signed-off-by: is included because those are people who are responsible
for the code.
Acked-by: is questionable, but as signers that use this tag tend to be
active linux gatekeepers, false positives are tolerable.
Reviewed-by: is included because signers responsible for the code thought
that the review feedback for a changeset by that signer was valuable.
This patch has been modified from Florian's original submission to change
the supported signature types to the canonical forms and use slightly
different spacing. A couple of spacing issues were also corrected in the
original source. The command line argument was also renamed.
Original-patch-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Florian Mickler <florian@mickler.org>
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>
* 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
module: drop the lock while waiting for module to complete initialization.
MODULE_DEVICE_TABLE(isapnp, ...) does nothing
hisax_fcpcipnp: fix broken isapnp device table.
isapnp: move definitions to mod_devicetable.h so file2alias can reach them.
The conversion of device->sem to device->mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.
Add a checkpatch error so the usage is reserved for device->mutex.
[ tglx: checkpatch and compile fix for LOCKDEP=n ]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
qlcnic: adding co maintainer
ixgbe: add support for active DA cables
ixgbe: dcb, do not tag tc_prio_control frames
ixgbe: fix ixgbe_tx_is_paused logic
ixgbe: always enable vlan strip/insert when DCB is enabled
ixgbe: remove some redundant code in setting FCoE FIP filter
ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
ixgbe: fix header len when unsplit packet overflows to data buffer
ipv6: Never schedule DAD timer on dead address
ipv6: Use POSTDAD state
ipv6: Use state_lock to protect ifa state
ipv6: Replace inet6_ifaddr->dead with state
cxgb4: notify upper drivers if the device is already up when they load
cxgb4: keep interrupts available when the ports are brought down
cxgb4: fix initial addition of MAC address
cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
cnic: Convert cnic_local_flags to atomic ops.
can: Fix SJA1000 command register writes on SMP systems
bridge: fix build for CONFIG_SYSFS disabled
ARCNET: Limit com20020 PCI ID matches for SOHARD cards
...
Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).
Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
vlynq: make whole Kconfig-menu dependant on architecture
add descriptive comment for TIF_MEMDIE task flag declaration.
EEPROM: max6875: Header file cleanup
EEPROM: 93cx6: Header file cleanup
EEPROM: Header file cleanup
agp: use NULL instead of 0 when pointer is needed
rtc-v3020: make bitfield unsigned
PCI: make bitfield unsigned
jbd2: use NULL instead of 0 when pointer is needed
cciss: fix shadows sparse warning
doc: inode uses a mutex instead of a semaphore.
uml: i386: Avoid redefinition of NR_syscalls
fix "seperate" typos in comments
cocbalt_lcdfb: correct sections
doc: Change urls for sparse
Powerpc: wii: Fix typo in comment
i2o: cleanup some exit paths
Documentation/: it's -> its where appropriate
UML: Fix compiler warning due to missing task_struct declaration
UML: add kernel.h include to signal.c
...
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (61 commits)
KEYS: Return more accurate error codes
LSM: Add __init to fixup function.
TOMOYO: Add pathname grouping support.
ima: remove ACPI dependency
TPM: ACPI/PNP dependency removal
security/selinux/ss: Use kstrdup
TOMOYO: Use stack memory for pending entry.
Revert "ima: remove ACPI dependency"
Revert "TPM: ACPI/PNP dependency removal"
KEYS: Do preallocation for __key_link()
TOMOYO: Use mutex_lock_interruptible.
KEYS: Better handling of errors from construct_alloc_key()
KEYS: keyring_serialise_link_sem is only needed for keyring->keyring links
TOMOYO: Use GFP_NOFS rather than GFP_KERNEL.
ima: remove ACPI dependency
TPM: ACPI/PNP dependency removal
selinux: generalize disabling of execmem for plt-in-heap archs
LSM Audit: rename LSM_AUDIT_NO_AUDIT to LSM_AUDIT_DATA_NONE
CRED: Holding a spinlock does not imply the holding of RCU read lock
SMACK: Don't #include Ext2 headers
...
On Monday 23 November 2009 04:29:53 Rusty Russell wrote:
> On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote:
> > The problem is that
> > scripts/mod/file2alias.c simply ignores isapnp.
>
> AFAICT it always has, and noone has complained until now. Perhaps
> something was still reading /lib/modules/`uname -r`/modules.isapnpmap?
The patch below works fine (at least with Debian). It needs your first
patch that moves the definitions to mod_devicetable.h. Verified that
aliases for these modules are generated correctly:
drivers/media/radio/radio-sf16fmi.c
drivers/net/ne.c
drivers/net/3c515.c
drivers/net/smc-ultra.c
drivers/pcmcia/i82365.c
drivers/scsi/aha1542.c
drivers/scsi/aha152x.c
drivers/scsi/sym53c416.c
drivers/scsi/g_NCR5380.c
Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380)
cards - they now work automatically.
Generate pnp:d aliases for isapnp_device_tables. This allows udev to load
these modules automatically.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* 'core-hweight-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, hweight: Use a 32-bit popcnt for __arch_hweight32()
arch, hweight: Fix compilation errors
x86: Add optimized popcnt variants
bitops: Optimize hweight() by making use of compile-time evaluation
There's a button in gconfig to "Show all options", but I think
normally we are not interested in those configs which have no
prompt and thus can't be changed, so here I add a new button to
show hidden options which have prompts.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Usage:
Press <Z> to show all config symbols which have prompts.
Quote Tim Bird:
| I've been bitten by this numerous times. I most often
| use ftrace on ARM, but when I go back to x86, I almost
| always go through a sequence of searching for the
| function graph tracer in the menus, then realizing it's
| completely missing until I disable CC_OPTIMIZE_FOR_SIZE.
|
| Is there any way to have the menu item appear, but be
| unsettable unless the SIZE option is disabled? I'm
| not a Kconfig guru...
I myself found this useful too. For example, I need to test
ftrace/tracing and want to be sure all the tracing features are
enabled, so I enter the "Tracers" menu, and press <Z> to
see if there is any config hidden.
I also noticed gconfig and xconfig have a button "Show all options",
but that's a bit too much, and I think normally what we are not
interested in those configs which have no prompt thus can't be
changed by users.
Exmaple:
--- Tracers
-*- Kernel Function Tracer
- - Kernel Function Graph Tracer
[*] Interrupts-off Latency Tracer
- - Preemption-off Latency Tracer
[*] Sysprof Tracer
Here you can see 2 tracers are not selectable, and then can find
out how to make them selectable.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
zconfdump(), which is used for debugging, can't recognize P_SELECT,
P_RANGE and P_MENU (if associated with a symbol, aka "menuconfig"),
and output something like this:
config X86
boolean
default y
unknown prop 6!
unknown prop 6!
unknown prop 6!
...
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
- fix a typo in documentation
- fix a typo in a printk on error
- fix comments in dialog_inputbox()
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Add support for the hardware version of the Hamming weight function,
popcnt, present in CPUs which advertize it under CPUID, Function
0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
default lib/hweight.c sw versions.
A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
a 3x speedup on a F10h machine.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100318112015.GC11152@aftab>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
We don't use the normal hotplug mechanism because it doesn't work. It will
load the module some time after the device appears, but that's not good
enough for us -- we need the driver loaded _immediately_ because otherwise
the NIC driver may just abort and then the phy 'device' goes away.
[bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Commit 22dd5b0cba (fix perlcritic warnings)
broke the ability to handle STDIN because the three argument version of
open() cannot handle standard IO-streams (which is mentioned in
PerlBestPractices, too).
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Stephen Hemminger <shemminger@vyatta.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>
scripts/kernel-doc erroneously says:
Warning(include/linux/skbuff.h:410): Excess struct/union/enum/typedef member 'cb' description in 'sk_buff'
on this line in struct sk_buff:
char cb[48] __aligned(8);
due to treating the last field as the struct member name, so teach
kernel-doc to ignore __aligned(x) in structs.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Expand the dependency set used for the initrd to include the
CONFIG_INITRAMFS_SOURCE file and the generator script itself.
Otherwise changing the initramfs file list does not rebuild the CPIO.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
A symbol's value won't be recalc-ed until we save config file or
enter the menu where the symbol sits.
So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:
Symbol: FUNCTION_GRAPH_TRACER [=y]
Prompt: Kernel Function Graph Tracer
Defined at kernel/trace/Kconfig:140
Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
...
From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
but it still shows FUNCTION_GRAPH_TRACER=y.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Minor perlcritic warning:
headerdep.pl: "return" statement with explicit "undef" at line 84, column 2. See page 199 of PBP. (Severity: 5)
The rationale according to PBP is that an explicit return of undef
(contrary to most people's expectations) doesn't
always evaluate as false. It has to with the fact that perl return value
depends on context the function is called. If function is used in
list context, the appropriate return value for false is an empty list;
whereas in scalar context the return value for false is undefined.
By just using a "return" both cases are handled.
In the context of a trivial script this doesn't matter. But one script
may be cut-paste into later code (most people like me only know 50%
of perl), that is why perlcritic always complains
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
doc: fix typo in comment explaining rb_tree usage
Remove fs/ntfs/ChangeLog
doc: fix console doc typo
doc: cpuset: Update the cpuset flag file
Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
Remove drivers/parport/ChangeLog
Remove drivers/char/ChangeLog
doc: typo - Table 1-2 should refer to "status", not "statm"
tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
devres/irq: Fix devm_irq_match comment
Remove reference to kthread_create_on_cpu
tree-wide: Assorted spelling fixes
tree-wide: fix 'lenght' typo in comments and code
drm/kms: fix spelling in error message
doc: capitalization and other minor fixes in pnp doc
devres: typo fix s/dev/devm/
Remove redundant trailing semicolons from macros
fix typo "definetly" -> "definitely" in comment
tree-wide: s/widht/width/g typo in comments
...
Fix trivial conflict in Documentation/laptops/00-INDEX
scripts/kernel-doc mishandles a function that has a multi-line function
short description and no function parameters. The observed problem was
from drivers/scsi/scsi_netlink.c:
/**
* scsi_netlink_init - Called by SCSI subsystem to intialize
* the SCSI transport netlink interface
*
**/
kernel-doc treated the " * " line as a Description: section with only a
newline character in the Description contents. This caused
output_highlight() to complain: "output_highlight got called with no
args?", plus produce a perl call stack backtrace.
The fix is just to ignore Description sections if they only contain "\n".
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commit 7d3cc8b tried to keep bounds.h and asm-offsets.h during make
clean by filtering these out of $(clean-files), but they are listed in
$(targets) and $(always) and thus removed automatically. Introduce a new
$(no-clean-files) variable to really skip such files in Makefile.clean.
Signed-off-by: Michal Marek <mmarek@suse.cz>
The output of LZO is not aligned with the other output:
...
CC drivers/usb/mon/usbmon.mod.o
LZO arch/mips/boot/compressed/vmlinux.lzo
...
This patch fixes it.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This reverts commit eb8f844c0a. Ian
Campbell writes:
> I keep my kernel source tree on a more powerful build box where I run my
> builds etc (including "make cscope") but run my editor from my
> workstation with an NFS mount to the source. This worked fine for me
> using relative paths for cscope. Using absolute paths in cscope breaks
> this previously working setup because the root path is not the same on
> both systems. I guess this is similar to moving the source tree around.
>
> Without wanting to start a flamewar it really sounds to me like we are
> working around a vim (or cscope) bug here, emacs with cscope bindings
> works fine in this configuration.
Given that absolute paths can be forced by make O=. cscope, change the
default back to relative paths.
Ian Campbell <ijc@hellion.org.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Better practice to use 3 arg open and local file handles.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use local file handles, use three argument open.
Don't modify arguments in perl grep (use sed instead)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Turn on strict checking.
Simplify code by using "unless" statement.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Use local file handle not global.
Make loop and other variables local in scope.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hui Zhu <teawater@gmail.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Turn on strict checking.
Use three arguement open
Standard practice in perl is to use undef not zero for false
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Turn on strict checking.
Use local file handles.
Use three argument open.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Cleanup checkstack script:
* Turn on strict checking
* Fix resulting error message because the declaration syntax
was incorrect.
* Remove incorrect and misleading use of prototype
- prototype not required for this type of sort function
because $a and $b are being used in this contex
- if prototype was being used it should be for both arguments
* Use closure for sort function
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This patch creates the standard md5sums file for 'make deb-pkg' just
like the dh_md5sums debhelper script.
Signed-off-by: Jozsef Fejes <fejes@joco.name>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Based on Arjan's suggestion, extend the list of ops structures that should
be const.
Signed-off-by: Emese Revfy <re.emese@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Here is a small code snippet, which will be complained about by
checkpatch.pl:
#define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \
union { \
struct { \
unsigned int in; \
unsigned int out; \
}; \
char rectype[recsize]; \
ptrtype *ptr; \
const ptrtype *ptr_const; \
};
This construct is legal and safe, so checkpatch.pl should accept this. It
should be also true for struct defined in a macro.
Add the `struct' and `union' keywords to the exceptions list of the
checkpatch.pl script, to prevent error message "Macros with multiple
statements should be enclosed in a do - while loop". Otherwise it is not
possible to build a struct or union with a macro.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
checkpatch falsely complained about '__initconst' because it thought the
'const' needed a space before. Fix this by changing the list of
attributes:
- add '__initconst'
- force plain 'init' to contain a word-boundary at the end
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In case if the statement and the conditional are in one line, the line
appears in the report doubly.
And items of this check have no blank line before the next item.
This patch fixes these trivial problems, to improve readability of the
report.
[sample.c]
> if (cond1
> && cond2
> && cond3) func_foo();
>
> if (cond4) func_bar();
Before:
> ERROR: trailing statements should be on next line
> #1: FILE: sample.c:1:
> +if (cond1
> [...]
> + && cond3) func_foo();
> ERROR: trailing statements should be on next line
> #5: FILE: sample.c:5:
> +if (cond4) func_bar();
> +if (cond4) func_bar();
> total: 2 errors, 0 warnings, 5 lines checked
After:
> ERROR: trailing statements should be on next line
> #1: FILE: sample.c:1:
> +if (cond1
> [...]
> + && cond3) func_foo();
>
> ERROR: trailing statements should be on next line
> #5: FILE: sample.c:5:
> +if (cond4) func_bar();
>
> total: 2 errors, 0 warnings, 5 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.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>
sizeof(&foo) is frequently an error. Warn on its use.
Signed-off-by: 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>
If MAINTAINERS section entries are misformatted, it was possible to have
an infinite loop.
Correct the defect by always moving the index to the end of section + 1
Also, exit check for exclude as soon as possible.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Picky mail systems won't accept email addresses where recipient has period
in name; ie. David S. Miller <davemloft.net> will not work.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.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>
perlcritic is a standard checker for Perl Best Practices. This patch
fixes most of the warnings in the get_maintainer script. If kernel
programmers are going to have checkpatch they should write clean scripts
as well...
Bareword file handle opened at line 176, column 1. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 176, column 1. See page 207 of PBP. (Severity: 5)
Bareword file handle opened at line 207, column 5. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 207, column 5. See page 207 of PBP. (Severity: 5)
Bareword file handle opened at line 246, column 6. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 246, column 6. See page 207 of PBP. (Severity: 5)
Bareword file handle opened at line 258, column 2. See pages 202,204 of PBP. (Severity: 5)
Two-argument "open" used at line 258, column 2. See page 207 of PBP. (Severity: 5)
Expression form of "eval" at line 983, column 17. See page 161 of PBP. (Severity: 5)
Expression form of "eval" at line 985, column 17. See page 161 of PBP. (Severity: 5)
Subroutine prototypes used at line 1186, column 1. See page 194 of PBP. (Severity: 5)
Subroutine prototypes used at line 1206, column 1. See page 194 of PBP. (Severity: 5)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.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>
Doesn't need or accept '-' as a trailing option to read stdin. Doesn't
print usage() after bad options. Adds --usage as command line equivalent
of --help
Suggested-by: Borislav Petkov <petkovbb@googlemail.com>
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>
Add an imperfect option to search a source file for email addresses.
New option: --file-emails or --fe
email addresses in files are freeform text and are nearly impossible to
parse. Still, might as well try to do a somewhat acceptable job of
finding them. This code should find all addresses that are in the form
addr@domain.tld
The code assumes that up to 3 alphabetic words along with dashes, commas,
and periods that preceed the email address are a name.
If 3 words are found for the name, and one of the first two words are a
single letter and period, or just a single letter then the 3 words are use
as name otherwise the last 2 words are used.
Some variants that are shown correctly:
John Smith <jksmith@domain.org>
Random J. Developer <rjd@tld.com>
Random J. Developer (rjd@tld.com)
J. Random Developer rjd@tld.com
Variants that are shown nominally correctly:
Written by First Last (funny-addr@somecompany.com)
is shown as:
First Last <funny-addr@somecompany.com>
Variants that are shown incorrectly:
Some Really Long Name <srln@foo.bar>
MontaVista Software, Inc. <source@mvista.com>
are returned as:
Long Name <srln@foo.bar>
"Software, Inc" <source@mvista.com>
--roles and --rolestats show "(in file)" for matches.
For instance:
Without -file-emails:
$ ./scripts/get_maintainer.pl -f -nogit -roles net/core/netpoll.c
David S. Miller <davem@davemloft.net> (maintainer:NETWORKING [GENERAL])
linux-kernel@vger.kernel.org (open list)
With -fe:
$ ./scripts/get_maintainer.pl -f -fe -nogit -roles net/core/netpoll.c
David S. Miller <davem@davemloft.net> (maintainer:NETWORKING [GENERAL])
Matt Mackall <mpm@selenic.com> (in file)
Ingo Molnar <mingo@redhat.com> (in file)
linux-kernel@vger.kernel.org (open list)
netdev@vger.kernel.org (open list:NETWORKING [GENERAL])
The number of email addresses in the file in not limited. Neither is the
number of returned email addresses.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
make ALLSOURCE_ARCHS=all tags
- Document this in kbuild.txt
Without this change you have to type each arch separately.
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
ftrace: Add function names to dangling } in function graph tracer
tracing: Simplify memory recycle of trace_define_field
tracing: Remove unnecessary variable in print_graph_return
tracing: Fix typo of info text in trace_kprobe.c
tracing: Fix typo in prof_sysexit_enable()
tracing: Remove CONFIG_TRACE_POWER from kernel config
tracing: Fix ftrace_event_call alignment for use with gcc 4.5
ftrace: Remove memory barriers from NMI code when not needed
tracing/kprobes: Add short documentation for HAVE_REGS_AND_STACK_ACCESS_API
s390: Add pt_regs register and stack access API
tracing/kprobes: Make Kconfig dependencies generic
tracing: Unify arch_syscall_addr() implementations
tracing: Add notrace to TRACE_EVENT implementation functions
ftrace: Allow to remove a single function from function graph filter
tracing: Add correct/incorrect to sort keys for branch annotation output
tracing: Simplify test for function_graph tracing start point
tracing: Drop the tr check from the graph tracing path
tracing: Add stack dump to trace_printk if stacktrace option is set
tracing: Use appropriate perl constructs in recordmcount.pl
tracing: optimize recordmcount.pl for offsets-handling
...
I also found the -filelist option, but apparently the implementation
is broken, and it was broken from the very first git commit.
For the -filelist option I suggest the removal (I wasn't able to find
any users of it, moreover it's not even listed in the
usage() output, so presumably nobody knows about it).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The problem is that $. keeps track of the current record number (which
is line number by default). But if you pass it multiple files, it does
not wrap at the end of file, and therefore contains the *total* number
of processed lines.
I suppose we can fix line numbering by introducing a simple assignment
$. = 1
before processing every new file.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
kconfig: Simplify LSMOD= handling
kconfig: Add LSMOD=file to override the lsmod for localmodconfig
kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl
kconfig: Check for if conditions in Kconfig for localmodconfig
kconfig: Create include/generated for localmodconfig
$ make mrproper
$ make tags
GEN tags
find: `arch/x86_64/': No such file or directory
Caused by commit f81b1be (tags: include headers before source files)
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Currently looking up a structure definition in TAGS / tags takes one to
one of multiple "static struct X" definitions in arch sources, which makes
it for many structs practically impossible to get to the required header.
This patch changes the order of sources being tagged to first scan
architecture includes, then the top-level include/ directory, and only
then the rest. It also takes into account, that many architectures have
more than one include directory, i.e., not only arch/$ARCH/include, but
also arch/$ARCH/mach-X/include etc.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
[mmarek@suse.cz: fix 'var+=text' bashism]
Signed-off-by: Michal Marek <mmarek@suse.cz>
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1. Fix a little format issue.
2. Check the return of "Getopt::Long::GetOptions". Output usage and
exit if it get error.
3. Change $ARGV[$#ARGV] to $ARGV[0].
4. Change the code which get $modulefile from modinfo. Replace the
pipeline with `modinfo -F filename $module`.
4. Change usage from "Specify the module directory name" to "Specify the
module filename".
Signed-off-by: Hui Zhu <teawater@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
The markup_oops.pl have 3 troubles to support cross-compiler environment:
1. It use objdump directly.
2. It use modinfo to get the message of module.
3. It use hex function that cannot support 64-bit number in 32-bit arch.
This patch add 3 options to markup_oops.pl:
1. -c CROSS_COMPILE Specify the prefix used for toolchain.
2. -m MODULE_DIRNAME Specify the module directory name.
3. Change hex function to Math::BigInt->from_hex.
After this patch, parse the x8664 oops in x86, we can:
cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m ./e.ko vmlinux
Thanks,
Hui
Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: ozan@pardus.org.tr
Cc: Matthew Wilcox <willy@linux.intel.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.cz>
LKML-Reference: <20100203162014.GA10956@sepie.suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Doing the following:
make LSMOD=file localmodconfig
Will make the streamline-config code use the given file instead of
lsmod. If the file is an executable, it will execute it, otherwise
it will read it as text.
make LSMOD=/my/local/path/lsmod localmodconfig
The above will execute the lsmod in /my/local/path instead of the
lsmods that may be located elsewhere.
make LSMOD=embedded_board_lsmod localmodconfig
The above will read the "embedded_board_lsmod" as a text file. This
is useful if you are doing a cross compile and need to run the
config against modules that exist on an embedded device.
Note, if the LSMOD= file does is not a path, it will add the
path to the object directory. That is, the above example will look
for "embedded_board_lsmod" in the directory that the binary will
be built in (the O=dir directory).
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
On branch config/linus
When I use markup_oops.pl parse a x8664 oops, I got:
objdump: --start-address: bad number: NaN
No matching code found
This is because:
main::(./m.pl:228): open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump";
DB<3> p $decodestart
NaN
This NaN is from:
main::(./m.pl:176): my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
DB<2> p $func_offset
0x175
There is already a "0x" in $func_offset, another 0x makes it a NaN.
The $func_offset is from line:
if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
I make a patch to change "(0x[0-9a-f]+)\/0x[a-f0-9]/)" to "0x([0-9a-f]+)\/0x[a-f0-9]/)".
Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Arjan van de Ven <arjan@linux.intel.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>
When git has been set to always use color in .gitconfig then I get the
warning message
Bad divisor in main::vcs_assign: 0
This is caused by vcs_file_signoffs not matching any commits due to the
pattern not understand the colour codes. Fix this by telling git log to
never use colour.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
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>
Distributions now have lsmod in /bin instead of /sbin. But to handle
both cases, we look for it in /sbin /bin /usr/bin and /usr/sbin.
If lsmod is not found in any of those paths, it defaults to use
just lsmod and hopes that it lies in the path of the user.
Tested-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's
BuildRoot. The user, however, may have a custom setting for %_tmppath,
which should be used in BuildRoot. This patch changes mkspec's
BuildRoot output to appropriately use %_tmppath.
Signed-off-by: John Saalwaechter <saalwaechter@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
I got a "No matching code found" when I use markup_oops.pl parse a error
in a x86_64 module.
cat e.c
int init_module(void)
{
char *buf = 0;
buf[0] = 3;
return 0;
}
void cleanup_module(void)
{
//char *buf = 0;
//buf[0] = 3;
}
MODULE_AUTHOR("Hui Zhu");
MODULE_LICENSE("GPL");
0000000000000000 <init_module>:
init_module():
/home/teawater/study/kernel/stack2core/example/e.c:10
0: c6 04 25 00 00 00 00 movb $0x3,0x0
7: 03
/home/teawater/study/kernel/stack2core/example/e.c:13
8: 31 c0 xor %eax,%eax
a: c3 retq
b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
0000000000000010 <cleanup_module>:
cleanup_module():
/home/teawater/study/kernel/stack2core/example/e.c:20
10: f3 c3 repz retq
12: 90 nop
13: 90 nop
Disassembly of section .modinfo:
This is because the faulting instruction "movb $0x3,0x0" is the first
line of the range.
In the markup_oops.pl:
main::(./scripts/markup_oops.pl:245):
245: if (InRange($1, $target)) {
DB<2> p $line
ffffffffa001b000: c6 04 25 00 00 00 00 movb $0x3,0x0
DB<3> p $counter
0
It just set $center in next loop. So it cannot get the $center.
And even if $center is set to the right value 0.
if ($center == 0) {
print "No matching code found \n";
exit;
}
The first line $center will be 0, so I change the default value to -1.
Signed-off-by: Hui Zhu <teawater@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>