dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1738 Commits

Author SHA1 Message Date
Joe Perches caf2a54f10 scripts/checkpatch.pl: add check for multiple terminating semicolons and casts of vmalloc
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>
2011-01-13 08:03:11 -08:00
Joe Perches ab6c937dba scripts/get_maintainer.pl: use --git-fallback more often
On Fri, 2010-11-05 at 13:50 -0700, Andrew Morton wrote:
> z:/usr/src/git26> perl scripts/get_maintainer.pl -file mm/mempolicy.c
> linux-mm@kvack.org
> linux-kernel@vger.kernel.org

Turns out this is an arguable defect in the script.

The MAINTAINERS entry for mm is:

MEMORY MANAGEMENT
L:	linux-mm@kvack.org
W:	http://www.linux-mm.org
S:	Maintained
F:	include/linux/mm.h
F:	mm/

There's a maintainer entry, but no named individual, so the script doesn't
use git history via --git-fallback.

This is also a defect for MAINTAINERS with status entries marked "Orphan"
or "Odd fixes".

The script now checks a section for any "M:" entry and that an "S:" entry
is supported or maintained.  If both those conditions are not satisified,
use --git-fallback as appropriate.

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>
2011-01-13 08:03:10 -08:00
Joe Perches 7e1863af16 scripts/get_maintainer.pl: make --rolestats the default
This script now requires a user to add --norolestats to the command line
so it's harder to feed the output of this script to programs that send
mass emails.

Update --help to correct command line defaults.

Change version to 0.26.

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>
2011-01-13 08:03:10 -08:00
Linus Torvalds 0bd2cbcdfa Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
  of/flattree: forward declare struct device_node in of_fdt.h
  ipmi: explicitly include of_address.h and of_irq.h
  sparc: explicitly cast negative phandle checks to s32
  powerpc/405: Fix missing #{address,size}-cells in i2c node
  powerpc/5200: dts: refactor dts files
  powerpc/5200: dts: Change combatible strings on localbus
  powerpc/5200: dts: remove unused properties
  powerpc/5200: dts: rename nodes to prepare for refactoring dts files
  of/flattree: Update dtc to current mainline.
  of/device: Don't register disabled devices
  powerpc/dts: fix syntax bugs in bluestone.dts
  of: Fixes for OF probing on little endian systems
  of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
  of/flattree: Add of_flat_dt_match() helper function
  of_serial: explicitly include of_irq.h
  of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
  of/flattree: Reorder unflatten_dt_node
  of/flattree: Refactor unflatten_dt_node
  of/flattree: Add non-boottime device tree functions
  of/flattree: Add Kconfig for EARLY_FLATTREE
  ...

Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
2011-01-10 08:57:03 -08:00
Linus Torvalds e3166331a3 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:
  Documentation/kbuild: add info that 'choice' can have a symbol name
  kbuild: add numeric --set-val option to scripts/config
  headers_check: Fix warning text
  headers_check: better search for functions in headers
  scripts/coccinelle: update for compatability with Coccinelle 0.2.4
  tags: put function prototypes back!
  Kconfig: fix single letter command in scripts/config
  gitignore: add scripts/recordmcount
2011-01-10 08:29:25 -08:00
Linus Torvalds 1693ed284f 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:
  deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/
  deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb
  kbuild: create linux-headers package in deb-pkg
  kbuild, deb-pkg: support overriding userland architecture
  kbuild, deb-pkg: select userland architecture based on UTS_MACHINE
  kbuild, deb-pkg: Fix build with paranoid umask
2011-01-10 08:28:38 -08:00
Linus Torvalds f28b1c8aaa 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:
  nconf: handle comment entries within choice/endchoice
  kconfig: fix warning
  kconfig: Make expr_copy() take a const argument
  kconfig: simplify select-with-unmet-direct-dependency warning
  kconfig: add more S_INT and S_HEX consistency checks
  kconfig: fix `zconfdebug' extern declaration
  kconfig/conf: merge duplicate switch's case
  kconfig: fix typos
  kbuild/gconf: add dummy inline for bind_textdomain_codeset()
  kbuild/nconf: fix spaces damage
  kconfig: nuke second argument of conf_write_symbol()
  kconfig: do not define AUTOCONF_INCLUDED
  kconfig: the day kconfig warns about "select"-abuse has come
2011-01-10 08:28:17 -08:00
Linus Torvalds 0c05384a5a 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:
  mkuboot.sh: Fail if mkimage is missing
  gen_init_cpio: checkpatch fixes
  gen_init_cpio: Avoid race between call to stat() and call to open()
  modpost: Fix address calculation in reloc_location()
  Make fixdep error handling more explicit
  checksyscalls: Fix stand-alone usage
  modpost: Put .zdebug* section on white list
  kbuild: fix interaction of CONFIG_IKCONFIG and KCONFIG_CONFIG
  kbuild: export linux/{a.out,kvm,kvm_para}.h on headers_install_all
  kbuild: introduce HDR_ARCH_LIST for headers_install_all
  headers_install: check exit status of unifdef
  gen_init_cpio: remove leading `/' from file names
  scripts/genksyms: fix header usage
  fixdep: use hash table instead of a single array
