Commit Graph

1485 Commits

Author SHA1 Message Date
Steven Rostedt d7b4d6de57 ftrace: Remove recursion between recordmcount and scripts/mod/empty
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>
2010-10-18 17:08:10 -04:00
Steven Rostedt 85caa993d7 ftrace: Use objtree for C version of recordmcount
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>
2010-10-15 12:09:25 -04:00
Steven Rostedt 4447586364 ftrace: Do not process kernel/trace/ftrace.o with C recordmcount program
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>
2010-10-15 11:49:47 -04:00
Steven Rostedt c28d5077f8 ftrace: Remove duplicate code for 64 and 32 bit in recordmcount.c
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>
2010-10-14 16:54:00 -04:00
Steven Rostedt 72441cb1fd ftrace/x86: Add support for C version of recordmcount
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>
2010-10-14 16:52:41 -04:00
John Reiser 81d3858d31 ftrace: Add C version of recordmcount compile time code
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>
2010-10-14 16:44:34 -04:00
Ingo Molnar d6dad199a1 jump label: Fix GCC feature check when distcc is used
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>
2010-09-24 09:12:25 +02:00
Jason Baron 52159d98be jump label: Convert dynamic debug to use jump labels
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>
2010-09-22 16:31:19 -04:00
Jason Baron bf5438fca2 jump label: Base patch for jump label
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>
2010-09-22 16:29:41 -04:00
Johannes Berg eda603f6cd docbook: warn on unused doc entries
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>
2010-09-11 16:49:21 -07:00
Johannes Berg 1f3a66889c kernel-doc: ignore case when stripping attributes
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>
2010-09-11 16:49:21 -07:00
Linus Torvalds c70662ec47 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
2010-08-23 18:28:24 -07:00
Michal Marek 8558f59edf setlocalversion: Ignote SCMs above the linux source tree
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>
2010-08-21 15:14:59 +02:00
Michal Marek e981b06076 Merge commit 'v2.6.36-rc1' into kbuild/rc-fixes 2010-08-20 13:53:08 +02:00
Jan Beulich 3c955b407a fixes for using make 3.82
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>
2010-08-17 11:47:40 +02:00
Steven Rostedt d244b6bd41 Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into trace/tip/perf/urgent-4
Conflicts:
	kernel/trace/trace_events.c

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-08-16 11:17:30 -04:00
Sam Ravnborg 3643f849d7 kconfig: fix segfault when detecting recursive dependency
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>
2010-08-15 00:32:13 +02:00
Sam Ravnborg 84062dd3a6 kconfig: fix savedefconfig with choice marked optional
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>
2010-08-15 00:32:12 +02:00
Sam Ravnborg 7cfddeef35 kbuild: drop unifdef-y support
unifdef-y is not used anymore - drop remaining references

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2010-08-14 22:26:52 +02:00
Linus Torvalds 9a459f6812 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
2010-08-13 17:57:56 -07:00
Linus Torvalds 090b710e8a Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
2010-08-13 17:56:27 -07:00
Milton Miller 55c640c3ab setlocalversion: fix version for untaged nontip mercurial revs
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>
2010-08-13 00:52:14 +02:00
Jean Sacren 4418a2b904 kconfig: Fix warning: ignoring return value of 'fgets'
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>
2010-08-13 00:40:35 +02:00
Jean Sacren bf5e327a30 kconfig: Fix warning: ignoring return value of 'fwrite'
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>
2010-08-13 00:40:26 +02:00
Andrej Gelenberg 866af407da nconfig: Fix segfault when menu is empty
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>
2010-08-13 00:34:15 +02:00
Linus Torvalds 26df0766a7 Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* '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.
  ...
2010-08-12 10:01:59 -07:00
David Howells 019fca84e7 MN10300: Permit .GCC-command-line sections
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>
2010-08-12 09:51:35 -07:00
Mike Frysinger 465c6cca26 tracing: Extend recordmcount to better support Blackfin mcount
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>
2010-08-12 10:06:51 -04:00
Sam Ravnborg a64b44ead0 kconfig: fix tristate choice with minimal config
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>
2010-08-12 10:55:02 +02:00
Sam Ravnborg 801690caf1 kconfig: fix savedefconfig for tristate choices
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>
2010-08-12 10:55:02 +02:00
Randy Dunlap b6d676db35 mtd/nand_base: fix kernel-doc warnings & typos
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>
2010-08-11 08:59:18 -07:00
Andrew Morton 5003bab82d fix "scripts/mod/modpost.c: fix memory leak"
Fix error introduced by 37ed19d5cc
("scripts/mod/modpost.c: fix memory leak").

 - don't kfree("")

 - fix one missed conversion

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: 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>
2010-08-11 08:58:59 -07:00
Rusty Russell 6a841528d2 param: silence .init.text references from param ops
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>
2010-08-11 23:04:17 +09:30
Patrick Pannuto b998e001e6 checkpatch: fix extraneous EXPORT_SYMBOL* warnings
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>
2010-08-09 20:45:09 -07:00
Patrick Pannuto 09ef87255d checkpatch: warn about unexpectedly long msleep's
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>
2010-08-09 20:45:09 -07:00
Patrick Pannuto 1a15a25086 checkpatch: prefer usleep_range over udelay
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>
2010-08-09 20:45:09 -07:00
Joe Perches 8bbea968f9 checkpatch: add more exceptions to 80 char lines
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>
2010-08-09 20:45:09 -07:00
Joe Eloff 5150bda43c checkpatch: change externals to globals
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>
2010-08-09 20:45:09 -07:00
Raffaele Recalcati 5f7ddae610 checkpatch: fix handling of leading spaces
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>
2010-08-09 20:45:09 -07:00
Wolfram Sang 7840a94cd1 checkpatch: refactor 'allowed asm includes' and add memory.h
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>
2010-08-09 20:45:09 -07:00
Alexey Fomenko 37ed19d5cc scripts/mod/modpost.c: fix memory leak
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>
2010-08-09 20:45:05 -07:00
Linus Torvalds 45d7f32c7a Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* 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.
2010-08-08 10:10:11 -07:00
Linus Torvalds 4aed2fd8e3 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* '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
2010-08-06 09:30:52 -07:00
Sam Ravnborg 1482834971 kconfig: fix make oldconfig
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>
2010-08-06 09:17:02 -07:00
Chris Metcalf ab11b48740 Merge branch 'master' into for-linus 2010-08-06 10:37:02 -04:00
Linus Torvalds f43100ae39 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
2010-08-05 14:20:14 -07:00
Linus Torvalds 27b4a1a9ea Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
2010-08-05 14:19:50 -07:00
Linus Torvalds e4d6152b52 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* '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
  ...
2010-08-05 14:12:07 -07:00
Michal Marek 7a996d3ab1 Merge commit 'v2.6.35' into kbuild/kconfig
Conflicts:
	scripts/kconfig/Makefile
2010-08-04 14:05:07 +02:00
Michal Marek 772320e845 Merge commit 'v2.6.35' into kbuild/kbuild
Conflicts:
	arch/powerpc/Makefile
2010-08-04 13:59:13 +02:00