2011-01-10 08:27:52 -08:00
maximilian attems ee81b786a0 deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/
hdrpackage and headerpackage are not intuitive names,
use proposed alternatives by Michel Marek.

While touching them move the mkdir of the kernel_headers dir up
and fix it for paranoid umask.

CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 22:45:25 +01:00
maximilian attems e68077856e deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb
userland dev likes latest incarnation of that userland API.
make it easy to also build it on make deb-pkg invocation:

dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_2.6.32-rc6-4_amd64.deb'.

Last year patch rebased on top of latest deb-pkg changes.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 16:16:48 +01:00
Peter Korsgaard 39177ec362 nconf: handle comment entries within choice/endchoice
Equivalent to af6c1598 (kconfig: handle comment entries within
choice/endchoice), but for nconfig instead.

Implement support for comment entries within choice groups. Comment entries
are displayed visually distinct from normal configs, and selecting them is
a no-op.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 15:45:28 +01:00
Roland Stigge bc91c9f313 mkuboot.sh: Fail if mkimage is missing
on building an uImage, I get:

$ make uImage
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
"mkimage" command not found - U-Boot images will not be built
  Image arch/arm/boot/uImage is ready
$

I.e. it says: "uImage is ready" even though the uImage file doesn't
exist because mkimage is missing.

I propose the attached patch.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-01-07 14:31:01 +01:00
Linus Torvalds 3c0cb7c31c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits)
  ARM: DMA: add support for DMA debugging
  ARM: PL011: add DMA burst threshold support for ST variants
  ARM: PL011: Add support for transmit DMA
  ARM: PL011: Ensure IRQs are disabled in UART interrupt handler
  ARM: PL011: Separate hardware FIFO size from TTY FIFO size
  ARM: PL011: Allow better handling of vendor data
  ARM: PL011: Ensure error flags are clear at startup
  ARM: PL011: include revision number in boot-time port printk
  ARM: vexpress: add sched_clock() for Versatile Express
  ARM i.MX53: Make MX53 EVK bootable
  ARM i.MX53: Some bug fix about MX53 MSL code
  ARM: 6607/1: sa1100: Update platform device registration
  ARM: 6606/1: sa1100: Fix platform device registration
  ARM i.MX51: rename IPU irqs
  ARM i.MX51: Add ipu clock support
  ARM: imx/mx27_3ds: Add PMIC support
  ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn()
  mx51: fix usb clock support
  MX51: Add support for usb host 2
  arch/arm/plat-mxc/ehci.c: fix errors/typos
  ...
2011-01-06 16:50:35 -08:00
Linus Torvalds 28d9bfc37c 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: (146 commits)
  tools, perf: Documentation for the power events API
  perf: Add calls to suspend trace point
  perf script: Make some lists static
  perf script: Use the default lost event handler
  perf session: Warn about errors when processing pipe events too
  perf tools: Fix perf_event.h header usage
  perf test: Clarify some error reports in the open syscall test
  x86, NMI: Add touch_nmi_watchdog to io_check_error delay
  x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time
  x86: Only call smp_processor_id in non-preempt cases
  perf timechart: Adjust perf timechart to the new power events
  perf: Clean up power events by introducing new, more generic ones
  perf: Do not export power_frequency, but power_start event
  perf test: Add test for counting open syscalls
  perf evsel: Auto allocate resources needed for some methods
  perf evsel: Use {cpu,thread}_map to shorten list of parameters
  perf tools: Refactor all_tids to hold nr and the map
  perf tools: Refactor cpumap to hold nr and the map
  perf evsel: Introduce per cpu and per thread open helpers
  perf evsel: Steal the counter reading routines from stat
  ...
2011-01-06 10:17:26 -08:00
Randy Dunlap 8484baaa50 kernel-doc: code reorganization
Move 'main' code vs. subroutines around so that they are not so
intermixed, for better readability/understanding (relative to Perl).
It was messy to follow the primary flow of code execution with the
code being mixed.  Now the code begins with data initialization,
followed by all subroutines, then ends with the main code execution.

This is almost totally source code movement, with a few changes as
needed for forward declarations.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-06 09:59:38 -08:00
Russell King 31edf274f9 Merge branches 'ftrace', 'gic', 'io', 'kexec', 'mod', 'sa11x0', 'sh' and 'versatile' into devel 2011-01-05 18:08:10 +00:00
Ingo Molnar aef1b9cef7 Merge commit 'v2.6.37' into perf/core
Merge reason: Add the final .37 tree.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-01-05 14:22:10 +01:00
John Bonesio 658f29a51e of/flattree: Update dtc to current mainline.
Pull in recent changes from the main dtc repository. These changes
primarily allow multiple device trees to be declared which are merged
by dtc. This feature allows us to include a basic dts file and then
provide more information for the specific system through the merging
functionality.

Changes pulled from git://git.jdl.com/software/dtc.git
commit id: 37c0b6a0, "dtc: Add code to make diffing trees easier"

Signed-off-by: John Bonesio <bones@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-01-03 16:02:49 -07:00
Linus Torvalds d864b7b4d6 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:
  kconfig: fix undesirable side effect of adding "visible" menu attribute
2011-01-02 10:37:19 -08:00
Jan Beulich 7ad1227818 kconfig: fix undesirable side effect of adding "visible" menu attribute
This lead to non-selected, non-user-selectable options to be written
out to .config. This is not only pointless, but also preventing the
user to be prompted should any of those options eventually become
visible (e.g. by de-selecting the *_AUTO options the "visible"
attribute was added for.

Furthermore it is quite logical for the "visible" attribute of a menu
to control the visibility of all contained prompts, which is what the
patch does.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29 23:31:34 +01:00
Theodore Ts'o cd8d60a20a kbuild: create linux-headers package in deb-pkg
Create a linux-headers-$KVER.deb package which can be used to build
external modules without having the source tree around.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29 13:54:49 +01:00
Olof Johansson 731ece41fb modpost: Fix address calculation in reloc_location()
This patch fixes a segfault in modpost that is observed when the gold
linker is used to link the input objects.

The problem is that reloc_location (modpost.c) is computing the
address of the relocation target incorrectly. Here, elf->hdr points
to the beginning of the ELF file in memory, sechdr points to the
relocation section header, section is the index of the section
being relocated, and sechdrs[section].sh_offset would be the offset
of that section, relative to the beginning of the ELF file. Adding
elf->hdr + sechdrs[section].sh_offset gives you the address of the
beginning of the section, and adding r->r_offset to that gives you the
address of the location to be relocated. You do not need to subtract
sechdrs[section].sh_addr from that -- the result of this is an address
outside the file, and causes the segfault when addend_386_rel tries to
dereference it.

This bug is not observed when GNU ld is used to link the inputs. The
object file ubuntu/omnibook/omnibook.o is the result of an ld -r of
several other files.  When GNU ld does an ld -r, it sets the vaddr
field for each section to 0, but gold lays out the section addresses
sequentially instead:

Section Headers:
 [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 [ 0]                   NULL            00000000 000000 000000 00      0   0  0
 [ 1] .text             PROGBITS        00000000 000034 004794 00  AX  0   0  4
 [ 2] .data             PROGBITS        0000b9d0 0047c8 0009c0 00  WA  0   0  4
 [ 3] .bss              NOBITS          000162f8 005188 00013c 00  WA  0   0  4
 [ 4] .rodata.str1.1    PROGBITS        00004f2d 0052c4 001b1a 01 AMS  0   0  1
 [ 5] .init.text        PROGBITS        00004794 006dde 0005fa 00  AX  0   0  1
 [ 6] .exit.text        PROGBITS        00004d8e 0073d8 00018a 00  AX  0   0  1
  ...

So the bug in the tool remained undiscovered because the section's vaddr
always happened to be 0.

Signed-off-by: Raymes Khoury <raymes@google.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-28 00:22:58 +01:00
Arnaud Lacombe 0597fcd08b kconfig: fix warning
In file included from scripts/kconfig/zconf.tab.c:2502:
scripts/kconfig/expr.c:1033: warning: no previous prototype for 'expr_simplify_unmet_dep'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-27 21:46:47 +01:00
Dirk Brandewie aab94339cd of: Add support for linking device tree blobs into vmlinux
This patch adds support for linking device tree blob(s) into
vmlinux. Modifies asm-generic/vmlinux.lds.h to add linking
.dtb sections into vmlinux. To maintain compatiblity with the of/fdt
driver code platforms MUST copy the blob to a non-init memory location
before the kernel frees the .init.* sections in the image.

Modifies scripts/Makefile.lib to add a kbuild command to
compile DTS files to device tree blobs and a rule to create objects to
wrap the blobs for linking.

STRUCT_ALIGNMENT is defined in vmlinux.lds.h for use in the rule to
create wrapper objects for the dtb in Makefile.lib.  The
STRUCT_ALIGN() macro in vmlinux.lds.h is modified to use the
STRUCT_ALIGNMENT definition.

The DTB's are placed on 32 byte boundries to allow parsing the blob
with driver/of/fdt.c during early boot without having to copy the blob
to get the structure alignment GCC expects.

A DTB is linked in by adding the DTB object to the list of objects to
be linked into vmlinux in the archtecture specific Makefile using
   obj-y += foo.dtb.o

Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
Acked-by: Michal Marek <mmarek@suse.cz>
[grant.likely@secretlab.ca: cleaned up whitespace inconsistencies]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-12-23 14:43:00 -07:00
Ben Gamari a3ba81131a Make fixdep error handling more explicit
Also add missing error handling to fstat call

Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-22 23:23:28 +01:00
Jiri Kosina 4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
Ingo Molnar 9fb67204d7 Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core 2010-12-22 17:12:08 +01:00
Michal Marek 17742dc743 kconfig: Make expr_copy() take a const argument
Fixes
scripts/kconfig/expr.c: In function ‘expr_get_leftmost_symbol’:
scripts/kconfig/expr.c:1026:2: warning: passing argument 1 of ‘expr_copy’ discards qualifiers from pointer target type
scripts/kconfig/expr.c:67:14: note: expected ‘struct expr *’ but argument is of type ‘const struct expr *’

Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-21 17:59:16 +01:00
Arnaud Lacombe 1137c56b74 kconfig: simplify select-with-unmet-direct-dependency warning
This is an attempt to simplify the expressing printed by kconfig when a
symbol is selected but still has direct unmet dependency.

First, the symbol reverse dependency is split in sub-expression. Then,
each sub-expression is checked to ensure that it does not contains the
unmet dependency. This removes the false-positive symbols and fixed symbol
which already have the correct dependency. Finally, only the symbol
responsible of the "select" is printed, instead of its full dependency tree.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-21 17:59:14 +01:00
Asbjoern Sloth Toennesen 55f88eccf9 kbuild, deb-pkg: support overriding userland architecture
Usefull if building for sparc64 userland, because the
sparc and sparc64 userlands use the same 64-bit kernel,
making it impossible to always select the correct userland
architecture for the resulting debian package.

Might also be usefull, if you want a i386 userland with a amd64 kernel.

Example usage:
	make KBUILD_DEBARCH=i386 deb-pkg

LKML-reference: <alpine.DEB.2.02.1011051437500.13287@aurora.sdinet.de>
Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-20 16:52:31 +01:00
Geert Uytterhoeven 6e5f685642 checksyscalls: Fix stand-alone usage
The usage help in the comments
  - refers to the wrong script name,
  - doesn't mention that $srctree must be set.

Hence correct the script name, and derive the source tree path from the script
path, so we no longer need to rely on $srctree being set by the caller.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-20 15:40:33 +01:00
H.J. Lu 1121584f5d modpost: Put .zdebug* section on white list
"as --compress-debug-sections" will generate compressed debug sections
with section names ".zdebug*".  This patch puts .zdebug* section on
white list.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-16 23:05:34 +01:00
Ingo Molnar d949750fed Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent 2010-12-16 11:21:24 +01:00
Arnaud Lacombe ab60bd0b92 kconfig: add more S_INT and S_HEX consistency checks
This patch add more number consistency checkg, trying to catch the following
situation:

config FOO0
	hex
	default 42

config FOO1
	string

config BAR0
	int
	default FOO1

config BAR1
	hex
	default FOO1

config FOO2
	hex
	default 42h

config FOO3
	int
	default "1bar"

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 23:15:32 +01:00
Jonas Aaberg f0a6332ce2 kbuild: add numeric --set-val option to scripts/config
Add new option to scripts/config for changing .config numeric values

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 15:44:31 +01:00
Arnaud Lacombe 4ce2c1e8e8 kconfig: fix `zconfdebug' extern declaration
This symbol is only exist if YYDEBUG is defined.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:42:12 +01:00
Arnaud Lacombe bf128f5265 kconfig/conf: merge duplicate switch's case
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:42:11 +01:00
Arnaud Lacombe 579fb8e741 kconfig: fix typos
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:42:11 +01:00
Arnaud Lacombe 1ebfa5198e kbuild/gconf: add dummy inline for bind_textdomain_codeset()
This symbols is used by gconf.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:42:11 +01:00
Arnaud Lacombe fe04ce0bf9 kbuild/nconf: fix spaces damage
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:42:11 +01:00
Arnaud Lacombe 0dce631092 kconfig: nuke second argument of conf_write_symbol()
Replacing S_TRISTATE by S_BOOLEAN is a no-op for conf_write_symbol().

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
[mmarek: Fix unused variable warning in conf_write()]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 14:26:51 +01:00
Arnaud Lacombe 6e71fabe9e kconfig: do not define AUTOCONF_INCLUDED
AUTOCONF_INCLUDED is not checked is not used within the tree and its parent
header, `autoconf.h', is safe to be re-included.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15 13:38:25 +01:00
Kirill A. Shutemov f6820308e0 kbuild: introduce HDR_ARCH_LIST for headers_install_all
Using HDR_ARCH_LIST you can specify subset of architectures you want to get
headers for.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-14 22:16:19 +01:00
Michal Marek 8990c1bc4b Merge commit 'v2.6.37-rc1' into kbuild/kbuild 2010-12-14 22:01:55 +01:00
akpm@linux-foundation.org d52784eb36 headers_check: Fix warning text
Fix the warning text too, per Randy.

Cc: Alexander Shishkin <virtuoso@slind.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-14 17:05:08 +01:00
akpm@linux-foundation.org de323f22a8 headers_check: better search for functions in headers
Some headers don't bother with "extern" in function prototypes, which
results in said prototypes being unnoticed and exported to userland.

This patch slightly improves detection of such cases by checking for C
type names as well in the beginning of a line.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: WANG Cong <amwang@redhat.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-14 17:02:45 +01:00
Mike Frysinger 2979076fbf headers_install: check exit status of unifdef
If unifdef fails for any reason (like segfaulting), we should be aborting
the install steps.  So check its exit status in this unlikely scenario.

Reported-by: Diego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-14 15:06:04 +01:00
Linus Torvalds 31c67c7553 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:
  initramfs: Really fix build break on symbol-prefixed archs
  [media] Fix Kconfig errors due to two visible menus
  i2c/algos: convert Kconfig to use the menu's `visible' keyword
  media/video: convert Kconfig to use the menu's `visible' keyword
  Revert "i2c: Fix Kconfig dependencies"
  kconfig: regen parser
  kconfig: add an option to determine a menu's visibility
2010-12-05 16:41:13 -08:00
Rabin Vincent ed60453fa8 ARM: 6511/1: ftrace: add ARM support for C version of recordmcount
Depending on the compiler version, ARM GCC calls the mcount function
either __gnu_mcount_nc or mcount.

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>
2010-12-04 11:30:27 +00:00
Rabin Vincent cd3478f2bd ARM: 6509/1: ftrace: ignore any ftrace.o in C version of recordmcount
arch/arm/kernel/ftrace.c references mcount like kernel/tracing/ftrace.c,
so change the exclusion filter to match any ftrace.o.

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>
2010-12-04 11:30:26 +00:00
Julia Lawall a1087ef6ab scripts/coccinelle: update for compatability with Coccinelle 0.2.4
For doubleinit.cocci, Coccinelle 0.2.4 requires a comma after ... in a
field list.  Coccinelle also now behaves gracefully when a definition is
provided for a virtual that doesn't exist, so there is no need for the
semantic patch code to check for this case.

Updated the documentation to reflect the fact that the best results will
now be obtained with Coccinelle version 0.2.4 or later.

Signed-off-by: Julia Lawall <julia@diku.dk>
2010-12-03 12:27:01 +01:00
John Reiser e63233f75a ftrace: Have recordmcount honor endianness in fn_ELF_R_INFO
It looks to me like the change which introduced "virtual functions"
forgot about cross-platform endianness.

Thank you to Arnaud for supplying before+after data files do_mounts*.o.

This fixes a MIPS build failure triggered by recordmcount.

Reported-by: Arnaud Lacombe <lacombar@gmail.com>
Tested-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John Reiser <jreiser@BitWagon.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-12-02 10:37:48 -05:00
Peter Zijlstra 15664125f7 scripts/tags.sh: Add magic for trace-events
Make tags find the trace-event definitions

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290591835.2072.438.camel@laptop>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-12-02 09:39:48 -05:00
Uwe Kleine-König 0a18a9386c tags: put function prototypes back!
Commit 7db86dc (ctags: usability fix) removed function prototypes from
tags file claiming "It makes no real sense to include function
prototypes".
But it is useful for quickly determining which header file developer
needs to include to fix compilation.

Now if someone wants to remove forward declarations (which I agree are
baggage), write a postprocessing script.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-02 12:46:18 +01:00
Arnaud Lacombe 01660dfc37 scripts/genksyms: fix header usage
FreeBSD does not like <malloc.h> when __STDC__ is defined, use the standard
<stdlib.h> instead.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 16:25:06 +01:00
Andi Kleen 45f53cc90e Kconfig: fix single letter command in scripts/config
The one letter commands in scripts/config didn't work and always
printed usage. Fix this here.

Cc: erick@openchill.org
Reported-by: erick@openchill.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:51:42 +01:00
Américo Wang 6e5b86924a gitignore: add scripts/recordmcount
This file is generated, should be ignored by git.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:49:50 +01:00
Asbjoern Sloth Toennesen 10f26fa642 kbuild, deb-pkg: select userland architecture based on UTS_MACHINE
Instead of creating the debian package for the compiling userland,
create it for a userland matching the kernel thats being compiled.

This patch supports all Lenny release architectures,
and Linux-based architecture candidates for Squeeze.

If it can't find a proper Debian userspace it displays a warning,
and fallback to let deb-gencontrol use the host's userspace arch.

Eg. with this patch the following make command:

	make ARCH=i386 deb-pkg

will output an i386 Debian package instead of an amd64 one,
when run on an amd64 machine.

Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25 15:32:05 +01:00
Mel Gorman 27af038494 scripts: fix gfp-translate for recent changes to gfp.h
The recent changes to gfp.h to satisfy sparse broke scripts/gfp-translate.
This patch fixes it up to work with old and new versions of gfp.h .

[akpm@linux-foundation.org: use `grep -q', per WANG Cong]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Namhyung Kim <namhyung@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-25 06:50:49 +09:00
Arnaud Lacombe 09899c93b1 kconfig: regen parser
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-22 11:27:32 -02:00
Arnaud Lacombe 86e187ff9b kconfig: add an option to determine a menu's visibility
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>
2010-11-22 11:27:17 -02:00
Randy Dunlap 2b35f4d9ca kernel-doc: escape xml for structs
scripts/kernel-doc was leaving unescaped '<', '>', and '&' in
generated xml output for structs.  This causes xml parser errors.
Convert these characters to "&lt;", "&gt;", and "&amp;" 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>
2010-11-18 15:00:46 -08:00
Wu Zhangjin 45677454dd ftrace: Speed up recordmcount
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>
2010-11-18 17:16:05 -05:00
Eric Dumazet 8af27e1dc4 fixdep: use hash table instead of a single array
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>
2010-11-11 17:12:06 +01:00
maximilian attems e86c2412c8 kbuild, deb-pkg: Fix build with paranoid umask
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>
2010-11-11 16:32:43 +01:00
Andy Whitcroft 020e773f6b kconfig: sym_expand_string_value: allow for string termination when reallocing
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>
2010-11-01 17:06:00 -04:00
Uwe Kleine-König b595076a18 tree-wide: fix comment/printk typos
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-01 15:38:34 -04:00
Linus Torvalds 82279e6bd7 Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* '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})
2010-10-31 20:40:24 -04:00
Thomas Gleixner 4882720b26 semaphore: Remove mutex emulation
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>
2010-10-30 12:12:50 +02:00
Linus Torvalds b7bdcc4711 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig
* '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
2010-10-29 14:43:30 -07:00
Wu Zhangjin 412910cd04 ftrace/MIPS: Add module support for C version of recordmcount
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>
2010-10-29 19:08:55 +01:00
John Reiser a2d49358ba ftrace/MIPS: Add MIPS64 support for C version of recordmcount
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>
2010-10-29 19:08:54 +01:00
Steven Rostedt 8ef17fa2ef kconfig: Have streamline_config process menuconfigs too
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>
2010-10-29 01:07:23 -04:00
Steven Rostedt 20d1904733 kconfig: Fix streamline_config to read multi line deps in Kconfig files
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>
2010-10-29 01:07:10 -04:00
hiromu cf5a189d4a kconfig: Fix missing declaration of variable $dir in streamline_config.pl
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>
2010-10-29 01:04:16 -04:00
hiromu yagura ccece60ac6 kconfig: Fix variable name typo %prompts in streamline_config.pl
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>
2010-10-29 01:04:14 -04:00
Steven Rostedt 4908980b24 kconfig: Make localmodconfig handle environment variables
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>
2010-10-29 01:03:42 -04:00
Linus Torvalds 2301b65b86 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:
  scripts/package: don't break if %{_smp_mflags} isn't set
  kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
2010-10-28 16:19:38 -07:00
Linus Torvalds e596c79050 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: (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
  ...
2010-10-28 16:18:59 -07:00
Linus Torvalds 51399a3919 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: (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
2010-10-28 16:16:39 -07:00
Linus Torvalds c9e2a72ff1 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:
  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
2010-10-28 15:13:55 -07:00
Mike Frysinger d63f6d1b4d initramfs: Fix build break on symbol-prefixed archs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 23:21:19 +02:00
Michal Marek 9231d9e02a Revert "namespace: add source file location exceptions"
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>
2010-10-28 00:59:56 +02:00
Michal Marek 70c74e59db Merge branch 'message-callback' into kbuild/kconfig
Conflicts:
	scripts/kconfig/nconf.c
2010-10-28 00:54:25 +02:00
Nicolas Palix 062c1825a5 Coccinelle: Add contextual message
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>
2010-10-28 00:32:23 +02:00
Julia Lawall 97c1cf8fdb Coccinelle: Find doubled arguments to boolean or bit operators.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:32:23 +02:00
Julia Lawall 10247179a7 Coccinelle: Find nested lock+irqsave functions that use the same flags variables.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Nicolas Palix <npalix.work@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28 00:32:22 +02:00
Stephen Hemminger 24a54f7974 namespace: add source file location exceptions
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>
2010-10-28 00:29:48 +02:00
Dick Streefland 532cf2907a scripts/extract-ikconfig: add support for bzip2, lzma and lzo
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>
2010-10-28 00:22:17 +02:00
Namhyung Kim d0f95c7826 kbuild: check return value of asprintf()
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>
2010-10-28 00:17:16 +02:00
Michal Marek b74b953b99 Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c
(commit eda603f).
2010-10-28 00:15:57 +02:00
Amerigo Wang abb4385262 scripts/namespace.pl: improve to get more correct results
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>
2010-10-28 00:07:46 +02:00
Amerigo Wang e8cf981346 scripts/namespace.pl: some bug fixes
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>
2010-10-28 00:07:46 +02:00
Stephen Hemminger 43f683c9e4 scripts/namespace.pl: update file exclusion list
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>
2010-10-28 00:07:45 +02:00
Amerigo Wang c25f415751 scripts/namespace.pl: fix wrong source path
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>
2010-10-28 00:07:45 +02:00
Joe Perches 93ed0e2d07 scripts/checkpatch.pl: add check for declaration of pci_device_id
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:21 -07:00
Joe Perches cb710eca68 scripts/checkpatch.pl: add warnings for static char that could be static const char
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>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 267ad8f426 checkpatch: version 0.31
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>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 01464f30a9 checkpatch: statement/block context analyser should look at sanitised lines
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>
2010-10-26 16:52:21 -07:00
Andy Whitcroft 3cbf62df3a checkpatch: handle EXPORT_SYMBOL for DEVICE_ATTR and similar
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>
2010-10-26 16:52:21 -07:00