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

1089 Commits

Author SHA1 Message Date
James Morris 9ac684fc38 Merge branch 'next' into for-linus 2008-10-10 11:09:47 +11:00
Mathieu Desnoyers 87f3b6b6fb Marker depmod fix core kernel list
* Theodore Ts'o (tytso@mit.edu) wrote:
>
> I've been playing with adding some markers into ext4 to see if they
> could be useful in solving some problems along with Systemtap.  It
> appears, though, that as of 2.6.27-rc8, markers defined in code which is
> compiled directly into the kernel (i.e., not as modules) don't show up
> in Module.markers:
>
> kvm_trace_entryexit arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
> kvm_trace_entryexit arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
>
> (Note the lack of any of the kernel_sched_* markers, and the markers I
> added for ext4_* and jbd2_* are missing as wel.)
>
> Systemtap apparently depends on in-kernel trace_mark being recorded in
> Module.markers, and apparently it's been claimed that it used to be
> there.  Is this a bug in systemtap, or in how Module.markers is getting
> built?   And is there a file that contains the equivalent information
> for markers located in non-modules code?

I think the problem comes from "markers: fix duplicate modpost entry"
(commit d35cb360c2)

Especially :

  -   add_marker(mod, marker, fmt);
  +   if (!mod->skip)
  +     add_marker(mod, marker, fmt);
    }
    return;
   fail:

Here is a fix that should take care if this problem.

Thanks for the bug report!

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tested-by: "Theodore Ts'o" <tytso@mit.edu>
CC: Greg KH <greg@kroah.com>
CC: David Smith <dsmith@redhat.com>
CC: Roland McGrath <roland@redhat.com>
CC: Sam Ravnborg <sam@ravnborg.org>
CC: Wenji Huang <wenji.huang@oracle.com>
CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-06 16:34:19 -07:00
zippel@linux-m68k.org 661b0680f7 kconfig: readd lost change count
Commit f072181e64 ("kconfig: drop the
""trying to assign nonexistent symbol" warning") simply dropped the
warnings, but it does a little more than that, it also marks the current
.config as needed saving, so add this back.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-29 08:03:01 -07:00
zippel@linux-m68k.org 204c96f609 kconfig: fix silentoldconfig
Recent changes to oldconfig have mixed up the silentoldconfig handling,
so this fixes that by clearly separating that special mode, e.g.
KCONFIG_NOSILENTUPDATE is only relevant here, the .config is written as
needed.

This will also properly close Bug 11230.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-29 08:03:01 -07:00
Randy Dunlap 39f00c087d kernel-doc: allow structs whose members are all private
Struct members may be marked as private by using
	/* private: */
before them, as noted in Documentation/kernel-doc-nano-HOWTO.txt

Fix kernel-doc to handle structs whose members are all private;
otherwise invalid XML is generated:

xmlto: input does not validate (status 3)
linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml:146: element variablelist: validity error : Element variablelist content does not follow the DTD, expecting ((title , titleabbrev?)? , varlistentry+), got ()
Document linux-2.6.27-rc6-git4/Documentation/DocBook/debugobjects.xml does not validate
make[1]: *** [Documentation/DocBook/debugobjects.html] Error 3

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reported-by: Roland McGrath <roland@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-23 08:09:13 -07:00
H. Peter Anvin 43789e2163 kbuild: fix cc-option and cc-option-yn
David Sanders wrote:

> I'm getting this error:
> as: unrecognized option `-mtune=generic32'
> I have binutils 2.17.

Use -c instead of -S in cc-option and cc-option-yn, so we can probe
options related to the assembler.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: kbuild devel <kbuild-devel@lists.sourceforge.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-09 11:52:33 -07:00
James Morris b56c8c221d SELinux: add gitignore file for mdp script
Add gitignore file for scripts/selinux/mdp/mdp.

Signed-off-by: James Morris <jmorris@namei.org>
2008-09-05 21:43:38 +10:00
James Morris 86d688984d Merge branch 'master' into next 2008-08-28 10:47:34 +10:00
Serge E. Hallyn 93c06cbbf9 selinux: add support for installing a dummy policy (v2)
In August 2006 I posted a patch generating a minimal SELinux policy.  This
week, David P. Quigley posted an updated version of that as a patch against
the kernel.  It also had nice logic for auto-installing the policy.

Following is David's original patch intro (preserved especially
bc it has stats on the generated policies):

se interested in the changes there were only two significant
changes. The first is that the iteration through the list of classes
used NULL as a sentinel value. The problem with this is that the
class_to_string array actually has NULL entries in its table as place
holders for the user space object classes.

The second change was that it would seem at some point the initial sids
table was NULL terminated. This is no longer the case so that iteration
has to be done on array length instead of looking for NULL.

Some statistics on the policy that it generates:

The policy consists of 523 lines which contain no blank lines. Of those
523 lines 453 of them are class, permission, and initial sid
definitions. These lines are usually little to no concern to the policy
developer since they will not be adding object classes or permissions.
Of the remaining 70 lines there is one type, one role, and one user
statement. The remaining lines are broken into three portions. The first
group are TE allow rules which make up 29 of the remaining lines, the
second is assignment of labels to the initial sids which consist of 27
lines, and file system labeling statements which are the remaining 11.

In addition to the policy.conf generated there is a single file_contexts
file containing two lines which labels the entire system with base_t.

This policy generates a policy.23 binary that is 7920 bytes.

(then a few versions later...):

The new policy is 587 lines (stripped of blank lines) with 476 of those
lines being the boilerplate that I mentioned last time. The remaining
111 lines have the 3 lines for type, user, and role, 70 lines for the
allow rules (one for each object class including user space object
classes), 27 lines to assign types to the initial sids, and 11 lines for
file system labeling. The policy binary is 9194 bytes.

Changelog:

	Aug 26: Added Documentation/SELinux.txt
	Aug 26: Incorporated a set of comments by Stephen Smalley:
		1. auto-setup SELINUXTYPE=dummy
		2. don't auto-install if selinux is enabled with
			non-dummy policy
		3. don't re-compute policy version
		4. /sbin/setfiles not /usr/sbin/setfiles
	Aug 22: As per JMorris comments, made sure make distclean
		cleans up the mdp directory.
		Removed a check for file_contexts which is now
		created in the same file as the check, making it
		superfluous.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2008-08-27 08:54:08 +10:00
Kay Sievers 5e4c6564c9 pnp: fix "add acpi:* modalias entries"
With 22454cb99f we added only the
first entry of the device table. We need to loop over the whole
device list.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-21 10:15:39 -07:00
Erkki Lintunen 0758416325 bugfix for scripts/patch-kernel in 2.6 sublevel stepping
scripts/patch-kernel script can't patch a tree, say, from 2.6.25 to
2.6.26.1, because of a wrong comparison in context of patching 2.6.x base.
 Fix it.

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-08-06 22:11:33 +02:00
Randy Dunlap 32ab8f97dd kernel-doc: skip nested struct/union cleanly
Fix handling of nested structs or unions.  The regex to strip (eliminate)
nested structs or unions was limited to only 0 or 1 matches.  This can
cause an uneven number of left/right braces to be stripped, which causes
this:

Warning(linux-2.6.27-rc1-git2//include/net/mac80211.h:336): No description found for parameter '}'

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>
2008-08-05 14:33:49 -07:00
Linus Torvalds d8f4b819c3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kconfig: drop the ""trying to assign nonexistent symbol" warning
  kconfig: always write out .config
2008-08-04 17:24:28 -07:00
Sam Ravnborg f072181e64 kconfig: drop the ""trying to assign nonexistent symbol" warning
They really stand out now that make *config is less chatty - and
they are generally ignored - so drop them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Adrian Bunk <bunk@kernel.org>
2008-08-04 22:29:37 +02:00
Sam Ravnborg 22127f246d kconfig: always write out .config
Always write out .config also in the case where config
did not change.
This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=11230

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: Adrian Bunk <bunk@kernel.org>
2008-08-04 22:18:07 +02:00
David Woodhouse 759da92671 firmware: silence __fw_modbuild and __fw_modinst 'Nothing to be done' messages
People don't like them and think they're errors.

Leave the __fw_install one though; when 'make firmware_install' does
nothing, it's best to have a 'Nothing to be done for...' message rather
than just doing nothing.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-08-02 07:52:29 +01:00
Adrian Bunk 48a61569bb kbuild: scripts/ver_linux: don't set PATH
It would have saved both a bug submitter and me a few hours if
scripts/ver_linux had picked the same gcc as the build.

Since I can't see any reason why it fiddles with PATH at all this patch
therefore removes the PATH setting.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31 23:36:54 +02:00
Andreas Gruenbacher 3b40d38120 kbuild: genksyms: Include extern information in dumps
The extern flag currently is not included in type dump files
(genksyms --dump-types). Include that flag there for completeness.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31 23:01:31 +02:00
Andreas Gruenbacher 94aa3d716e kbuild: genksyms parser: fix the __attribute__ rule
We are having two kinds of problems with genksyms today: fake checksum
changes without actual ABI changes, and changes which we would rather like
to ignore (such as an additional field at the end of a structure that
modules are not supposed to touch, for example).

I have thought about ways to improve genksyms and compute checksums
differently to avoid those problems, but in the end I don't see a
fundamentally better way.  So here are some genksyms patches for at least
making the checksums more easily manageable, if we cannot fully fix them.

In addition to the bugfixes (the first two patches), this allows genksyms
to track checksum changes and report why a checksum changed (third patch),
and to selectively ignore changes (fourth patch).

This patch:

Gcc __attribute__ definitions may occur repeatedly, e.g.,

	static int foo __attribute__((__used__))
		       __attribute__((aligned (16)));

The genksyms parser does not understand this, and generates a syntax error.
Fix this case.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-31 23:00:25 +02:00
Adrian Bunk 11ddad3960 kbuild: scripts/genksyms/lex.l: add %option noinput
gcc 4.3 correctly determines that input() is unused and gives the
following warning:

<--  snip  -->

...
  HOSTCC  scripts/genksyms/lex.o
scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used
...

<--  snip  -->

Fix it by adding %option noinput to scripts/genksyms/lex.l and
regeneration of scripts/genksyms/lex.c_shipped.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-30 22:31:02 +02:00
Adrian Bunk be2be1d590 kconfig: scripts/kconfig/zconf.l: add %option noinput
gcc 4.3 correctly determines that input() is unused and gives the
following warning:

<--  snip  -->

...
  HOSTCC  scripts/kconfig/zconf.tab.o
scripts/kconfig/lex.zconf.c:1628: warning: ‘input’ defined but not used
...

<--  snip  -->

Fix it by adding %option noinput to scripts/kconfig/zconf.l and
regeneration of scripts/kconfig/lex.zconf.c_shipped.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-30 22:29:50 +02:00
Ben Dooks 32be1d2232 scripts/mod/modpost.c: fix spelling of module and happens
Spelling fixes in scripts/mod/modpost.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-30 09:41:46 -07:00
Linus Torvalds 6948385cbd Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (25 commits)
  setlocalversion: do not describe if there is nothing to describe
  kconfig: fix typos: "Suport" -> "Support"
  kconfig: make defconfig is no longer chatty
  kconfig: make oldconfig is now less chatty
  kconfig: speed up all*config + randconfig
  kconfig: set all new symbols automatically
  kconfig: add diffconfig utility
  kbuild: remove Module.markers during mrproper
  kbuild: sparse needs CF not CHECKFLAGS
  kernel-doc: handle/strip __init
  vmlinux.lds: move __attribute__((__cold__)) functions back into final .text section
  init: fix URL of "The GNU Accounting Utilities"
  kbuild: add arch/$ARCH/include to search path
  kbuild: asm symlink support for arch/$ARCH/include
  kbuild: support arch/$ARCH/include for tags, cscope
  kbuild: prepare headers_* for arch/$ARCH/include
  kbuild: install all headers when arch is changed
  kbuild: make clean removes *.o.* as well
  kbuild: optimize headers_* targets
  kbuild: only one call for include/ in make headers_*
  ...
2008-07-27 09:59:59 -07:00
Sebastian Siewior 56b2f0706d setlocalversion: do not describe if there is nothing to describe
Jan Engelhardt wrote:
> Just a note that when you run git-describe, you should probably quiten it.
>
> fatal: cannot describe 'bd7364a0fd5a4a2878fe4a224be1b142a4e6698e'
>
> This happens when tags are not present, which can happen if Linus's tree
> is sent upwards again, IOW:
>
>  machine1$  git-clone torvalds/linux-2.6.git
>  machine1$  git push elsewhere master
>
>  machine2$  git-clone elsewhere:/linux
>  machine2$  git-describe HEAD
>  fatal: cannot describe that

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:53 +02:00
Sam Ravnborg 09748e178b kconfig: make defconfig is no longer chatty
make defconfig generated a lot of output
then noone actually read.
Use conf_set_all_new_symbols() to generate the default
configuration and avoid the chatty output.

A typical run now looks like this:
$ make  defconfig
*** Default configuration is based on 'i386_defconfig'
arch/x86/configs/i386_defconfig:13:warning: trying to assign nonexistent symbol SEMAPHORE_SLEEPERS
arch/x86/configs/i386_defconfig:176:warning: trying to assign nonexistent symbol PREEMPT_BKL
...
arch/x86/configs/i386_defconfig:1386:warning: trying to assign nonexistent symbol INSTRUMENTATION
$

As an added benefit we now clearly see the warnings generated
in the start of the process.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-07-25 22:12:51 +02:00
Sam Ravnborg cd9140e1e7 kconfig: make oldconfig is now less chatty
Previously when running "make oldconfig" we saw all the propmt lines
from kconfig and noone actully read this.

With this patch the user will only see output if there is new symbols.
This will be seen as "make oldconfig" runs which does not generate any output.

A typical run now looks like this:

$ make oldconfig
scripts/kconfig/conf -o arch/x86/Kconfig
$

If a new symbol is found then we restart the config process like this:
$ make oldconfig
scripts/kconfig/conf -o arch/x86/Kconfig
*
* Restart config...
*
*
* General setup
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y
Local version - append to kernel release (LOCALVERSION) []
...

The bahaviour is similar to what we know when running the implicit
oldconfig target "make silentoldconfig".
"make silentoldconfig" are run as part of the kernel build process
if the configuration has changed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-07-25 22:12:50 +02:00
Sam Ravnborg f443d2eccf kconfig: speed up all*config + randconfig
Drop the chatty mode when we generate the all*config, randconfig
configurations.
Ths speeds up the process considerably and noone looked
at the output anyway.
This patch uses the conf_set_all_new_symbols() function
just added to kconfig.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-07-25 22:12:49 +02:00
Roman Zippel dc7862e5a6 kconfig: set all new symbols automatically
Add conf_set_all_new_symbols() which set all symbols (which don't have a
value yet) to a specifed value.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:48 +02:00
Tim Bird a717417e7f kconfig: add diffconfig utility
Diffconfig is a simple utility for comparing two kernel configuration files.
See usage in the script for more info.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:41 +02:00
Randy Dunlap 74fc5c653c kernel-doc: handle/strip __init
Handle __init in functions with kernel-doc notation by stripping the
__init away from the output doc.  This is already being done for
"__devinit".  This patch fixes these kernel-doc error/aborts:

Error(linux-next-20080619//drivers/usb/gadget/config.c:132): cannot understand prototype: 'struct usb_descriptor_header **__init usb_copy_descriptors(struct usb_descriptor_header **src) '
Error(linux-next-20080619//drivers/usb/gadget/config.c:182): cannot understand prototype: 'struct usb_endpoint_descriptor *__init usb_find_endpoint( 	struct usb_descriptor_header **src, 	struct usb_descriptor_header **copy, 	struct usb_endpoint_descriptor *match ) '

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:38 +02:00
Sam Ravnborg 2fb9b1bd9d kbuild: prepare headers_* for arch/$ARCH/include
Factor out the headers_*_all support to a seperate
shell script and add support for arch specific
header files can be located in either

    arch/$ARCH/include/asm
or
    include/asm-$ARCH/

In "make help" always display the headers_* targets.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:33 +02:00
Sam Ravnborg db1bec4f52 kbuild: install all headers when arch is changed
We see some header files that are selected dependent on
the actual architecture so force a reinstallation
of all header files when the arch changes.
This slows down "make headers_check_all" but then
we better reflect reality.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:18 +02:00
Sam Ravnborg 7712401ae9 kbuild: optimize headers_* targets
Move the core functionality of headers_install
and headers_check to two small perl scripts.
The makefile is adapted to use the perl scrip and
changed to operate on all files in a directory.
So if one file is changed then all files in the
directory is processed.

perl were chosen for the helper scripts because this
is pure text processing which perl is good at and
especially the headers_check.pl script are expected to
see changes / new checks implmented.

The speed is ~300% faster on this box.
And the output generated to the screen is now down to
two lines per directory (one for install, one for check)
so it is easier to scroll back after a kernel build.

The perl scripts has been brought to sanity by patient
feedback from: Vegard Nossum <vegard.nossum@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:12:16 +02:00
Sam Ravnborg 88181ec30f kbuild: only one call for include/ in make headers_*
Move it to the top-level file to decide if we install/check
the generic headers or the arch specific headers.

This revealed a long standing bug where "make headers_check_all"
relied on the files in asm/ for the current architecture.
So make headers_check_all is now broken by this commit.

In addition:

o add a simpler way to detect if an arch support
  exporting header files.

o add 'set -e;' so we error out early if
  make headers_check_all fails.

o add sparc64 and cris to arch we do not process
  in make headers_*_all because:

    sparc64 - use sparc to export headers
    cris    - is know seriously broken

Includes suggestions from: David Woodhouse
<dwmw2@infradead.org>.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
2008-07-25 22:11:44 +02:00
Sam Ravnborg 62284a37dc kbuild: code refactoring in Makefile.headerinst
No functional changes just improved readability

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25 22:08:40 +02:00
Sam Ravnborg 283039fb7d kbuild: drop support of ALTARCH for headers_*
ALTARCH is no longer used by any arch(*) so drop
support for this from Makefile.headerinst

Dropping ALTARCH support simplifies Makefile.headerinst

(*) sparc64 uses it but work is ongoing to drop it
and no furter usage is planned.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: David Miller <davem@davemloft.net>
2008-07-25 22:08:39 +02:00
Sam Ravnborg 4e420aa94c kbuild: always unifdef files in headers_install*
unifdef utility is fast enough to warrant that we always
run the scripts through unifdef.

This patch runs all headers listed with header-y and unifdef-y
through unifdef.
Next step is to drop unifdef-y in all Kbuild files and
that can now be done in smaller steps.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Adrian Bunk <bunk@kernel.org>
2008-07-25 22:08:38 +02:00
Linus Torvalds 762b8291be Merge git://git.infradead.org/~dwmw2/random-2.6
* git://git.infradead.org/~dwmw2/random-2.6:
  remove dummy asm/kvm.h files
  firmware: create firmware binaries during 'make modules'.
2008-07-25 12:01:37 -07:00
David Woodhouse 44463f7dd6 firmware: create firmware binaries during 'make modules'.
This means that we no longer need write access to the source tree while
doing 'make modules_install'.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-25 14:26:30 -04:00
Eric Sandeen abddaec56e fix checkstack.pl arch detection
uname -m was leaving a newline in $arch, and not passing the tests.

Also, printing the unknown arch on failure is probably helpful.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:27 -07:00
Eric Sandeen 585e93ae83 find dynamic stack allocations in checkstack.pl
Currently, checkstack.pl only looks for fixed subtractions from the stack
pointer.  However, things like this:

void function(int size)
{
        char stackbuster[size << 2];
...

are certainly worth pointing out, I think.

This could perhaps be done more cleanly, and the following patch only
adds "dynamic" REs for x86 and x86_64, but it works:

0x00b0 crypto_cbc_decrypt_inplace [cbc]:                Dynamic (%rax)
0x00ad crypto_pcbc_decrypt_inplace [pcbc]:              Dynamic (%rax)
0x02f6 crypto_pcbc_encrypt_inplace [pcbc]:              Dynamic (%rax)
0x036c _crypto_xcbc_digest_setkey [xcbc]:               Dynamic (%rax)
...

(Inspired by Keith Owens' old stack-check script)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:26 -07:00
Andy Whitcroft 33cba06573 checkpatch: version 0.21
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:27 -07:00
Andy Whitcroft 234fff6515 checkpatch: types cannot start mid word for pointer tests
When checking spacing for pointer checks the type cannot start in the
middle of a word, ie. this is not 'int * bar':

	x = fooint * bar;

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 292f1a9b34 checkpatch: complex macros need to ignore comments
Ensure we ignore comments in complex macro detection else we incorrectly
report this:

	#define PFM_GROUP_PERM_ANY     -1      /* any user/group */

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 74048ed811 checkpatch: variants -- move the main unary/binary operators to use variants
Now that we have a variants system, move to using that to carry the
unary/binary designation for +, -, &, and *.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 1f65f947a6 checkpatch: add checks for question mark and colon spacing
Add checks for the question mark colon operator spacing, and also check
the other uses of colon.  Colon means a number of things:

 - it introduces the else part of the ?: operator,
 - it terminates a goto label,
 - it terminates the case value,
 - it separates the identifier from the bit size on bit fields, and
 - it is used to introduce option types in asm().

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft d250658658 checkpatch: possible modifiers -- handle multiple modifiers and trailing
Add support for multiple modifiers such as:

	int __one __two foo;

Also handle trailing known modifiers when defecting modifiers:

	int __one foo __read_mostly;

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 0221f55c14 checkpatch: possible types -- known modifiers cannot be types
Ensure we do not inadvertantly load known modifiers up as possible types.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 8ea3eb9a20 checkpatch: handle return types of pointers to functions
Make sure we correctly mark the return type of the pointer to a function
declaration.

    const void *(*sb_tag)(struct sysfs_tag_info *info);

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft b8f96a31f3 checkpatch: macro complexity checks are meaningless in linker scripts
Exclude vmlinux.lds.h from the macro complexity checks.  They will never
apply sanely here.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft d2172eb5bd checkpatch: possible modifiers are not being correctly matched
Although we are finding the added modifier in the declaration below
we are not correctly matching it as a type.  Fix the declaration.

    static void __ref *vmem_alloc_pages(unsigned int order)
    {
    }

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 7429c6903e checkpatch: improve type matcher debug
Improve type matcher debug so we can see what it does match.  As part
of this move us to to using the common debug framework.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 389a2fe57f checkpatch: allow for type modifiers on multiple declarations
Allow for type modifiers mid declaration on multiple declarations:

	struct mxser_mstatus ms, __user *msu = argp;

Reported by Jiri Slaby.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Wolfram Sang 3c232147a7 checkpatch: correct spelling in kfree checks
Correct spelling in the kfree reports.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Greg Kroah-Hartman 4c432a8f01 checkpatch: usb_free_urb() can take NULL
usb_free_urb() can take a NULL, so let's check and warn about that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft f5fe35dd95 checkpatch: condition/loop indent checks
Check to see if the block/statement which a condition or loop introduces
is indented correctly.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:26 -07:00
Andy Whitcroft 53210168fe checkpatch: toughen trailing if statement checks and extend them to while and for
Extend the trailing statement checks to report a trailing semi-colon ';'
as we really want it on the next line and indented so it is really really
obvious.  Also extend the tests to include while and for.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft 8d31cfcecf checkpatch: check spacing for square brackets
Check on the spacing before square brackets.  We should only allow spaces
there if this is part of a type definition or an initialialiser.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft e2a763c20b checkpatch: switch -- report trailing statements on case and default
Report trailing statements on case and default lines.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft f4c014c0de checkpatch: allow printk strings to exceed 80 characters to maintain their searchability
Allow printk strings to break the 80 character width limits, thus keeping
them complete and searchable.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft 548596d523 checkpatch: trailing statement indent: fix end of statement location
Fix end of statement location.  Where the last line of the statement is
replaced we are miss reporting the newly added replacement an incorrectly
indented trailing statement for the negative context.  We are also
incorrectly reporting negative statements generally.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft a3bb97a7ab checkpatch: macros: fix statement counting block end detection
We are incorrectly counting the lines in a block while accumulating
the trailing lines in a macro statement, leading to false positives.
Fix end of block handling and general counting for negative context lines.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft 6ef9b297f6 checkpatch: types: unary -- goto introduces unary context
When we see a goto we enter unary context.  For example:

	goto *h;

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft beae633249 checkpatch: comment detection: ignore macro continuation when detecting associated comments
When looking for an associated comment they may be suffixed by a macro
continuation.  Ignore this.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft d3ddcf471e checkpatch: possible types: __asm__ is never a type
We are false matching __asm__ as a type, and then tripping the external
function checks.  Squash.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Michael Ellerman f3db6639fe checkpatch: add a checkpatch warning for new uses of __initcall().
[apw@shadowen.org: generalise pattern and add tests]
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft c8cb2ca37e checkpatch: types: some types may also be identifiers
Some types such as typedefs may overlap real identifiers.  Be more
targetted about when a type can really exist.  Where it cannot let it be
an identifier.  This prevents false reporting of the minus '-' in unary
context in the following:

	foo[bar->bool - 1];

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft fee61c47d1 checkpatch: return is not a function -- parentheses for casts are ok too
Casts require parentheses so it is possible to have something like this:

	return (int)(*a);

This miss trips the complexity function.  Ensure that the two separate
parenthesised sections are not coelesced.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Andy Whitcroft 6cbb2e7111 checkpatch: Version: 0.20
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:25 -07:00
Adrian Bunk f606ddf42f remove the v850 port
Trying to compile the v850 port brings many compile errors, one of them exists
since at least kernel 2.6.19.

There also seems to be noone willing to bring this port back into a usable
state.

This patch therefore removes the v850 port.

If anyone ever decides to revive the v850 port the code will still be
available from older kernels, and it wouldn't be impossible for the port to
reenter the kernel if it would become actively maintained again.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:24 -07:00
Linus Torvalds 53baaaa968 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
  arm: bus_id -> dev_name() and dev_set_name() conversions
  sparc64: fix up bus_id changes in sparc core code
  3c59x: handle pci_name() being const
  MTD: handle pci_name() being const
  HP iLO driver
  sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
  sysdev: Add utility functions for simple int/ulong variable sysdev attributes
  sysdev: Pass the attribute to the low level sysdev show/store function
  driver core: Suppress sysfs warnings for device_rename().
  kobject: Transmit return value of call_usermodehelper() to caller
  sysfs-rules.txt: reword API stability statement
  debugfs: Implement debugfs_remove_recursive()
  HOWTO: change email addresses of James in HOWTO
  always enable FW_LOADER unless EMBEDDED=y
  uio-howto.tmpl: use unique output names
  uio-howto.tmpl: use standard copyright/legal markings
  sysfs: don't call notify_change
  sysdev: fix debugging statements in registration code.
  kobject: should use kobject_put() in kset-example
  kobject: reorder kobject to save space on 64 bit builds
  ...
2008-07-22 13:13:47 -07:00
Mathieu Desnoyers d35cb360c2 markers: fix duplicate modpost entry
When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b3

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath <roland@redhat.com>
Wenji Huang <wenji.huang@oracle.com>
and
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Roland McGrath <roland@redhat.com>
Cc: Wenji Huang <wenji.huang@oracle.com>
Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22 09:59:41 -07:00
Kay Sievers 22454cb99f pnp: add acpi:* modalias entries
Along with the non-modalias conformant "pnp:*" aliases, we add "acpi:*"
entries to PNP drivers, to allow module autoloading by ACPI PNP device
entries, which export proper modalias information, without any specific
userspace modprobe mangling.

Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 21:54:53 -07:00
David Woodhouse 7259d936c6 Update scripts/Makefile.fwinst to cope with older make
Also fix unwanted rebuilds of the firmware/ihex2fw tool by including
the .ihex2fw.cmd file when present.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Reported-and-tested-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-17 09:12:04 -07:00
Linus Torvalds 5a86102248 Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6
* 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6: (64 commits)
  firmware: convert sb16_csp driver to use firmware loader exclusively
  dsp56k: use request_firmware
  edgeport-ti: use request_firmware()
  edgeport: use request_firmware()
  vicam: use request_firmware()
  dabusb: use request_firmware()
  cpia2: use request_firmware()
  ip2: use request_firmware()
  firmware: convert Ambassador ATM driver to request_firmware()
  whiteheat: use request_firmware()
  ti_usb_3410_5052: use request_firmware()
  emi62: use request_firmware()
  emi26: use request_firmware()
  keyspan_pda: use request_firmware()
  keyspan: use request_firmware()
  ttusb-budget: use request_firmware()
  kaweth: use request_firmware()
  smctr: use request_firmware()
  firmware: convert ymfpci driver to use firmware loader exclusively
  firmware: convert maestro3 driver to use firmware loader exclusively
  ...

Fix up trivial conflicts with BKL removal in drivers/char/dsp56k.c and
drivers/char/ip2/ip2main.c manually.
2008-07-14 16:54:07 -07:00
David Woodhouse 751851af7a Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Conflicts:

	sound/pci/Kconfig
2008-07-14 15:51:11 -07:00
Linus Torvalds e18425a0ab Merge branch 'tracing/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (228 commits)
  ftrace: build fix for ftraced_suspend
  ftrace: separate out the function enabled variable
  ftrace: add ftrace_kill_atomic
  ftrace: use current CPU for function startup
  ftrace: start wakeup tracing after setting function tracer
  ftrace: check proper config for preempt type
  ftrace: trace schedule
  ftrace: define function trace nop
  ftrace: move sched_switch enable after markers
  ftrace: prevent ftrace modifications while being kprobe'd, v2
  fix "ftrace: store mcount address in rec->ip"
  mmiotrace broken in linux-next (8-bit writes only)
  ftrace: avoid modifying kprobe'd records
  ftrace: freeze kprobe'd records
  kprobes: enable clean usage of get_kprobe
  ftrace: store mcount address in rec->ip
  ftrace: build fix with gcc 4.3
  namespacecheck: fixes
  ftrace: fix "notrace" filtering priority
  ftrace: fix printout
  ...
2008-07-14 14:49:54 -07:00
Cornelia Huck 7e9db9eaef [S390] cio: Introduce modalias for css bus.
Add modalias and subchannel type attributes for all subchannels.
I/O subchannel specific attributes are now created in
io_subchannel_probe(). modalias and subchannel type are also
added to the uevent for the css bus. Also make the css modalias
known.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2008-07-14 10:02:05 +02:00
David Woodhouse 8bd6b2229b ihex: add ihex2fw tool for converting HEX files into firmware images
Not the straight conversion to binary which objcopy can do for us, but
actually representing each record with its original {addr, length},
because some drivers need that information preserved.

Fix up 'firmware_install' to be able to build $(hostprogs-y) too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:47:41 +01:00
David Woodhouse 88ecf814c4 firmware: Add firmware installation to modules_install, add firmware_install
For 'make modules_install', install any firmware required by
the modules which are being installed.

Also add a 'make firmware_install' target which doesn't depend on the
configuration, but installs _all_ available in-kernel-tree firmware into
$(INSTALL_FW_PATH), which defaults to /lib/firmware. This is intended
for distributors to make arch-independent (and config-independent)
packages containing firmware.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10 14:47:34 +01:00
Ingo Molnar e765ee90da Merge branch 'linus' into tracing/ftrace 2008-06-16 11:15:58 +02:00
Sam Ravnborg 4d7365d664 kbuild: ignore powerpc specific symbols in modpost
Kumar Gala <galak@kernel.crashing.org> wrote:
We have a case in powerpc in which we want to link some library
routines with all module objects.  The routines are intended for
handling out-of-line function call register save/restore so having
them as EXPORT_SYMBOL() is counter productive (we do also need to
link the same "library" code into the kernel).

Without this patch a powerpc build would error out and fail
to build modules with the added register save/restore module.

There were two obvious solutions:
1) To link the .o file before the modpost stage
2) To ignore the symbols in modpost

Option 1) was ruled out because we do not have any separate
linking stage for single file modules.

This patch implements option 2 - and do so only for powerpc.

The symbols we ignore are all undefined symbols named:
_restgpr_*, _savegpr_*, _rest32gpr_*, _save32gpr_*

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
2008-06-12 16:41:48 +02:00
Andy Whitcroft c45dcabd26 update checkpatch.pl to version 0.19
This version is a bit of a whopper.  This version brings a few new checks,
improvements to a number of checks mostly through modifications to the
way types are parsed, several fixes to quote/comment handling, as well as
the usual slew of fixes for false positives.

Of note:
 - return is not a function and is now reported,
 - preprocessor directive detection is loosened to match C99 standard,
 - we now intuit new type modifiers, and
 - comment handling is much improved

Andy Whitcroft (18):
      Version: 0.19
      fix up a couple of missing newlines in reports
      colon to parenthesis spacing varies on asm
      values: #include is a preprocessor statement
      quotes: fix single character quotes at line end
      add typedef exception for the non-pointer "function types"
      kerneldoc parameters must be on one line, relax line length
      types: word boundary is not always required
      improved #define bracketing reports
      uninitialized_var is an annotation not a function name
      possible types: add possible modifier handling
      possible types: fastcall is a type modifier
      types: unsigned is not a modifier on all types
      static/external initialisation to zero should allow modifiers
      checkpatch: fix recognition of preprocessor directives -- part 2
      comments: fix inter-hunk comment tracking
      return is not a function
      do not report include/asm/foo.h use in include/linux/foo.h
      return is not a function -- tighten test

[jengelh@computergmbh.de: fix recognition of preprocessor directives]
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06 11:29:09 -07:00
Linus Torvalds b09916e4f0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix $(src) assignmnet with external modules
2008-06-02 15:26:02 -07:00
Sam Ravnborg 96d97f262a kbuild: fix $(src) assignmnet with external modules
When we introduced support for KBUILD_EXTRA_SYMBOLS
we started to include the externam module's kbuild
file when doing the final modpost step.

As external modules often do:
ccflags-y := -I$(src)

We had problems because $(src) was unassinged and
gcc then used the next parameter for -I resulting in
strange build failures.

Fix is to assign $(src) and $(obj) when building
external modules.

This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tvrtko <tvrtko.ursulin@sophos.com>
Cc: Andrea Arcangeli <andrea@qumranet.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
2008-05-31 22:28:40 +02:00
Linus Torvalds 14d03fd98e Mark 'scripts/decodecode' executable
.. because it is.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30 14:02:21 -07:00
Gabriel C 656a3f7978 scripts/ver_linux use 'gcc -dumpversion'
These magic greps and hacks in ver_linux to get the gcc version always break after some gcc releases.

Since now gcc >4.3 allows compiling with '--with-pkgversion' ( which can be everything 'My Cool Gcc' or something )
ver_linux will report random junk for these.

Simply use 'gcc -dumpversion' to get the gcc version which should always work.

Signed-off-by: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-25 23:02:43 +02:00
Steven Rostedt 656ee82cc8 kbuild: create new CFLAGS_REMOVE_(basename).o option
We currently have a way to add special CFLAGS to code, but we do not have a
way to remove them if needed.

With the case of ftrace, some files should simply not be profiled. Adding
the -pg flag to these files is simply a waste, and adding "notrace" to each
and every function is ugly.

Currently we put in "Makefile turd" [1] to stop the compiler from adding -pg
to certain files. This was clumsy and awkward.

This patch now adds the revese of CFLAGS_(basename).o with
CFLAGS_REMOVE_(basename).o.  This allows developers to prevent certain
CFLAGS from being used to compile files. For example, we can now do

CFLAGS_REMOVE_string.o = -pg

to remove the -pg option from the string.o file in the lib directory.

Note: a space delimited list of options may be added to the REMOVE macro.

[1] - what David Miller called the workaronud to remove -pg

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 22:43:33 +02:00
Christophe Jaillet 107f43a0f7 kconfig: incorrect 'len' field initialisation ?
1) The field 'len' of the 'gstr' structure seems to track the size of the memory
already allocated for the "growable string". So the value of this field should be
the same as the 'malloc()' just above, shouldn't it ?

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-19 20:14:49 +02:00
Randy Dunlap 7b97887eab kernel-doc: allow unnamed bit-fields
Allow for unnamed bit-fields and skip them instead of printing an
erroneous warning message for them, such as:

Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32'

which contains:

struct tm_scsw {
	u32 :1;

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-19 20:12:40 +02:00
Sam Ravnborg aab34ac858 kbuild: filter away debug symbols from kernel symbols
Andi Kleen <andi@firstfloor.org>
reported that he saw a lot of symbols like this:

0000000000000b24 N DW.aio.h.903a6d92.2
0000000000000bce N DW.task_io_accounting.h.8d8de327.0
0000000000000bec N DW.hrtimer.h.c23659c6.0

in his System.map / kallsyms output.

Simple solution is to skip all debugging
symbols (they are marked 'N').

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Paulo Marques <pmarques@grupopie.com>
2008-05-19 20:07:58 +02:00
Andi Kleen fd1db0a313 kbuild: disable modpost warnings for linkonce sections
Disable modpost warnings for linkonce sections

My build gives lots of warnings like

WARNING: sound/core/snd.o (.gnu.linkonce.wi.mpspec_def.h.30779716): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
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.

But for .linkonce. duplicated sections are actually ok and expected.
So just disable the warning for this case.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-11 10:10:51 +02:00
Sam Ravnborg c4143a8303 kconfig: fix MAC OS X warnings in menuconfig
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Timur Tabi <timur@freescale.com>
2008-05-04 21:03:20 +02:00
Jean Delvare ac55182899 modpost: i2c aliases need no trailing wildcard
Not all device types need a wildcard at the end of their module
aliases. In particular, for i2c module aliases, the trailing wildcard
is not only unneeded, it could also cause the wrong driver to be
loaded.

As I2C devices have no IDs, i2c module aliases are simple, arbitrary
device names. For example:

$ /sbin/modinfo lm90
filename:       /lib/modules/2.6.25-git18/kernel/drivers/hwmon/lm90.ko
author:         Jean Delvare <khali@linux-fr.org>
description:    LM90/ADM1032 driver
license:        GPL
vermagic:       2.6.25-git18 mod_unload
depends:        hwmon
alias:          i2c:lm90*
alias:          i2c:adm1032*
alias:          i2c:lm99*
alias:          i2c:lm86*
alias:          i2c:max6657*
alias:          i2c:adt7461*
alias:          i2c:max6680*
$

This would cause trouble if one I2C chip name matches the beginning of
another I2C chip name and both chips are supported by different
drivers. For example, an i2c device named lm9042 would cause the lm90
driver to be loaded, while it doesn't support that device. This case
has yet to be seen in practice, but still, I'd like to fix it now. The
cleanest fix is to remove the trailing wildcard from i2c module aliases.

Here's a patch doing this.

Not all device type aliases need a trailing wildcard, in particular
the i2c aliases don't. Don't add a wildcard by default in do_table(),
instead let each device type handler add it if needed.

I have tested types acpi, dmi, eisa, i2c, ide, ieee1394, input, pci,
pcmcia, platform, pnp, scsi, serio, ssb and usb. Other types (ccw, of,
vio, parisc, sdio and virtio) are untested.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-04 09:24:47 +02:00
Sam Ravnborg b44158de9e kconfig: made check-lxdialog more portable
OS-X shell did not like 'echo -e' so implement
suggestion from Al Viro to use a more portable construct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-By: Timur Tabi <timur@freescale.com>
2008-05-01 19:29:47 +02:00
Bryan Wu c6495aaabf kallsyms: nuke all ChangeLog, this should be logged by git
Pointed out by Paulo:
  "When I wrote this initially, it was a mistake to add a Changelog in
   the first place, but I didn't know better at the time.

   If you're going to make changes to this file, please remove all the
   Changelog, instead of adding more entries to it.  The 'Changelog'
   should be kept by the version control system, and not the source code
   itself."

Cc: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:31 -07:00
Jean Delvare d2653e9273 i2c: Add support for device alias names
Based on earlier work by Jon Smirl and Jochen Friedrich.

This patch allows new-style i2c chip drivers to have alias names using
the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
point, the old i2c driver binding scheme (driver_name/type) is still
supported.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jochen Friedrich <jochen@scram.de>
Cc: Jon Smirl <jonsmirl@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
2008-04-29 23:11:39 +02:00
Andy Whitcroft 9c9ba34ee3 update checkpatch.pl to version 0.18
This version brings a few fixes for the extern checks, and a couple of
new checks.

Of note:
 - false is now recognised as a 0 assignment in static/external
   assignments,
 - printf format strings including %L are reported,
 - a number of fixes for the extern in .c file detector which had
   temporarily lost its ability to detect variables; undetected due to
   the loss of its test.

Andy Whitcroft (8):
      Version: 0.18
      false should trip 0 assignment checks
      tests: reinstate missing tests
      tests: allow specification of the file extension for a test
      fix extern checks for variables
      check for and report %Lu, %Ld, and %Li
      ensure we only start a statement on lines with some content
      extern spacing

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:05 -07:00
Andy Whitcroft 171ae1a491 update checkpatch.pl to version 0.17
This version brings improvements to external declaration detection, fixes to
quote tracking, fixes to unary tracking, some clarification of wording, and
the usual slew of fixes for false positives.

Of note:
 - much better unary tracking across preprocessor directives
 - UTF8 checks highlight the character at fault
 - widening of mutex detection

Andy Whitcroft (17):
      Version: 0.17
      values: __attribute__ carries through the previous type
      quotes: should only follow "positive" lines
      clarify the indent tabs over spaces wording
      loosen NR_CPUS check for array range initialisers
      detect external function declarations without an extern prefix
      function declaration arguments should be with the identifier
      DEFINE_MUTEX should report in line with struct mutex
      NR_CPUS is valid in preprocessor statements
      comment detection should not start on the @@ line
      types: add support for #undef
      tighten mutex/completion reports to usage
      allow export of function pointers
      values: preprocessor #define is out of line maintain values
      values: #define does not always have parentheses
      unary '*' may be const
      utf8 checks should report location of the invalid character

Wolfram Sang (1):
      make checkpatch.pl really skip <asm/irq.h>

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:05 -07:00
Joe Perches ee8900c9c7 scripts/Lindent: support gnu indent v2.2.10
The new version of indent supports positioning labels in column 1
using "-il0"

http://www.nabble.com/Release-2.2.10-of-GNU-Indent-td15990700.html

Add "-il0" if indent version >= 2.2.10

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:04 -07:00
Roman Zippel 5a1aa8a1af kconfig: add named choice group
As choice dependency are now fully checked, it's quite easy to add support
for named choices. This lifts the restriction that a choice value can only
appear once, although it still has to be within the same group,
but multiple choices can be joined by giving them a name.
While at it I cleaned up a little the choice type logic to simplify it a
bit.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 23:05:48 +02:00
Roman Zippel 4898117886 kconfig: fix choice dependency check
Properly check the dependency of choices as a group.
Also fix that sym_check_deps() correctly terminates the dependency loop
error check (otherwise it would continue printing the dependency chain).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 23:04:57 +02:00
Felix Fietkau b5a5e4c732 kbuild: fix unportability in gen_initramfs_list.sh
On a Mac OS X machine the output of ls -l is different from a standard
Linux machine. Use readlink instead of parsing a hardcoded field number
from the ls output.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 22:50:51 +02:00
Roel Kluin 79d6e539df kconfig: reversed borderlines in inputbox
Fix reversal of dlg.border.atr and dlg.dialog.atr for draw_box()
Makes the inputbox look like expected

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-28 22:27:26 +02:00
Randy Dunlap 46b958eb80 kernel-doc: detect trailing kernel-doc line trash
Print a warning when a kernel-doc comment block ends with text on the same
line as the ending comment characters, e.g.:

 * this text is lost. */

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>
2008-04-28 08:58:48 -07:00
Randy Dunlap 94dc7ad550 kernel-doc: detect/prevent duplicate doc section names
I saw this problem recently.  With this kernel-doc:

 * Note: some important info
 *
 * Note: other important info

kernel-doc uses the "section name" (preceding the ':', like "Note") as a hash
key for storing the descriptive text ("blah important info").  It is (was)
possible to have duplicate (colliding) section names, without any kind of
warning or error.

kernel-doc happily used the latter descriptive text for all instances of
printing the <section-name> descriptive text and the former important info
was lost.

One way to "fix" this is to modify the kernel-doc comments, e.g.:

 * Note1: foo bar
 *
 * Note.2: blah zay

For now, kernel-doc will signal an error when it sees colliding section names
like this.

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>
2008-04-28 08:58:48 -07:00
Adrian Bunk f5093913c0 kbuild: scripts/Makefile.modpost typo fix
-EVIUSER  ;-)

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-26 21:08:25 +02:00
Sam Ravnborg 2fa3656829 kbuild: soften MODULE_LICENSE check
Only modules that has other MODULE_* content
shall have the MODULE_LICENSE() tag.

This fixes allmodconfig build on my box.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-26 21:07:26 +02:00
Linus Torvalds 37b05b1798 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (120 commits)
  usb: don't update devnum for wusb devices
  wusb: make ep0_reinit available for modules
  wusb: devices dont use a set address
  wusb: teach choose_address() about wireless devices
  wusb: add link wusb-usb device
  wusb: add authenticathed bit to usb_dev
  USB: remove unnecessary type casting of urb->context
  usb serial: more fixes and groundwork for tty changes
  USB: replace remaining __FUNCTION__ occurrences
  USB: usbfs: export the URB_NO_INTERRUPT flag to userspace
  USB: fix compile problems in ehci-hcd
  USB: ehci: qh_completions cleanup and bugfix
  USB: cdc-acm: signedness fix
  USB: add documentation about callbacks
  USB: don't explicitly reenable root-hub status interrupts
  USB: OHCI: turn off RD when remote wakeup is disabled
  USB: HCDs use the do_remote_wakeup flag
  USB: g_file_storage: ignore bulk-out data after invalid CBW
  USB: serial: remove endpoints setting checks from core and header
  USB: serial: remove unneeded number endpoints settings
  ...
2008-04-25 12:40:57 -07:00
Sam Ravnborg 4217516e52 kconfig: fix broken target update-po-config
Massimo Maiurana reported:
In the latest kernel "make update-po-config" fails because it tries
to open arch/Kconfig/Kconfig, since the ls command doesn't
distinguish between files and directories.

Cc: Massimo Maiurana <maiurana@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 21:15:41 +02:00
Richard Hacker 0d96fb20b7 kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS
This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS.
The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS
is used when calling scripts/mod/modpost during stage 2 of the Kbuild
process for non-kernel-tree modules.

Signed-off-by: Richard Hacker <lerichi@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:45:26 +02:00
Richard Hacker 2d04b5ae1b kbuild: support loading extra symbols in modpost
This patch adds a new command line option -E to modpost, expecting a symbol
file as an argument which is read prior to symbol processing. -E can be
supplied multiple times for as many files as is needed.

When building kernel modules that depend on other modules not in the main
kernel tree, modpost complains about undefined symbols:
# make -C /path/to/linux/kernel M=/path/to/my/module
...
Building modules, stage 2.
....
WARNING: "rt_copy_buf" [/home/rich/osc_etl_rtw/osc_kmod.ko] undefined!
...etc

This situation occurs when modpost processes the new module's symbols. When
it finds symbols not exported by the mainline kernel, it issues this warning.

The patch adds a new command line option -e to modpost which expects a symbol
file as an argument. The symbols listed in this file are added to modpost's
symbol tables during startup. -e can be supplied as often as required.

This patch works together with the second patch. It introduces a new make
variable, KBUILD_EXTRA_SYMBOLS, which is used when calling modpost.

Signed-off-by: Richard Hacker <lerichi@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:35:47 +02:00
Robert P. J. Day 3156fd0529 kbuild: fix some minor typoes
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-04-25 20:18:48 +02:00
Sam Ravnborg eed7d2798c kbuild: error out on missing MODULE_LICENSE
Adrian Bunk suggested a build time check for
missing MODULE_LICENSE annotation in modules.
The build time check is fatal as we really
want this fixed for all modules.
In-tree modules should all have been fixed up by now.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
2008-04-25 20:13:30 +02:00
Greg Kroah-Hartman c2010a3b9e checkpatch: usb_free_urb() can take NULL
usb_free_urb() can take a NULL, so let's check and warn about that.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:33 -07:00
Kay Sievers 0c81eed4b9 PNP: add all PNP card device id's as individual aliases
The current PNP combined card + devices module aliase can
never ever match anything, because these values are not available
all at the same time to request a module.

Instead of adding the combined alias, we add the device id's
all as individual aliases. Device id's are exported by the PNP
bus and can now properly used to request the loading of a
matching module.

The module snd-sbawe currently exports aliases, which can never
match anything:
  alias: pnp:cCTLXXXXdCTL0045dCTL0022*
  alias: pnp:cCTLXXXXdCTL0044dCTL0023*
  alias: pnp:cCTLXXXXdCTL0042dCTL0022*
  alias: pnp:cCTLXXXXdCTL0041dCTL0021*
  alias: pnp:cCTLXXXXdCTL0031dCTL0021*
  alias: pnp:cCTL00eddCTL0041dCTL0070*
  alias: pnp:cCTL00e9dCTL0045dCTL0022*
  alias: pnp:cCTL00e4dCTL0045dCTL0022*
  alias: pnp:cCTL00c7dCTL0045dCTL0022*
  alias: pnp:cCTL00c5dCTL0045dCTL0022*
  alias: pnp:cCTL00c3dCTL0045dCTL0022*
  alias: pnp:cCTL00c1dCTL0042dCTL0022*
  alias: pnp:cCTL00b2dCTL0044dCTL0023*
  alias: pnp:cCTL009edCTL0044dCTL0023*
  alias: pnp:cCTL009ddCTL0042dCTL0022*
  alias: pnp:cCTL009fdCTL0041dCTL0021*
  alias: pnp:cCTL009cdCTL0041dCTL0021*
  alias: pnp:cCTL009adCTL0041dCTL0021*
  alias: pnp:cCTL0054dCTL0031dCTL0021*
  alias: pnp:cCTL0048dCTL0031dCTL0021*
  alias: pnp:cCTL0047dCTL0031dCTL0021*
  alias: pnp:cCTL0046dCTL0031dCTL0021*
  alias: pnp:cCTL0045dCTL0031dCTL0021*
  alias: pnp:cCTL0044dCTL0031dCTL0021*
  alias: pnp:cCTL0043dCTL0031dCTL0021*
  alias: pnp:cCTL0042dCTL0031dCTL0021*
  alias: pnp:cCTL0039dCTL0031dCTL0021*
  alias: pnp:cCTL0035dCTL0031dCTL0021*

With this patch it exports only the device id's, as properly
matchable aliases:
  alias: pnp:dCTL0070*
  alias: pnp:dCTL0045*
  alias: pnp:dCTL0023*
  alias: pnp:dCTL0044*
  alias: pnp:dCTL0022*
  alias: pnp:dCTL0042*
  alias: pnp:dCTL0041*
  alias: pnp:dCTL0021*
  alias: pnp:dCTL0031*

Now, the exported value of the PNP bus can be used to autoload
a matching module:
  $ modprobe --first-time -n -v pnp:dCTL0045
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-rawmidi.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-hwdep.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb-common.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-csp.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-dsp.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/opl3/snd-opl3-lib.ko
  insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sbawe.ko

  $ grep CTL0045 /sys/bus/pnp/devices/*/id
  /sys/bus/pnp/devices/01:01.00/id:CTL0045

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19 19:10:22 -07:00
Andy Whitcroft 773647a09a update checkpatch.pl to version 0.16
This version brings proper quote tracking across lines, and brings the
handling of comments into the same mechanism ensuring nesting is correctly
handled.  It brings the usual flurry of fixes for false positives.  It also
brings a number of new checks.  The most contentious change will likely be
the checks for NR_CPUS as this throws some new warnings in kernel/sched.c.

Of note:
 - all new quote tracking across lines
 - all new comment tracking
 - new more direct, less ambigious wording for some warnings
 - recommends mutexes and completions over semaphores
 - recommends strict_strto* over simple_strto*
 - report on direct use of NR_CPUS

Andy Whitcroft (22):
      Version: 0.16
      string quote tracking should cross line boundaries
      check spacing round -> correctly across newlines
      checks for linux/ against asm/ include files should be warnings
      standardise on 'required' and 'prohibited'
      take the first end of condition when parsing statements
      values: cope with unbalanced brackets
      preprocessor #elif is not a function
      preprocessor #if should not trigger trailing statement checks
      test: allow us to limit output to a single error
      recommend real mutexes over semaphores
      asm checks should mirror those for __asm__
      warn on semaphores being used in place of completions
      trailing ; on control structure should ignore do {} while ();
      recommend strict_strtoX over simple_strtoX
      redo comment handling as a quote type
      use of NR_CPUS is normally wrong
      consistant spacing should only be about spaces
      if brace check suppression should only apply to the top-levels
      use tr/// to align spacing for operators
      move to using four parameter form of substr
      check and report modifications to include/asm

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-28 14:45:22 -07:00
Sam Ravnborg 4ce6efed48 kbuild: soften modpost checks when doing cross builds
The module alias support in the kernel have a consistency
check where it is checked that the size of a structure
in the kernel and on the build host are the same.
For cross builds this check does not make sense so detect
when we do cross builds and silently skip the check in these
situations.
This fixes a build bug for a wireless driver when cross building
for arm.

Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: stable@kernel.org
2008-03-23 21:38:54 +01:00
Randy Dunlap bd0e88e517 kernel-doc: set verbose mode via environment
Honor the environment variable "KBUILD_VERBOSE=1" (as set by make V=1) to
enable verbose mode in scripts/kernel-doc.  Useful for getting more info and
warnings from kernel-doc.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-13 13:11:43 -07:00
Andy Whitcroft cf655043d4 update checkpatch.pl to version 0.15
This version brings a number of minor fixes updating the type detector and
the unary tracker.  It also brings a few small fixes for false positives.
It also reverts the --file warning.  Of note:

 - limit CVS checks to added lines
 - improved type detections
 - fixes to the unary tracker

Andy Whitcroft (13):
      Version: 0.15
      EXPORT_SYMBOL checks need to accept array variables
      export checks must match DECLARE_foo and LIST_HEAD
      possible types: cleanup debugging missing line
      values: track values through preprocessor conditional paths
      typeof is actually a type
      possible types: detect definitions which cross lines
      values: include line numbers on value debug information
      values: ensure we find correctly record pending brackets
      values: simplify the brace history stack
      CVS keyword checks should only apply to added lines
      loosen spacing for comments
      allow braces for single statement blocks with multiline conditionals

Harvey Harrison (1):
      checkpatch: remove fastcall

Ingo Molnar (1):
      checkpatch.pl: revert wrong --file message

Uwe Kleine-Koenig (1):
      fix typo "goot" -> "good"

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Joel Schopp <jschopp@austin.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:09 -08:00
Richard Kennedy 00d6296145 kernel-doc: fix function-pointer-parameter parsing
When running "make htmldocs" I'm seeing some non-fatal perl errors caused
by trying to parse the callback function definitions in blk-core.c.

The errors are "Use of uninitialized value in concatenation (.)..."
in combination with:
Warning(linux-2.6.25-rc2/block/blk-core.c:1877): No description found for parameter ''

The function pointers are defined without a * i.e.
int (drv_callback)(struct request *)

The compiler is happy with them, but kernel-doc isn't.

This patch teaches create_parameterlist in kernel-doc to parse this type of
function pointer definition, but is it the right way to fix the problem ?
The problem only seems to occur in blk-core.c.

However with the patch applied, kernel-doc finds the correct parameter
description for the callback in blk_end_request_callback, which is doesn't
normally.

I thought it would be a bit odd to change to code to use the more normal
form of function pointers just to get the documentation to work, so I fixed
kernel-doc instead - even though this is teaching it to understand code
that might go away (The comment for blk_end_request_callback says that it
should not be used and will removed at some point).

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
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>
2008-02-23 17:12:16 -08:00
Geert Uytterhoeven b1d2675a64 kbuild: fix reversed symbol name order in modpost
XXXINIT_TO_INIT and XXXEXIT_TO_EXIT warnings use the reversed symbol name order
in the suggestion, e.g.:

    WARNING: vmlinux.o(.meminit.text+0x36c): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
    The function __meminit free_area_init_core() references
    a function __init setup_usemap().
    If free_area_init_core is only used by setup_usemap then
    annotate free_area_init_core with a matching annotation.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-19 20:45:14 +01:00
Linus Torvalds 230b548c15 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED
  kbuild: fix building vmlinux.o
  kbuild: allow -fstack-protector to take effect
  kconfig: fix select in combination with default
2008-02-18 15:41:05 -08:00
Harvey Harrison 34ff8a52fa kernel-doc: remove fastcall
fastcall is gone from the tree, no need to adjust the function prototypes
anymore for this.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-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>
2008-02-14 20:58:04 -08:00
Mathieu Desnoyers b2e3e658b3 Linux Kernel Markers: create modpost file
This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
to the Module.symvers file, the build will now write a Module.markers file
when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
format string of each marker, separated by \t characters.  This simple text
file can be used by offline build procedures for instrumentation code,
analogous to how System.map and Module.symvers can be useful to have for
kernels other than the one you are running right now.

The strings are made easy to extract by having the __trace_mark macro define
the name and format together in a single array called __mstrtab_* in the
__markers_strings section.  This is straightforward and reliable as long as
the marker structs are always defined by this macro.  It is an unreasonable
amount of hairy work to extract the string pointers from the __markers section
structs, which entails handling a relocation type for every machine under the
sun.

Mathieu :
- Ran through checkpatch.pl

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: David Smith <dsmith@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-13 16:21:20 -08:00
Roman Zippel 587c90616a kconfig: fix select in combination with default
> The attached .config (with current -git) results in a compile
> error since it contains:
>
> CONFIG_X86=y
> # CONFIG_EMBEDDED is not set
> CONFIG_SERIO=m
> CONFIG_SERIO_I8042=y
>
> Looking at drivers/input/serio/Kconfig I simply don't get how this
> can happen.

You've hit the rather subtle rules of select vs default. What happened is
that SERIO is selected to m, but SERIO_I8042 isn't selected so the default
of y is used instead.
We already had the problem in the past that select and default don't work
well together, so this patch cleans this up and makes the rule hopefully
more straightforward. Basically now the value is calculated like this:

	(value && dependency) || select

where the value is the user choice (if available and the symbol is
visible) or default.

In this case it means SERIO and SERIO_I8042 are both set to y due to their
default and if SERIO didn't had the default, then the SERIO_I8042 value
would be limited to m due to the dependency.

I tested this patch with more 10000 random configs and above case is the
only the difference that showed up, so I hope there is nothing that
depended on the old more complex and subtle rules.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Tested-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-13 22:30:09 +01:00
Sam Ravnborg fab1e310d3 kbuild: fix make V=1
When make -s support were added to filechk to
combination created with make V=1 were not
covered.
Fix it by explicitly cover this case too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Mike Frysinger <vapier@gentoo.org>
2008-02-11 17:43:54 +01:00
Michal Sojka ed2c9fa53b Kbuild: Fix deb-pkg target to work with kernel versions ending with -<text-without-digit>
If CONIFIG_LOCALVERSION is set for example to -loop, the following error
message was generated.

dpkg-deb - error: Debian revision (`loop') doesn't contain any digits
dpkg-deb: 1 errors in control file

The patch solves this by adding a numeric revision to package version.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:51:47 +01:00
Mike Frysinger d75f4c683f kbuild: silence CHK/UPD messages according to $(quiet)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:43:58 +01:00
Geert Uytterhoeven 7c0ac495e3 kbuild/modpost: Use warn() for announcing section mismatches
modpost: Use warn() for announcing section mismatches, for easy grepping for
warnings in build logs.

Also change an existing call from fprintf() to warn() while we're at it.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:43:58 +01:00
Uwe Kleine-König ff739b611f Add binoffset to gitignore
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:43:58 +01:00
Sam Ravnborg f666751a0a kbuild/modpost: improve warnings if symbol is unknown
If we cannot determine the symbol then print
(unknown) to hint the reader that we failed to
find the symbol.
This happens with REL relocation records
in arm object files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-09 10:43:58 +01:00
Andy Whitcroft 13214adf73 update checkpatch.pl to version 0.14
This version brings the remainder of the queued fixes.  A number of fixes
for items missed reported by Andrew Morton and others.  Also a handful
of new checks and fixes for false positives.  Of note:

 - new warning associated with --file to try and avoid cleanup only patches,
 - corrected handling of completly empty files,
 - corrected report handling with multiple files,
 - handling of possible types in the face of multiple declarations,
 - detection of unnessary braces on complex if statements (where present), and
 - all new comment spacing handling.

Andi Kleen (1):
      Introduce a warning when --file mode is used

Andy Whitcroft (14):
      Version: 0.14
      clean up some space violations in checkpatch.pl
      a completly empty file should not provoke a whinge
      reset report lines buffers between files
      unary ++/-- may abutt close braces
      __typeof__ is also unary
      comments: revamp comment handling
      add --summary-file option adding filename to summary line
      trailing backslashes are not trailing statements
      handle operators passed as parameters such as to ASSERTCMP
      possible types -- enhance debugging
      check for boolean operations with constants
      possible types: handle multiple declarations
      detect and report if statements where all branches are single statements

Arjan van de Ven (1):
      quiet option should not print the summary on no errors

Bartlomiej Zolnierkiewicz (1):
      warn about using __FUNCTION__

Timur Tabi (1):
      loosen spacing checks for __asm__

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:42 -08:00
Andy Whitcroft c2fdda0dfb update checkpatch.pl to version 0.13
This version brings a large number of fixes which have built up over
the Christmas period.  Mostly these are fixes for false positives, both
through improvments to unary checks and possible type detection.  It
also brings new checks for while location and CVS keywords.  Of note:

  - a number of fixes to unary detection
  - detection of a number of new forms of types to improve type matching
  - better inline handling
  - recognision of '%' as an operator

Andy Whitcroft (28):
      Version: 0.13
      unary detection: maintain bracket state across lines
      move to pre-sanitising the entire file
      the text of a #error statement should be treated like it is in quotes
      line sanitisation needs to target double backslash correctly
      tighten comment guestimation for lines starting ' * '
      debug: add a debug framework
      prevent unclosed single quotes from spreading
      add % as an operator
      the text of a #warning statement should be treated like it is in quotes
      possible matching applies in typedefs
      single statement block checks must not trigger when two or more statements
      possible types: local variables may also be const
      treat inline as a type attribute to even when out of place
      possible types: sparse annotations are valid indicators
      possible types: beef up the possible type testing
      check for hanging while statements on the wrong line
      utf8 checks need to occur against the raw lines
      function brace checks should use any whitespece matches
      comments should take up space in the line when sanitised
      remove debugging from if assignment checks
      possible types -- ensure we detect all pointer casts
      fix tests for function spacing in the presence of #define
      clean up the UTF-8 error message to be clearer
      test-lib: invert the status report, output success counts
      detect and report CVS keywords
      tests: break out tests
      Add $Id$ to the CVS keyword checks

Benny Halevy (1):
      checkpatch.pl: recognize the #elif preprocessor directive

Geert Uytterhoeven (1):
      print the filenames of patches where available

Mauro Carvalho Chehab (1):
      Fix missing \n in checkpatch.pl

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:36 -08:00
Randy Dunlap 77cc23b8c7 kernel-doc: warn on badly formatted short description
Make kernel-doc warn when a function/struct/union/typedef does not contain
a properly formatted short description, such as:
 * scsi_devinfo: set up the dynamic device list
or
 * scsi_devinfo -

This warning is only generated when verbose (-v) mode is used.

Also explain the -v command line option in the -h output.

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>
2008-02-07 08:42:17 -08:00
Randy Dunlap 792aa2f2cc kernel-doc: prevent duplicate description: output
Prevent duplicate output of a Description: section when there is a "blank"
("*") line between the initial function name/description line and the
"Description:" header.

Test case:  drivers/scsi/scsi_devinfo.c::scsi_init_devinfo().

Rob Landley hit this while he was producing SCSI kernel-doc.

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>
2008-02-07 08:42:17 -08:00
Randy Dunlap 94b3e03c87 kernel-doc: fix for vunmap function prototype
Fix kernel-doc function prototype parsing which was exposed by vunmap() by
allowing more than one '*' before the function name.

Error(linux-2.6.24-mm1//mm/vmalloc.c:438): cannot understand prototype: 'struct page **vunmap(const void *addr) '

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>
2008-02-07 08:42:16 -08:00
Joern Engel 2b54aaef7a Claim maintainership for block2mtd and update email addresses
I have been prime author and maintainer of block2mtd from day one, but
neither MAINTAINERS nor the module source makes this fact clear.  And while
I'm at it, update my email addresses tree-wide, as the old address
currently bounces and change my name to "joern" as unicode will likely
continue to cause trouble until the end of this century.

Signed-off-by: Joern Engel <joern@lazybastard.org>
Cc: David Woodhouse <dwmw2@infradead.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>
2008-02-06 10:41:09 -08:00
Paulo Marques f2df3f65d0 kallsyms should prefer non weak symbols
When resolving symbol names from addresses with aliased symbol names,
kallsyms_lookup always returns the first symbol, even if it is a weak
symbol.

This patch changes this by sorting the symbols with the weak symbols last
before feeding them to the kernel.  This way the kernel runtime isn't
changed at all, only the kallsyms build system is changed.

Another side effect is that the symbols get sorted by address, too.  So,
even if future binutils version have some bug in "nm" that makes it fail to
correctly sort symbols by address, the kernel won't be affected by this.

Mathieu says:

  I created a module in LTTng that uses kallsyms to get the symbol
  corresponding to a specific system call address.  Unfortunately, all the
  unimplemented syscalls were all referring to the (same) weak symbol
  identifying an unrelated system call rather that sys_ni (or whatever
  non-weak symbol would be expected).  Kallsyms was dumbly returning the first
  symbol that matched.

  This patch makes sure kallsyms returns the non-weak symbol when there is
  one, which seems to be the expected result.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Looks-great-to: Rusty Russell <rusty@rustcorp.com.au>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:07 -08:00
Robin Getz a3b81113fb remove support for un-needed _extratext section
When passing a zero address to kallsyms_lookup(), the kernel thought it was
a valid kernel address, even if it is not.  This is because is_ksym_addr()
called is_kernel_extratext() and checked against labels that don't exist on
many archs (which default as zero).  Since PPC was the only kernel which
defines _extra_text, (in 2005), and no longer needs it, this patch removes
_extra_text support.

For some history (provided by Jon):
 http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019734.html
 http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.html
 http://ozlabs.org/pipermail/linuxppc-dev/2005-September/019751.html

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jon Loeliger <jdl@freescale.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:01 -08:00
Bryan Wu ba3d05fb63 kbuild: add svn revision information to setlocalversion
follow git and mercurial style, include uncommitted changes detect

Cc: Frans Pop <elendil@planet.nl>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:59:50 +01:00
Sam Ravnborg fa95eb1f17 kbuild: do not warn about __*init/__*exit symbols being exported
We have several legitimate uses where we export symbols
annotated with one of:
__devinit, __cpuinit, __meminit and their exit counterpart.
So let's stop warning about those being exported in favour
of adding all sorts of workaround to silence the warning.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:08 +01:00
Sam Ravnborg 603d49885e kconfig: ignore select of unknown symbol
We have had warnings for a long time about select of unknow symbol
but the warnings does not really makes sense since we may
select a symbol that is relevant and defined in one
arch but not in another arch.
And as long as we do not use a common set of Kconfig files
for all archs lets just ignore this case.

Previously we have used this to find bad uses of
select but we need a more relaible method to do so.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-02-03 08:58:07 +01:00
Sam Ravnborg 36ef805bd5 kconfig: mark config as changed when loading an alternate config
Michal Zachar <mgzachar@mail.t-com.sk> reported that
menuconfig did not save the new config when loading
an alternate config unless he altered it manually.

Mark config as changed upon load of alternate config fixed this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Roman Zippel <zippel@linux-m68k.org>
2008-02-03 08:58:07 +01:00
Sam Ravnborg e5f95c8b77 kbuild: print only total number of section mismatces found
We have too many section mismatches detected at the moment.
So silence modpost and prevent the option from being
set in a typical allyesconfig build.

Tell the user how to see all the deteils in the summary
message from modpost.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:07 +01:00
Greg Kroah-Hartman de6f92b9ee USB: handle idVendor of 0x0000
Some crazy devices in the wild have a vendor id of 0x0000.  If we try to
add a module alias with this id, we just can't do it due to a check in
the file2alias.c file.  Change the test to verify that both the vendor
and product ids are 0x0000 to show a real "blank" module alias.

Note, the module-init-tools package also needs to be changed to properly
generate the depmod tables.

Cc: Janusz <janumix@poczta.fm>
Cc: stable <stable@kernel.org>
Cc: Jon Masters <jcm@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Sam Ravnborg e241a63037 kbuild: warn about ld added unique sections
If there is a mixture of specifying sections for code in gcc
and assembler then if the assembler code do not add
the "ax" flags the linker will see this as two different sections
and generate unique sections for each. ld does so by adding a dot
and a number.
Teach modpost to warn if a section shows up that match this
pattern - but do this only for non-debug sections.

It will result in warnings like this:

WARNING: vmlinux.o (.sched.text.1): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
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.

All warnings seen with a defconfig build for:
x86 (32+64bit) and sparc64 has been fixed (via respective maintainers).

arm, powerpc (64 bit), s390 (32 bit), ia64, alpha, sh4 checked - no
warnings seen with a defconfig build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:19 +01:00
Sam Ravnborg 588ccd732b kbuild: add verbose option to Section mismatch reporting in modpost
If the config option CONFIG_SECTION_MISMATCH is not set and
we see a Section mismatch present the following to the user:

modpost: Found 1 section mismatch(es).
To see additional details select "Enable full Section mismatch analysis"
in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).

If the option CONFIG_SECTION_MISMATCH is selected
then be verbose in the Section mismatch reporting from mdopost.
Sample outputs:

WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
The function  discover_ebda() references
the variable __initdata ebda_addr.
This is often because discover_ebda lacks a __initdata
annotation or the annotation of ebda_addr is wrong.

WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
The variable pci_serial_quirks references
the function __devexit pci_plx9050_exit()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
The symbol arch_register_cpu is exported and annotated __cpuinit
Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Jan Beulich f5eaa323eb kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config
settings in a choice is possible and has the desired effect of offering
just the tristate options individually if the choice gets set to M, and
a normal boolean selection if the choice gets set to Y.

Also fix scripts/kconfig/conf's handling of children of choice values -
there may be more than one immediate child, and all of them need to be
processed.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: "Roman Zippel" <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Adrian Bunk 3ff6eecca4 remove __attribute_used__
Remove the deprecated __attribute_used__.

[Introduce __section in a few places to silence checkpatch /sam]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Daniel De Graaf bc395add94 kbuild: support ARCH=x86 in buildtar
Signed-off-by: Daniel De Graaf <danieldegraaf@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Adrian Bunk 9649ef878d kconfig: remove "enable"
Kconfig had a synonym "enable" for "select" that was neither documented
nor used.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg 58fb0d4f2f kbuild: simplified warning report in modpost
Refactor code so the warning report function
does nothing else than reporting warnings.
As a side effect some other code paths were cleaned
up by this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg ff13f92690 kbuild: introduce a few helpers in modpost
Introducing helpers to retreive symbol and section
names cleaned up the code a bit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg 157c23c80e kbuild: use simpler section mismatch warnings in modpost
The typical layout is now:
WARNING: vmlinux.o(.text+0x372ec): Section mismatch: reference to .devinit.text:pci_scan_one_pbm in 'psycho_scan_bus'

This is first step towards more readable warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg 91341d4b2c kbuild: introduce new option to enhance section mismatch analysis
Setting the option DEBUG_SECTION_MISMATCH will
report additional section mismatch'es but this
should in the end makes it possible to get rid of
all of them.

See help text in lib/Kconfig.debug for details.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:18 +01:00
Sam Ravnborg eb8f689046 Use separate sections for __dev/__cpu/__mem code/data
Introducing separate sections for __dev* (HOTPLUG),
__cpu* (HOTPLUG_CPU) and __mem* (MEMORY_HOTPLUG)
allows us to do a much more reliable Section mismatch
check in modpost. We are no longer dependent on the actual
configuration of for example HOTPLUG.

This has the effect that all users see much more
Section mismatch warnings than before because they
were almost all hidden when HOTPLUG was enabled.
The advantage of this is that when building a piece
of code then it is much more likely that the Section
mismatch errors are spotted and the warnings will be
felt less random of nature.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg KH <greg@kroah.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Adrian Bunk <bunk@kernel.org>
2008-01-28 23:21:17 +01:00
Sam Ravnborg 6c5bd235bf kbuild: check section names consistently in modpost
Now that match() is introduced use it consistently so
we can share the section name definitions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Sam Ravnborg 10668220a9 kbuild: introduce blacklisting in modpost
Change the logic in modpost so we identify all the
bad combinations of sections that refer to other
sections.
Compared to the previous approach we are much less
dependent on knowledge of what additional sections
the tool chain uses and thus we can keep the false
positives low.

The implmentation is changed to use a table based
lookup and we now check all combinations in first
pass so we no longer need separate passes for init
and exit sections.

Tested that the same warnings are generated for
an allyesconfig build without CONFIG_HOTPLUG.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Adrian Bunk <bunk@kernel.org>
2008-01-28 23:14:40 +01:00
Sam Ravnborg 5b24c0715f kbuild: code refactoring in modpost
Split a too long function up in smaller bits to make
prgram logic easier to follow.
A few related changes done due to parameter
changes.

No functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Sam Ravnborg 9ad21c3f3e kbuild: try harder to find symbol names in modpost
The relocation record sometimes contained an address
which was not an exactly match for a symbol.

Implment some simple logic such that if there
is a symbol within 20 bytes of the address contained
in the relocation record then print the name of this
symbol.

With this change modpost could find symbol names
for the remaining .init.text symbols in my
allyesconfig build for x86_64.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Sam Ravnborg d1f25e6658 kbuild: fix so modpost can now check any .o file
It is very convinient to say:
scripts/mod/modpost mm/built-in.o

to check if any section mismatch errors occured
in mm/ (as an example).
Fix it so this is possible again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Randy Dunlap fa220d89ad kbuild: minor scripts/decodecode update
Remove the tmp file when exiting.  Noticed by Arjan van de Ven.
Catch mktemp failure and exit with message.
Trap kill or other signals and exit cleanly.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Roman Zippel 80daa56008 kconfig: use environment option
Use the environment option to provide the ARCH symbol
and the KERNELVERSION symbol.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
Roman Zippel 93449082e9 kconfig: environment symbol support
Add the possibility to import a value from the environment into kconfig
via the option syntax. Beside flexibility this has the advantage
providing proper dependencies.
Documented the options syntax.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
Roman Zippel 7a96292335 kconfig: explicitly introduce expression list
Rename E_CHOICE to E_LIST to explicitly add support for expression
lists. Add a helper macro expr_list_for_each_sym to more easily iterate
over the list.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 0ffce8d944 kconfig: gconfig: symbol fix
Gettext support for symbol names are unnecessary.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 534a450c38 kconfig: gettext support for config
Gettext support for conf.c

[Include locale.h by Kyle].

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
2008-01-28 23:14:39 +01:00
EGRY Gabor 75c0a8a55c kconfig: gettext support for lxdialog
Gettext support for lxdialog.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 413f006bab kconfig: gettext support for menuconfig
Full gettext support for menuconfig.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor c21a2d9589 kconfig: gettext support for xconfig
Full gettext support for xconfig.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 01771b0fef kconfig: macro fix in menu.c
This patch removes the indirect I18N support for config file.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor 46d2631978 kconfig: gettext support for gconfig
Gettext support for menu and toolbar.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:39 +01:00
EGRY Gabor bb7ef3905a kconfig: missing macros in gconfig
This patch adds missing gettext macros.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
EGRY Gabor f7a4b4cdc2 kconfig: whitespace removing
This patch removes the unnecessary whitespaces from
end of help lines of Kconfig files.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
EGRY Gabor 1020026f99 kconfig: update-po-config info
This patch adds tracking messages.

Signed-off-by: Egry Gabor <gaboregry1@t-online.hu>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Jan Beulich 1d3b3bfab1 kbuild: scripts/mkmakefile: dynamic determination of output directory
Rather than fixing the output directory in the generated Makefile,
determine it from the placement of Makefile. This allows moving
the build tree around or accessing it through different mount paths.

(The lastword definition is a compatibility one for make prior to 3.81;
newer make will simply ignore it and use the [faster] built-in.)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:38 +01:00
Sam Ravnborg df578e7d83 kbuild: clean up modpost.c
akpm complained about overly long lines in modpost.c and
when started additional style issues were fixed:

o Updated my copyright
o Removed unneeded {}
o Drop assignments in if ()
o Spaces around operators
o Break long lines
o locate * near variable not type
o Fix a format specifier for sizeof()
o Corrected placement of '{' and '}'
o spaces to tabs (but use tabs only for indention)

modpost.c is not checkpatch clean. Readability were favoured
on top of checkpatch compliance.
But checkpatch were used to find additional stuff to clean up.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:38 +01:00
Ladislav Michl 07f7668858 kconfig: use C89 random functions in conf.c
rand and srand functions conform also to C89 in addition to POSIX.1-2001,
which makes them a bit more portable (work also on MinGW host). Linux man
page also says:
"The versions of rand() and srand() in the Linux C Library use the same
random number generator as random() and srandom()".

* Use C89 conformant functions rand() and srand()

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Ladislav Michl 75ff4309cd kconfig: fix whitespace and sort includes in conf.c
Sort includes and remove leading whitespace.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org
2008-01-28 23:14:38 +01:00
Sam Ravnborg de83cf148a kconfig: delete unused FILE_ and SYMBOL_ flags
The *_PRINTED flags were never used - so delete them.
Do we need them later then we can re-add them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Sam Ravnborg d6ee35764f kconfig: rename E_OR & friends to avoid name clash
We had macros named the same as a set of enumeration values.
It is legal code but very confusing to read - so rename
the macros from E_* to EXPR_*

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:38 +01:00
Jan Engelhardt d84876f9f8 kconfig: allow overriding symbols
Allow config variables in .config to override earlier ones in the same
file. In other words,

	# CONFIG_SECURITY is not defined
	CONFIG_SECURITY=y

will activate it. This makes it a bit easier to do

cat original-config myconfig myconfig2 ... >.config;
and run *config as expected.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
2008-01-28 23:14:37 +01:00
Ladislav Michl 09af091f50 kconfig: make kconfig MinGW friendly
Kconfig is powerfull tool. So powerfull that more and more software
projects are using it for configuration. So instead of fixing some of
them one by one, lets fix it in kernel and wait for sync.

This work was originaly done for PTXdist - GPL licensed build system for
userlands and cross-compilers, but it will not hurt kernel kconfig
either. PTXdist menuconfig now works on Windows linked with PDCurses and
compiled using MinGW - there is no termios and signals.

* Do not include <sys/wait.h> and <signal.h> (comes from times when
  lxdialog was separate process)
* Do not mess with termios directly and let curses tell screen size.
  Comment to commit c8dc68ad0f says
  check for screen size could be removed later, but because it didn't
  happen for more than year I left it here as well.
* Save cursor position added by Sam

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:37 +01:00
Theodore Ts'o b052ce4c84 kbuild: fix false positive -dirty tag caused by make-kpkg
make-kpkg modifies scripts/package/Makefile and deletes
scripts/package/builddeb as part of its build process.  Ignore these
changes so the tree isn't marked as -dirty, when it is just an
artifact of make-kpkg.  (make-kpkg clean restores the files to their
original state, and these helper scripts won't affect the final
compiled kernel in any way.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:37 +01:00
Theodore Ts'o 4e7434ff02 kbuild: fix scripts/setlocalversion to avoid erroneous -dirty tag
If git's index file is out of date, and some files have been touched
such that their timestamp doesn't what is in the index, "git
diff-index HEAD" may show that a particular file is dirty, when in
fact it really isn't.  Running "git update-index" will update the
index to avoid these false positives.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:37 +01:00
Theodore Ts'o d882421f4e kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format
Change the automatic local version to have the form -nnnnn-gSHA1SUMID,
where 'nnnnn' is the number of commits since the last tag (i.e.,
2.6.21-rc7).  This makes it much more likely that the package names created
for the kernel will look "newer" to a package manager.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:37 +01:00
Andreas Mohr 22d6a6a018 kbuild: eradicate bashisms in scripts/patch-kernel
Make the patch-kernel shell script sufficiently compatible with POSIX
shells, i.e., remove bashisms from scripts/patch-kernel.
This means that it now also works on dash 0.5.3-5
and still works on bash 3.1dfsg-8.

Full changelog:
- replaced non-standard "==" by standard "="
- replaced non-standard "source" statement by POSIX "dot" command
- use leading ./ on mktemp filename to force the tempfile to a local
  directory, so that the search path is not used
- replace bash syntax to remove leading dot by similar POSIX syntax
- added missing (optional/not required) $ signs to shell variable names

Signed-off-by: Andreas Mohr <andi@lisas.de>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:37 +01:00
Sam Ravnborg 9b213118fa kbuild: fix installing external modules
Eric Sandeen <sandeen@redhat.com> reported:
  Installing external modules is supposed to put them in some path
  under /lib/modules/<version>/extra/subdir/, but this change:
  http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23
  makes them go under /lib/modules/<version>/extrasubdir

 (for example, make M=fs/ext3 modules_install puts ext3.ko in
 /lib/modules/<version>/extrafs/ext3.ko)

This was the case only when specifying a trailing slash to M=..

Fixed by removing trailing slash if present so
we correctly match dir part of target.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Eric Sandeen <sandeen@redhat.com>
2008-01-28 23:14:36 +01:00
Mike Frysinger 36091fd348 kbuild: fixup genksyms usage/getopt
The usage does not mention the "-a,--arch" or "-T,--dump-types" options, so
add them.  The calls to getopt() seem to mention options that no longer exist
(some "k" and "p" thingy) but omits the "h" option which means using '-h'
actually triggers the error code path, so update those as well.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Sam Ravnborg 0484f1299f kbuild: fix buglet in gcc-version.sh
Greg Schafer <gschafer@zip.com.au> reported:
====
$make mrproper
scripts/gcc-version.sh: [[: command not found

This is on a very old host with an ancient bash as /bin/sh. But I have
CONFIG_SHELL set and pointing to a modern bash. Something is wrong.

This doesn't happen with 2.6.23
====

Fixed using a more common string equality test.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Greg Schafer <gschafer@zip.com.au>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
2008-01-28 23:14:36 +01:00
Robert P. J. Day 899c38420c Kbuild: Clarify the rpm-related make packaging targets
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Aron Griffis 3dce174cfc kbuild: support mercurial in setlocalversion
This represents mercurial changesets similarly to git.  For untagged
revisions, append the changeset id.  If there are uncommitted changes,
append -dirty.  For example, -hgc60016ba6237-dirty

Signed-off-by: Aron Griffis <aron@hp.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Andres Salomon 2f4b489b77 kconfig: use getopt() in conf.c for handling command line arguments
Switch from doing our own parsing of command line arguments to
using getopt(3) to do it.  Aside from simplifying things, this allows us to
specify multiple arguments; the old code could only accept two arguments
(input_mode and kconfig name).

Note some subtle changes:
 - The argument '-?' is no longer supported.
 - '-h' is not treated as an error, so output goes to stdout, and we
   exit with '0'.
 - There is no compatibility checking amongst arguments; the last option
   will simply override earlier options.  For example, 'conf -n -y foo'
   is perfectly valid now (input_mode will be set_yes).  Previously, that
   would have been an error ("can't find file -y").

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28 23:14:36 +01:00
Andi Kleen 666ab414fe kbuild: fix a buffer overflow in modpost
When passing an file name > 1k the stack could be overflowed.
Not really a security issue, but still better plugged.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Andi Kleen 58b7a68de3 kbuild: fix format string warnings in modpost
Fix wrong format strings in modpost exposed by the previous patch.
Including one missing argument -- some random data was printed instead.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Andi Kleen 6d9a89ea4b kbuild: declare the modpost error functions as printf like
This way gcc can warn for wrong format strings
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:36 +01:00
Sam Ravnborg 6e588f6dcf kconfig: if ncurses-devel is missing then say so
With this patch when ncurses-devel (or whatever it is named)
is missing trying to run menuconfig will result in this:

$ make menuconfig
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2

Much better than before where we just listed some build errors.
The other *config targets will work indepenednt on ncurses
being present or not.

Includes improvements suggested by: Frans Pop <elendil@planet.nl>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Frans Pop <elendil@planet.nl>
2008-01-28 23:14:36 +01:00
Tejun Heo 551559e13a kbuild: implement modules.order
When multiple built-in modules (especially drivers) provide the same
capability, they're prioritized by link order specified by the order
listed in Makefile.  This implicit ordering is lost for loadable
modules.

When driver modules are loaded by udev, what comes first in
modules.alias file is selected.  However, the order in this file is
indeterministic (depends on filesystem listing order of installed
modules).  This causes confusion.

The solution is two-parted.  This patch updates kbuild such that it
generates and installs modules.order which contains the name of
modules ordered according to Makefile.  The second part is update to
depmod such that it generates output files according to this file.

Note that both obj-y and obj-m subdirs can contain modules and
ordering information between those two are lost from beginning.
Currently obj-y subdirs are put before obj-m subdirs.

Sam Ravnborg cleaned up Makefile modifications and suggested using awk
to remove duplicate lines from modules.order instead of using separate
C program.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Bill Nottingham <notting@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jon Masters <jonathan@jonmasters.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg e662af4281 kernel-doc: new P directive for DOC: sections
The !P directive includes the contents of a DOC: section
given by title, e.g.
!Pfilename Title of the section

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg 2e95972c44 kernel-doc: use no-doc option
When asked by a template to include all functions from a file,
it will also include DOC: sections wreaking havoc in the generated
docbook file. This patch makes it use the new -no-doc-sections
flag for kernel-doc to avoid this.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg 4b44595a7b kernel-doc: process functions, not DOC:
This flag is necessary for the next patch for docproc to output
only the functions and not DOC: sections when a function list
is requested.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg b112e0f73f kernel-doc: single DOC: selection
Currently, DOC: sections are always output even if only a single
function is requested, fix this and also make it possible to just
output a single DOC: section by giving its title as the function
name to output.

Also fixes docbook XML well-formedness for sections with examples.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg 1b9bc22d71 kernel-doc: init kernel version
The kernel-doc script triggers a perl warning when invoked
without KERNELVERSION in the environment, rather make it use
the string "unknown kernel version" instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Johannes Berg 5c98fc0360 kernel-doc: fix xml output mode
After Randy's patch fixing the HTML output in DOC: sections
(6b5b55f6c4) the same bug remained in XML
mode, this fixes it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:35 +01:00
Paul Mundt 870e6f7e15 kconfig: obey KCONFIG_ALLCONFIG choices with randconfig.
Currently when using KCONFIG_ALLCONFIG with randconfig the choice options
are clobbered.  As recommended by Roman, this adds an is_new test to see
whether to select a new option or obey the existing one.

This is a resend of the earlier patch a couple of weeks ago, since there
was no reply.  Original thread is at http://lkml.org/lkml/2007/11/28/94

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-12-23 12:54:37 -08:00
Nathan Lynch 8998979cc1 fix bloat-o-meter for ppc64
bloat-o-meter assumes that a '.' anywhere in a symbol's name means that it
is static and prepends 'static.' to the first part of the symbol name,
discarding the portion of the name that follows the '.'.  However, the
names of function entry points begin with '.' in the ppc64 ABI.  This
causes all function text size changes to be accounted to a single 'static.'
entry in the output when comparing ppc64 kernels.

Change getsizes() to ignore the first character of the symbol name when
searching for '.'.

Signed-off-by: Nathan Lynch <ntl@pobox.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>
2007-12-17 19:28:17 -08:00
Guillaume Chazarain 971edcfc8b kbuild: re-enable Makefile generation in a new O=... directory
The commit:
18c32dac75 "kbuild: fix
building with O=.. options"
disabled the creation of a Makefile in a new O=... directory. Restore it.

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-12-13 19:19:20 +01:00
Sam Ravnborg 18c32dac75 kbuild: fix building with O=.. options
The check introduced in commit:
4f1127e204 "kbuild: fix
infinite make recursion"

caused certain external modules not to build and
also caused 'make targz-pkg' to fail.
This is a minimal fix so we revert to previous
behaviour - but we do not overwrite the Makefile
in the top-level directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: Jay Cliburn <jacliburn@bellsouth.net>
2007-12-09 08:55:13 +01:00
Andy Whitcroft 8905a67c63 update checkpatch.pl to version 0.12
This version brings a new terse output mode as well as many improvements to
the unary detection and bare type regcognition.  It also brings the usual
updates for false positives, though these seem to be slowing markedly
now that the unary detector is no longer just putting its finger in the
air and guessing.  Of note:

  - new --terse mode producing a single line per report
  - loosening of the block brace checks
  - new checks for enum/union/struch brace placements
  - hugely expanded "bare type" detection
  - checks for inline usage
  - better handling of already open comment blocks
  - handle patches which introduce or remove lines without newlines

Andy Whitcroft (19):
      Version: 0.12
      style fixes as spotted by checkpatch
      add a --terse options of a single line of output per report
      block brace checks should only apply for single line blocks
      all new bare type detector
      check spacing for open braces with enum, union and struct
      check for LINUX_VERSION_CODE
      macros definition bracketing checks need to ignore -ve context
      clean up the mail-back mode, -q et al
      expand possible type matching to declarations
      allow const and sparse annotations on possible types
      handle possible types as regular types everywhere
      prefer plain inline over __inline__ and __inline
      all new open comment detection
      fix up conditional extraction for if assignment checks
      add const to the possible type matcher
      unary checks: a for loop is a conditional too
      possible types: detect function pointer definitions
      handle missind newlines at end of file, report addition

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:51 -08:00
Sam Ravnborg 6840999b19 x86: simplify "make ARCH=x86" and fix kconfig all.config
Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
all.config.

For a fix the diffstat is nice:
 6 files changed, 3 insertions(+), 36 deletions(-)

The patch reverts these commits:
 - 0f855aa64b ("kconfig: add helper to set
   config symbol from environment variable")
 - 2a113281f5 ("kconfig: use $K64BIT to
   set 64BIT with all*config targets")

Roman Zippel pointed out that kconfig supported string compares so
the additional complexity introduced by the above two patches were
not needed.

With this patch we have following behaviour:

  # make {allno,allyes,allmod,rand}config [ARCH=...]
  option \ host arch      | 32bit         | 64bit
  =====================================================
  ./.                     | 32bit         | 64bit
  ARCH=x86                | 32bit         | 32bit
  ARCH=i386               | 32bit         | 32bit
  ARCH=x86_64             | 64bit         | 64bit

The general rule are that ARCH= and native architecture takes
precedence over the configuration.

So make ARCH=i386 [whatever] will always build a 32-bit kernel
no matter what the configuration says.  The configuration will
be updated to 32-bit if it was configured to 64-bit and the
other way around.

This behaviour is consistent with previous behaviour so no
suprises here.

make ARCH=x86 will per default result in a 32-bit kernel but as
the only ARCH= value x86 allow the user to select between 32-bit
and 64-bit using menuconfig.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andreas Herrmann <aherrman@arcor.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-17 08:35:43 -08:00
Sam Ravnborg daa93fab82 x86: enable "make ARCH=x86"
After unification of the Kconfig files and
introducing K64BIT support in kconfig
it required only trivial changes to enable
"make ARCH=x86".

With this patch you can build for x86_64 in several ways:
1) make ARCH=x86_64
2) make ARCH=x86 K64BIT=y
3) make ARCH=x86 menuconfig
   => select 64-bit

Likewise for i386 with the addition that
i386 is default is you say ARCH=x86.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 2a113281f5 kconfig: use $K64BIT to set 64BIT with all*config targets
The variable K64BIT can now be used to select the
value of CONFIG_64BIT.

This is for example useful for powerpc to generate
allmodconfig for both bit sizes - like this:
make ARCH=powerpc K64BIT=y
make ARCH=powerpc K64BIT=n

To use this the Kconfig file must use "64BIT" as the
config value to select between 32 and 64 bit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 0f855aa64b kconfig: add helper to set config symbol from environment variable
Add conf_set_env_sym() that can set an already defined symbol
based on the value of an environment variable.

Unknown symbols are silently ignored.
A warning is printed if the value of the environment variable
is unexpected.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:20 +01:00
Sam Ravnborg 9c900a9c9d kconfig: factor out code in confdata.c
This patch introduce no functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-11-12 21:02:19 +01:00
Sam Ravnborg 47572387d5 x86: move i386 and x86_64 Kconfig files to x86 directory
After a small change in kconfig Makefile we could
move all x86 Kconfig files to x86 directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:37:02 +02:00
Sam Ravnborg e703f75d62 kconfig: small code refactoring in kconfig Makefile
Do not hardcode the arch/$(ARCH)/Kconfig name all over

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:35:18 +02:00
Sam Ravnborg 2266cfd50d x86: move defconfig files for i386 and x86_64 to x86
With some small changes to kconfig makefile we can now
locate the defconfig files for i386 and x86_64 in
the configs/ subdirectory under x86.
make ARCH=i386 defconfig and make defconfig
works as expected also after this change.
But arch maintainers shall now update a defconfig file in
the configs/ directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25 22:27:41 +02:00
Rusty Russell b01d9f2863 Module autoprobing support for virtio drivers.
This adds the logic to convert the virtio ids into module aliases, and
includes a modalias entry in sysfs and the env var to make probing work.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23 15:49:55 +10:00
Linus Torvalds cfa76f024f Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (29 commits)
  [PARISC] fix uninitialized variable warning in asm/rtc.h
  [PARISC] Port checkstack.pl to parisc
  [PARISC] Make palo target work when $obj != $src
  [PARISC] Zap unused variable warnings in pci.c
  [PARISC] Fix tests in palo target
  [PARISC] Fix palo target
  [PARISC] Restore palo target
  [PARISC] Attempt to clean up parisc/Makefile
  [PARISC] Fix infinite loop in /proc/iomem
  [PARISC] Quiet sysfs_create_link __must_check warnings in pdc_stable
  [PARISC] Squelch pci_enable_device __must_check warning in superio
  [PARISC] Kill off broken irqstack code
  [PARISC] Remove hardcoded uses of PAGE_SIZE
  [PARISC] Clean up pointless ASM_PAGE_SIZE_DIV use
  [PARISC] Kill off the last vestiges of ASM_PAGE_SIZE
  [PARISC] Kill off ASM_PAGE_SIZE use
  [PARISC] Beautify parisc vmlinux.lds.S
  [PARISC] Clean up a resource_size_t warning in sba_iommu
  [PARISC] Kill incorrect cast warning in unwinder
  [PARISC] Kill zone_to_nid printk warning
  ...

Fixed trivial conflict in include/asm-parisc/tlbflush.h manually
2007-10-20 20:19:15 -07:00
Kyle McMartin 562d139cc5 [PARISC] Port checkstack.pl to parisc
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2007-10-20 13:18:56 -07:00
Randy Dunlap a54bb701c2 kconfig: set title bar in xconfig
Put kernel version info on title bar in xconfig (qconf) instead of
defaulting to "qconf".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-20 20:16:50 +02:00
Linus Torvalds e8b8c97773 Revert "kconfig: tristate choices with mixed tristate and boolean values"
This reverts commit a5bf3d891a.

David Brownell notes that this causes a regression visible in the
drivers/usb/gadget Kconfig file:

  "That Kconfig hasn't changed (other than adding new drivers), and it's
   worked that way for several years now ...  so the issue seems to be
   changes in menuconfig/kconfig/etc semantics.

   The issue is that when USB_GADGET=m, it's no longer possible to
   configure peripheral controller drivers as modules ...  the
   controller drivers can now only be configured for static linkage.

   It should be making a choice of one of the controller drivers which
   could work on the target system, and allow that driver to be linked
   either as a module (ok iff USB_GADGET=m) or statically."

Reverting this commit resolves the problem, and also fixes a second
problem that David noticed: various dependent options couldn't be enabled.

Tested-and-reported-by: David Brownell <david-b@pacbell.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jan Beulich <jbeulich@novell.com>,
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cc: Sam Ravnborg <sam@ravnborg.org>,
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 21:25:45 -07:00
Linus Torvalds 4800be295c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: fix first module build
  kconfig: update kconfig-language text
  kbuild: introduce cc-cross-prefix
  kbuild: disable depmod in cross-compile kernel build
  kbuild: make deb-pkg - add 'Provides:' line
  kconfig: comment typo in scripts/kconfig/Makefile.
  kbuild: stop docproc segfaulting when SRCTREE isn't set.
  kbuild: modpost problem when symbols move from one module to another
  kbuild: cscope - filter out .tmp_* in find_sources
  kbuild: mailing list has moved
  kbuild: check asm symlink when building a kernel
2007-10-19 13:47:38 -07:00
Sam Ravnborg 910b40468a kbuild: introduce cc-cross-prefix
cc-cross-prefix is useful for the architecture that like
to provide a default CROSS_COMPILE value,
but may have several to select between.

Sample usage:

ifneq ($(SUBARCH),$(ARCH))
        ifeq ($(CROSS_COMPILE),)
               CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
        endif
endif

Actual usage by the different archs will taken care of later.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-19 21:46:01 +02:00
Joern Engel 477116e69d fix a trivial typo in scripts/checkstack.pl
Trivial change in a comment.

Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andre Haupt <andre@finow14.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19 11:53:34 -07:00
Andy Whitcroft 6c72ffaab9 update checkpatch.pl to version 0.11
This version brings a more cautious checkpatch.pl by default.  The more
subjective checks are only applied with the --strict option.  It also
brings the usual slew of corrections for false positives.  Of note:

  - new tree detection, the source tree will be found via the executable
  - a major revamp of the unary detection to make it more parser like
  - a new summary at the bottom of the report
  - --strict option for subjective checks
  - --file to enable checking on complete files
  - support for use in emacs "compile" window

Andy Whitcroft (27):
      Version: 0.11
      fix up cat_vet for the case where there are no control characters
      any cast to a pointer introduces a type
      cpp unary operator detection needs to float
      attributes are also valid in type definitions
      sizeof may be a bareword and makes its argument unary
      unary checks for #ifdef et al need to find end of line
      add new --file mode to handle raw source files
      add --strict/--subjective which enables the subjective tests
      add some additional standard type suffixes
      cpp #elif is also a unary prefix
      case is not a function name
      widen asm volatile exceptions
      __kprobes is a type attribute
      typeof is a unary operator
      function open parenthesis checks should check all occurances
      expand sizeof() binary exceptions
      linux/irq.h should not be recommended
      work harder to find the kernel root and add --root=
      fix --emacs mode line numbers and string concatenation warnings
      add a summary to the bottom of the main report
      loosen assignment in if checks
      update operator spacing to maintain tabs in output
      revamp unary detection
      corruption/line wrapped patches need only reporting once
      revamp s/u/be/le 8/16/32/64 bit types
      handle missing ,1 in uni-diff header

Mike D. Day (2):
      Adds support to checkpatch.pl for running in the emacs compile window.
      checkpatch: Fix line number reporting

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:21 -07:00
bugme-daemon@bugzilla.kernel.org 6f67a00498 kbuild: make deb-pkg - add 'Provides:' line
http://bugzilla.kernel.org/show_bug.cgi?id=8941

Current Debian's kernel-modules depend on matching linux-image-$version, though
Linux's make deb-pkg build a .deb that 'Provides: kernel-image-$version' only.
The following patch adds the Debian-compliant 'Provides', leaving the default
one; hopely this will make way all happy.

Signed-off-by: paolo <oopla@users.sf.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 15:15:53 +02:00
Rob Landley e9e40e143c kconfig: comment typo in scripts/kconfig/Makefile.
Typo in comment in scripts/kconfig/Makefile.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 14:31:50 +02:00
Rob Landley bb13be5145 kbuild: stop docproc segfaulting when SRCTREE isn't set.
Prevent docproc from segfaulting when SRCTREE isn't set.

Signed-off-by: Rob Landley <rob@landley.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 13:42:53 +02:00
Trent Piepho 4b21960f90 kbuild: modpost problem when symbols move from one module to another
When part of build an external module tree, modpost first reads in the
kernel's and then the external tree's Module.symvers files.  From these files
it establishes a symbol => module mapping.  When it later reads in each module
built and processes the symbols it finds, it discovers the symbol=>module
mapping from Module.symvers and leaves it as it is.

The problem comes with a module has been re-named or a symbol has moved from
one module to another, since the Module.symvers file was generated.  modpost
does not update the symbol=>module mapping when it finds the new location of
the symbol when scanning the newly built modules.  This results in the module
containing incorrect dependency information and the new Module.symvers file
written by modpost will also contain the incorrect mappings, perpetuating the
problem to the next build, and so on.

When building the out of kernel development tree for kernel subsystem, like
v4l-dvb or ALSA, deleting the external Module.symvers file before building
(which the kernel build system doesn't do and shouldn't be necessary anyway),
won't fix the problem.  modpost still reads the kernel's Module.symvers, and
since we a building a kernel subsystem, it will define the same symbols as the
external modules.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-18 13:35:49 +02:00
Randy Dunlap 6b5b55f6c4 kernel-doc: fix doc blocks and html
Johannes Berg reports (Thanks!) that &struct names are not highlighted in
html output format when they are inside a DOC: block.

DOC: blocks were not escaped thru xml_escape() like other kernel-doc
comments were.  Fixed that.

However, that left a problem with <p> ($blankline_html) being processed
thru xml_escape(), converting it to &lt;p&gt;, which isn't good for the
generated html output (the <p> should remain unchanged), so this patch also
introduces the notion of "local" kernel-doc meta-characters
('\\\\mnemonic:'), which are converted to html just before writing the
stream to its output file.

Please report any problems that you (anyone) see in "highlighting" in any
output mode (text, man, html, xml).

Also update copyright to include me.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:43:05 -07:00
Andy Whitcroft 9c0ca6f9a0 update checkpatch.pl to version 0.10
This version brings a number of new checks, and a number of bug
fixes.  Of note:

  - better categorisation and space checks for dual use unary/binary
    operators
  - warn on deprecated use of {SPIN,RW}_LOCK_UNLOCKED
  - check if/for/while with trailing ';' for hanging statements
  - detect DOS line endings
  - detect redundant casts for kalloc()

Andy Whitcroft (18):
      Version: 0.10
      asmlinkage is also a storage type
      pull out inline specifiers
      allow only some operators before a unary operator
      parenthesised values may span line ends
      add additional attribute matching
      handle sparse annotations within pointer type space checks
      support alternative function definition syntax for typedefs
      check if/for/while with trailing ';' for hanging statements
      fix output format for case checks
      deprecate SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED
      allow complex macros with bracketing braces
      detect and report DOS line endings
      fastcall is a valid function attribute
      bracket spacing is ok for 'for'
      categorise operators into unary/binary/definitions
      add heuristic to pick up on unannotated types
      remove spurious warnings from cat_vet

Dave Jones (1):
      Make checkpatch warn about pointless casting of kalloc returns.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:56 -07:00
Mike Frysinger 1e9535a591 Add stack checking for Blackfin
Simply fill out the bits in checkstack.pl for Blackfin.  I thought I already
sent this, but I don't see it in -mm anywhere ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-17 08:42:54 -07:00
Linus Torvalds 821f3eff7c Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
  kbuild: introduce ccflags-y, asflags-y and ldflags-y
  kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
  kbuild: enable use of AFLAGS and CFLAGS on commandline
  kbuild: enable 'make AFLAGS=...' to add additional options to AS
  kbuild: fix AFLAGS use in h8300 and m68knommu
  kbuild: check for wrong use of CFLAGS
  kbuild: enable 'make CFLAGS=...' to add additional options to CC
  kbuild: fix up CFLAGS usage
  kbuild: make modpost detect unterminated device id lists
  kbuild: call export_report from the Makefile
  kbuild: move Kai Germaschewski to CREDITS
  kconfig/menuconfig: distinguish between selected-by-another options and comments
  kconfig: tristate choices with mixed tristate and boolean values
  include/linux/Kbuild: remove duplicate entries
  kbuild: kill backward compatibility checks
  kbuild: kill EXTRA_ARFLAGS
  kbuild: fix documentation in makefiles.txt
  kbuild: call make once for all targets when O=.. is used
  kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
  kbuild: update _shipped files for kconfig syntax cleanup
  ...

Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
2007-10-16 11:23:06 -07:00
Sam Ravnborg f77bf01425 kbuild: introduce ccflags-y, asflags-y and ldflags-y
Introduce ccflags-y, asflags-y and ldflags-y so we soon can
deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
This patch does not touch any in-tree users - thats next round.
Lets get this committed first and then fix the users of the
soon to be deprecated variants next.

The rationale behind this change is to introduce support for
makefile fragments like:

ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG

As a replacement for the uglier:
ifeq ($(CONFIG_WHATEVER_DEBUG),y)
        EXTRA_CFLAGS := -DDEBUG
endif

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 22:25:06 +02:00
Sam Ravnborg 06c5040cdb kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
The variable CPPFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.

This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the
tree and enabling one to use:
make CPPFLAGS=...
to specify additional CPP commandline options.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 22:17:25 +02:00
Sam Ravnborg 222d394d30 kbuild: enable 'make AFLAGS=...' to add additional options to AS
The variable AFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of AFLAGS with KBUILD_AFLAGS all over
the tree.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-15 21:59:31 +02:00
Sam Ravnborg 0c53c8e6eb kbuild: check for wrong use of CFLAGS
External modules have in a few cases modifed gcc option
by modifying CFLAGS. This has never been documented and
was a bad practice.
With the check to use KBUILD_CFLAGS it will no longer work
so we better error out and tell what was wrong as a service
to the external module users.

This check can be overruled if
KBUILD_NOPEDANTIC is set to something.
Addid this possibility may allow older external
module to build without any code modifications but potentially
only loosing some un-important gcc options.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14 22:26:53 +02:00
Sam Ravnborg a0f97e06a4 kbuild: enable 'make CFLAGS=...' to add additional options to CC
The variable CFLAGS is a wellknown variable and the usage by
kbuild may result in unexpected behaviour.
On top of that several people over time has asked for a way to
pass in additional flags to gcc.

This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
tree and enabling one to use:
make CFLAGS=...
to specify additional gcc commandline options.

One usecase is when trying to find gcc bugs but other
use cases has been requested too.

Patch was tested on following architectures:
alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k

Test was simple to do a defconfig build, apply the patch and check
that nothing got rebuild.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-14 22:21:35 +02:00
Jean Delvare cee37ae407 i2c: Kill struct i2c_device_id
I2C devices do not have any form of ID as PCI or USB devices have.
No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't
make sense. So we can get rid of struct i2c_device_id and the
associated support code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg KH <greg@kroah.com>
2007-10-13 23:56:29 +02:00
Kees Cook e00498258c kbuild: make modpost detect unterminated device id lists
Cause modpost to fail if any device id lists are incorrectly terminated,
after reporting the offender.
Improved reporting by akpm

Signed-off-by: Kees Cook <kees@ubuntu.com>
Cc: Greg KH <greg@kroah.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ben Collins <bcollins@ubuntu.com>
Cc: Michael Wu <flamingice@sourmilk.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:48:11 +02:00
Matej Laitl b5d609dbfa kconfig/menuconfig: distinguish between selected-by-another options and comments
menuconfig currently represents options implied by another option ('select'
directive in Kconfig) by prefixing them with '---'.  Unfortunately the same
notation is used for comments.  If the implied option is module capable,
user can still switch between Y and M, all without any feedback until she
visits option's help.  (try saying M to MAC80211 and then toggling
CFG80211)

This patch changes notation of selected-by-another items by introducing 2
new representations for implied options: {*} or {M} for options selected by
another modularized one, thus builtin or module capable, -*- or -M- for
options that cannot be at the moment changed by user.

The idea is to represent actual capability of the option by braces (dashes)
around and to always report actual state by * or M inside.

Signed-off-by: Matej Laitl <strohel@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Jan Beulich a5bf3d891a kconfig: tristate choices with mixed tristate and boolean values
Change kconfig behavior so that mixing bool and tristate config settings in
a choice is possible and has the desired effect of offering just the
tristate options individually if the choice gets set to M, and a normal
boolean selection if the choice gets set to Y.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:33 +02:00
Sam Ravnborg 836caba77c kbuild: kill backward compatibility checks
These checks has been present for several kernel releases (> 5).
So lets just get rid of them.
With this we no longer check for use of:
EXTRA_TARGETS, O_TARGET, L_TARGET, list-multi, export-objs

There were three remaining in-tree users of O_TARGET in some
unmaintained sh64 code - mail sent to the maintainer + list.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg 5e54d5e5fb kbuild: kill EXTRA_ARFLAGS
EXTRA_ARFLAGS have never been used so no need to carry
around on this.
A google search did not reveal any external module
using this either.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Milton Miller 0b35786d77 kbuild: call make once for all targets when O=.. is used
Change the invocations of make in the output directory Makefile and the
main Makefile for separate object trees to pass all goals to one $(MAKE)
via a new phony target "sub-make" and the existing target _all.

When compiling with separate object directories, a separate make is called
in the context of another directory (from the output directory the main
Makefile is called, the Makefile is then restarted with current directory
set to the object tree).  Before this patch, when multiple make command
goals are specified, each target results in a separate make invocation.
With make -j, these invocations may run in parallel, resulting in multiple
commands running in the same directory clobbering each others results.

I did not try to address make -j for mixed dot-config and no-dot-config
targets.  Because the order does matter, a solution was not obvious.
Perhaps a simple check for MAKEFLAGS having -j and refusing to run would
be appropriate.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg 14f31562db kbuild: update _shipped files for kconfig syntax cleanup
Update _shipped files so regular user does not
need to have bison/flex/gperf installed.
Code changes were contained in previous commit.

Used following program versions (on fedora):
bison (GNU Bison) 2.3
flex 2.5.33
GNU gperf 3.0.2

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Adrian Bunk 247537b9a2 kconfig: syntax cleanup - drop support for "depends/requires/def_boolean"
Remove the following redundant and never or rarely used kconfig syntax:

- "def_boolean" (same as "def_bool")
- "requires" (same as "depends on")
- "depends" (same as "depends on")

This patch contains the code changes and Kconfig updates.
The shipped files are in next patch to let actual codechange stand out.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:20:32 +02:00
Sam Ravnborg a67cb1319f kconfig: fix segv fault in menuconfig
With specific configurations requesting help for certain
menu lines caused menuconfig to crash.
This was tracked down to a null pointer bug.
Thanks to "Miles Lane" <miles.lane@gmail.com> for inital reporting
and to Gabriel C <nix.or.die@googlemail.com> for the backtrace
that helped me locating the bug.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg 48874077dd kconfig: make comments stand out in menuconfig
Matěj Laitl <strohel@gmail.com> noticed that there was no way
to distingush between comments and un-selectable menu lines.
This patch marks comments with *** comment ***

Cc: Matěj Laitl <strohel@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:32 +02:00
Sam Ravnborg f5fb976520 kbuild: fix directory traversal bug
Previously kbuild choked over the following:
obj-y += ../../../arch/i386/kernel/bootflag.o

This has resulted in some rather ugly workarounds in
current x86_64 tree.
This patch fixes kbuild to allow the above and enable
potential cleanups in x86_64 and maybe in other places.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Randy Dunlap 6dd16f44a9 docproc: style & typo cleanups
- fix typos/spellos in docproc.c and Makefile
- add a little whitespace {while, switch} (coding style)
- use NULL instead of 0 for pointer testing

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg 70f75246cf kbuild: apply genksyms changes
This patch updates the _shipped files for genksyms.
See previous patch for actual functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg 3550a516d0 kbuild: __extension__ support in genksyms (fix unknown CRC warning)
Recently the __extension__ keyword has been introduced in the kernel.
Teach genksyms about this keyword so it can generate correct CRC for
exported symbols that uses a symbol marked __extension__.
For now only the typedef variant:

	__extension__ typedef ...

is supported.
Later we may add more variants as needed.

This patch contains the actual source file changes. The
following patch will hold modifications to the generated
files (*_shipped) and only after the second patch the fix
has effect.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Sam Ravnborg a3a6261a11 kbuild: fix genksyms Makefile
When enabling GENERATE_PARSER the genksyms Makefile
failed to create _shipped version of generated files.

Modifying keywords.gperf failed to cause a rebuild
of genksyms.
Fixed by specifying keywowrds .c as explicit prerequisite
of the lexer.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl cc9eefdb9e kbuild: scripts/ver_linux : correct printing of binutils version
Currently scripts/ver_linux prints "Binutils" or other random
information for the version number in the "binutils" output line
on some distributions. This patch corrects that.

When I initially submitted a patch to correct that, I was not aware
that the output from "ld -v" could differ as much as it turned out
it can, so my original fix turned out to not cover all bases.
This patch works correctly with all the different "ld -v" output
that people posted in replys to my first patch, so it should be a
clear win over what we have currently.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl 9cc3ef3034 kbuild: ver_linux fix glibc version print
Fix ver_linux glibc version printing (for real this time)

Alexey Dobriyan reported that commit
4a645d5ea6
broke ver_linux when glibc has a 3 digit
version number, and proposed a patch.
Al Viro then suggested a simpler way to
solve the problem which I've then simply
put into patch form.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:31 +02:00
Jesper Juhl de47062a17 kbuild: improve scripts/gcc-version.sh output a bit when called without args
Currently, if you call scripts/gcc-version.sh without arguments it will
generate this output :

$ sh scripts/gcc-version.sh
scripts/gcc-version.sh: line 12: [: =: unary operator expected
scripts/gcc-version.sh: line 16: -E: command not found
scripts/gcc-version.sh: line 17: -E: command not found
0000

Not too pretty. I believe this is an improvement :

$ sh scripts/gcc-version.sh
Error: No compiler specified.
Usage:
        scripts/gcc-version.sh <gcc-command>

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:30 +02:00
Petr Stetiar a83710e584 kbuild: fix segfault in modpost
Fix modpost segfault.

Before:
-------
ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o
Segmentation fault

After:
------
ynezz@ntbk:~/linux-2.6.git$ scripts/mod/modpost vmlinux ath_pci.o
FATAL: section header offset=815726848 in file 'ath_pci.o' is bigger then filesize=153968

Sam: This seems to warn for a binutils issue. Anyway modpost should not
segfault.

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:15:30 +02:00
Ram Pai 88f567f3a3 kbuild: fix perl usage in export_report.pl
Fixes some subtle perl coding bug observed
by Jan Engelhardt <jengelh@computergmbh.de>
This patch applies on top of Adrian's fix.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Adrian Bunk cf9a6adeae kbuild: fix export_report.pl
This patch fixes an annoying bug of export_report.pl missing the usages
of some exports.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Paolo 'Blaisorblade' Giarrusso 0bce67352b kbuild: script to check for undefined Kconfig symbols
To avoid having to look manually for used but undefined Kconfig variables,
I've written a script which tries do this efficiently, in case all other
attention fail.  It accounts for _MODULE suffix and for UML_ prefixes to
Kconfig variable, but otherwise looks for exact matches (i.e.  \<CONFIG_;
this is done to exclude macros like MMCONFIG_).

Undefined Kconfig variables should be not be removed without care, but for
instance arch/i386/boot/ uses a bunch of undefined Kconfig vars:

$ scripts/checkunknowndefines.sh arch/i386/boot/
arch/i386/boot/video.h uses undefined symbol VIDEO_400_HACK
arch/i386/boot/video-vga.c uses undefined symbol VIDEO_400_HACK
arch/i386/boot/video.c uses undefined symbol VIDEO_RETAIN
arch/i386/boot/video.h uses undefined symbol VIDEO_RETAIN
arch/i386/boot/video.h uses undefined symbol VIDEO_SVGA
arch/i386/boot/video.h uses undefined symbol VIDEO_VESA
arch/i386/boot/video-vesa.c uses undefined symbol VIDEO_VESA

It should also be mentioned in SubmittingPatches and SubmitChecklist.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Sam Ravnborg aa1e5ef5c1 kbuild: check if we can link gettext not just compile
cygwin provides the header file but the lib file needs
to be added manually. A generic fix is to check if
we can compile and link a program that uses gettext()
and if it fails fall back to NO_NLS.

International users of cygwin may have to specify
HOST_LOADLIBES := "-lintl" on the make command line.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Sam Ravnborg 4f4c4ee1b7 kbuild: Use Elfnn_Half as replacement for Elfnn_Section
The Elfnn_Section is not available on all platforms,
noteworthy are cygwin.
Use the safe replacement _Half.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-12 21:13:50 +02:00
Linus Torvalds 038a5008b2 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (867 commits)
  [SKY2]: status polling loop (post merge)
  [NET]: Fix NAPI completion handling in some drivers.
  [TCP]: Limit processing lost_retrans loop to work-to-do cases
  [TCP]: Fix lost_retrans loop vs fastpath problems
  [TCP]: No need to re-count fackets_out/sacked_out at RTO
  [TCP]: Extract tcp_match_queue_to_sack from sacktag code
  [TCP]: Kill almost unused variable pcount from sacktag
  [TCP]: Fix mark_head_lost to ignore R-bit when trying to mark L
  [TCP]: Add bytes_acked (ABC) clearing to FRTO too
  [IPv6]: Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493, try2
  [NETFILTER]: x_tables: add missing ip6t_modulename aliases
  [NETFILTER]: nf_conntrack_tcp: fix connection reopening
  [QETH]: fix qeth_main.c
  [NETLINK]: fib_frontend build fixes
  [IPv6]: Export userland ND options through netlink (RDNSS support)
  [9P]: build fix with !CONFIG_SYSCTL
  [NET]: Fix dev_put() and dev_hold() comments
  [NET]: make netlink user -> kernel interface synchronious
  [NET]: unify netlink kernel socket recognition
  [NET]: cleanup 3rd argument in netlink_sendskb
  ...

Fix up conflicts manually in Documentation/feature-removal-schedule.txt
and my new least favourite crap, the "mod_devicetable" support in the
files include/linux/mod_devicetable.h and scripts/mod/file2alias.c.

(The latter files seem to be explicitly _designed_ to get conflicts when
different subsystems work with them - that have an absolutely horrid
lack of subsystem separation!)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-11 19:40:14 -07:00
Linus Torvalds 55982fd184 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  [AVR32] Fix random segfault with preemption
  [AVR32] Don't use __builtin_xchg()
  [AVR32] ngw100 i2c-gpio tweaks
  [AVR32] Ignore a few irrelevant syscalls
  [AVR32] SMC configuration in clock cycles
  [AVR32] Drop support for redundant "keepinitrd" boot-time parm.
  [AVR32] Make dma_sync_*_for_cpu no-ops
  [AVR32] Remove unneeded 8K alignment of .text section
  [AVR32] Kill a few hardcoded constants in vmlinux.lds
  [AVR32] rename vmlinux.lds
  [AVR32] fix command line parsing in early_parse_fbmem
  [AVR32] checkstack support
  [AVR32] Wire up USBA device
  [AVR32] add multidrive support for pio driver
  [AVR32] /sys/kernel/debug/at32ap_clk
  [AVR32] Move AT32_PM_BASE definition into pm.h
2007-10-11 19:13:44 -07:00
Linus Torvalds 6abd2c860e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (67 commits)
  mmc: don't use weight32()
  pxamci: support arbitrary block size
  sdio: make the IRQ thread more resilient in the presence of bad states
  sdio: fix IRQ diagnostic message
  sdhci: remove old dma module params
  sdhci: add SDHCI_QUIRK_BROKEN_DMA quirk
  sdhci: remove DMA capability check from controller's PCI Class reg
  sdhci: fix a typo
  mmc: Disabler for Ricoh MMC controller
  sdio: adaptive interrupt polling
  mmc: pxamci: add SDIO card interrupt reporting capability
  mmc: pxamci: set proper buswidth capabilities according to PXA flavor
  mmc: pxamci: set proper block capabilities according to PXA flavor
  mmc: pxamci: better pending IRQ determination
  arm: i.MX/MX1 SDHC implements SD cards read-only switch read-back
  mmc: add led trigger
  mmc_spi host driver
  MMC core learns about SPI
  MMC/SD card driver learns SPI
  MMC headers learn about SPI
  ...
2007-10-11 18:57:31 -07:00
Thomas Gleixner d2c75f2f4b x86: fixup the x86 namespace change in scripts/namespace.pl
Let namespace.pl look at the correct files.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11 17:56:02 +02:00
Haavard Skinnemoen 0367d89274 [AVR32] checkstack support
Add regexes to recognize stack frame adjustments in AVR32 code.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-10-11 12:16:56 +02:00
Thomas Gleixner 96a388de5d i386/x86_64: move headers to include/asm-x86
Move the headers to include/asm-x86 and fixup the
header install make rules

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11 11:20:03 +02:00
Pavel Emelyanov 4665079cbb [NETNS]: Move some code into __init section when CONFIG_NET_NS=n
With the net namespaces many code leaved the __init section,
thus making the kernel occupy more memory than it did before.
Since we have a config option that prohibits the namespace
creation, the functions that initialize/finalize some netns
stuff are simply not needed and can be freed after the boot.

Currently, this is almost not noticeable, since few calls
are no longer in __init, but when the namespaces will be
merged it will be possible to free more code. I propose to
use the __net_init, __net_exit and __net_initdata "attributes"
for functions/variables that are not used if the CONFIG_NET_NS
is not set to save more space in memory.

The exiting functions cannot just reside in the __exit section,
as noticed by David, since the init section will have
references on it and the compilation will fail due to modpost
checks. These references can exist, since the init namespace
never dies and the exit callbacks are never called. So I
introduce the __exit_refok attribute just like it is already
done with the __init_refok.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:54:58 -07:00
Michael Buesch 61e115a56d [SSB]: add Sonics Silicon Backplane bus support
SSB is an SoC bus used in a number of embedded devices.  The most
well-known of these devices is probably the Linksys WRT54G, but there
are others as well.  The bus is also used internally on the BCM43xx
and BCM44xx devices from Broadcom.

This patch also includes support for SSB ID tables in modules, so
that SSB drivers can be loaded automatically.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10 16:51:36 -07:00
Pierre Ossman d59b66c7a5 sdio: add modalias support
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 20:53:33 +02:00
Roman Zippel f82f3f9422 kconfig: oldconfig shall not set symbols if it does not need to
Avoid setting the value if the symbol doesn't need to be changed or can't
be changed. Later choices may change the dependencies and thus the
possible input range.

make oldconfig from a 2.6.22 .config with CONFIG_HOTPLUG_CPU not set
was in some configurations setting CONFIG_HOTPLUG_CPU=y without asking,
even when there was no actual requirement for CONFIG_HOTPLUG_CPU.
This was triggered by SUSPEND_SMP that does a select HOTPLUG_CPU.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Tested-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-09-01 08:24:09 +02:00
Andy Whitcroft 22f2a2ef9b update checkpatch.pl to version 0.09
This version brings a number of new checks, and a number of bug
fixes.  Of note:

  - checks for spacing on round and square bracket combinations
  - loosening of the single statement brace checks, to allow
    them when they contain comments or where other blocks in a
    compound statement have them.
  - parks the multple declaration support
  - allows architecture defines in architecture specific headers

Andy Whitcroft (21):
      Version: 0.09
      loosen single statement brace checks
      fix up multiple declaration to avoid function arguments
      add some function space parenthesis check exceptions
      handle EXPORT_'s with parentheses in their names
      clean up some warnings in multi-line macro bracketing support
      park the multiple declaration checks
      make block brace checks count comments as a statement
      __volatile__ and __extension__ are not functions
      allow architecture specific defined within architecture includes
      check spacing on square brackets
      check spacing on parentheses
      ensure we apply checks to the part before start comment
      check #ifdef conditional spacing
      handle __init_refok and __must_check
      add noinline to inline checks
      prevent email addresses from tripping spacing checks
      handle typed initialiser spacing
      handle line contination as end of line
      add bool to the type matcher
      refine EXPORT_SYMBOL checks to handle pointers

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:41 -07:00
Ralf Baechle ad0b142772 kbuild: whitelist references from __dbe_table to .init
This is needed on MIPS where the same mechanism as get_user() is used to
intercept bus error exceptions for some hardware probes.  Without this
patch modpost will throw spurious warnings:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  MODPOST vmlinux
WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text:

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-31 15:39:40 -07:00
Sam Ravnborg cb7e51d8b1 kbuild: fix modpost warnings for xtensa
The Xtensa architecture places literal pools in sections separate
from the instructions. The corresponsing text sections, therefore,
reference the .literal section, and we have to suppress those
warnings.

The naming convention defines the name for a literal
section as .SECTION.literal, unless .SECTION is .text. In that case
the name is only .literal. Using strncmp() instead of strcmp()
to compare the from-section with .SECTION.init.refok in pattern 0
should not cause any regressions for other architectures.

We also need to suppress warnings for two informational
sections (.xt.lit and .xt.prop) used by the Xtensa architecture.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 22:24:52 +02:00
Sam Ravnborg 83cda2bb37 kbuild: be more foregiving on init section naming
In the whitelist function of modpost now use the same
check to identify init_section as in other places of modpost.
This has the effect that we now recognize sections named
.init.text.19 as init sections and we no longer warn
when we see these.

At the same time make surrounding code readable by dropping
use of temporary flags.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 21:52:31 +02:00
Sam Ravnborg 2f5ee61904 kbuild: rearrange a few function in modpost
This is a preparational patch that just move
two functions and add one (for now unused) function.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 21:46:40 +02:00
Roland McGrath 114f515777 kbuild: use LDFLAGS_MODULE only for .ko links
Sam Ravnborg pointed out that Documentation/kbuild/makefiles.txt already
says this is what it's for.  This patch makes the reality live up to the
documentation.  This fixes the problem of LDFLAGS_BUILD_ID getting into too
many places.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 21:18:19 +02:00
Sam Ravnborg 1edf1c00ac kconfig: remove unused members from struct symbol
dep and dep2 in struct symbol was unused - remove them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25 21:14:30 +02:00
Sam Ravnborg 03d2912273 kconfig: attach help text to menus
Roman Zippel wrote:
> A simple example would be
> help texts, right now they are per symbol, but they should really be per
> menu, so archs can provide different help texts for something.

This patch does this and at the same time introduce a few API
funtions used to access the help text.

The relevant api functions are introduced in the various frontends.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25 21:14:26 +02:00
Jesper Juhl 4a645d5ea6 kbuild: fix up printing of Linux C Library version in scripts/ver_linux
I noticed, when running scripts/ver_linux on both a Gentoo system
and a Slackware system, that the line printing the C library
version looked a little odd. So I fixed it up to be in line with
all the rest.

  Old output:
    Linux C Library        > libc.2.5
  New output:
    Linux C Library        2.5

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 21:14:20 +02:00
Sam Ravnborg 8d8d8289df kbuild: do not do section mismatch checks on vmlinux in 2nd pass
We already check and warn about section mismatches from vmlinux
(build as vmlinux.o) during first pass so skip the checks
during the 2nd pass where we process modules.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25 21:14:15 +02:00
Thomas Renninger 29b71a1ca7 ACPI: autoload modules - Create ACPI alias interface
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias
like:
grep acpi /lib/modules/2.6.22-rc4-default/modules.alias
alias acpi*:SNY5001:* sony_laptop
alias acpi*:SNY6001:* sony_laptop
for e.g. the sony_laptop module.
This module matches against all ACPI devices with a HID or CID of SNY5001
or SNY6001

Export an uevent and modalias sysfs file containing the string:
[MODALIAS=]acpi:PNP0C0C:
additional CIDs are concatenated at the end.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23 13:56:16 -04:00
Matthew Wilcox e609ccc316 Fix Lindent to not indent preprocessor comments so far
I recently ran Lindent over the AdvanSys driver and it moved the
comments on #else and #endif lines way over to the right:

	#else                          /* ADVANSYS_DEBUG */

This doesn't match what I expect from kernel style, but it is
documented.  We just need another flag to indent to make this look like:

	#else /* ADVANSYS_DEBUG */

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-20 08:45:38 -07:00
Al Viro 3a5df1d451 m68k: teach modpost about .m68_fixup
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-20 08:24:49 -07:00
Linus Torvalds efffbeee5b Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits)
  xtensa: use DATA_DATA in xtensa
  powerpc: add missing DATA_DATA to powerpc
  cris: use DATA_DATA in cris
  kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
  kbuild: use -fno-optimize-sibling-calls unconditionally
  kconfig: reset generated values only if Kconfig and .config agree.
  kbuild: fix the warning when running make tags
  kconfig: strip 'CONFIG_' automatically in kernel configuration search
  kbuild: use POSIX BRE in headers install target
  Whitelist references from __dbe_table to .init
  modpost white list pattern adjustment
  kbuild: do section mismatch check on full vmlinux
  kbuild: whitelist references from variables named _timer to .init.text
  kbuild: remove hardcoded _logo names from modpost
  kbuild: remove hardcoded apic_es7000 from modpost
  kbuild: warn about references from .init.text to .exit.text
  kbuild: consolidate section checks
  kbuild: refactor code in modpost to improve maintainability
  kbuild: ignore section mismatch warnings originating from .note section
  kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
  ...
2007-07-19 14:28:19 -07:00
Andy Whitcroft f0a594c1c7 update checkpatch.pl to version 0.08
This version brings a number of new checks, and a number of bug
fixes.  Of note:

  - warnings for multiple assignments per line
  - warnings for multiple declarations per line
  - checks for single statement blocks with braces

This patch includes an update for feature-removal-schedule.txt to
better target checks.

Andy Whitcroft (12):
      Version: 0.08
      only apply printk checks where there is a string literal
      allow suppression of errors for when no patch is found
      warn about multiple assignments
      warn on declaration of multiple variables
      check for kfree() with needless null check
      check for single statement braced blocks
      check for aggregate initialisation on the next line
      handle the => operator
      check for spaces between function name and open parenthesis
      move to explicit Check: entries in feature-removal-schedule.txt
      handle pointer attributes

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19 10:04:47 -07:00
Randy Dunlap cdccb316c0 kernel-doc: fix leading dot in man-mode output
If a parameter description begins with a '.', this indicates a "request"
for "man" mode output (*roff), so it needs special handling.

Problem case is in include/asm-i386/atomic.h for function
atomic_add_unless():
 * @u: ...unless v is equal to u.
This parameter description is currently not printed in man mode output.

[akpm@linux-foundation.org: cleanup]
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>
2007-07-19 10:04:45 -07:00
Randy Dunlap 51f5a0c8f6 kernel-doc: strip C99 comments
Strip C99-style comments from the input stream.
/*...*/ comments are already stripped.
C99 comments confuse the kernel-doc script.

Also update some comments.

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>
2007-07-19 10:04:45 -07:00
Randy Dunlap 5f8c7c98ae kernel-doc: fix unnamed struct/union warning
Fix kernel-doc warning:
Warning(linux-2.6.22-rc2-git2/include/linux/skbuff.h:316): No description found for parameter '}'

which is caused by nested anonymous structs/unions ending with:
  };
};

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>
2007-07-19 10:04:45 -07:00
Tejun Heo 9281acea6a kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
KSYM_NAME_LEN is peculiar in that it does not include the space for the
trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
buffer.  This is nonsense and error-prone.  Moreover, when the caller
forgets that it's very likely to subtly bite back by corrupting the stack
because the last position of the buffer is always cleared to zero.

This patch increments KSYM_NAME_LEN by one and updates code accordingly.

* off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
  is fixed.

* Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
  MODULE_NAME_LEN was treated as if it didn't include space for the
  trailing '\0'.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Paulo Marques <pmarques@grupopie.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 10:23:03 -07:00
Paulo Marques 7c5d249ad3 kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
The only in-kernel user of "memmem" is scripts/kallsyms.c and it only
uses it to find tokens that are 2 bytes in size. It is trivial to
replace it with a simple function that finds 2-byte tokens.

This should help users from systems that don't have the memmem GNU
extension available.

Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:36:08 +02:00
Roman Zippel d8982ba1f2 kconfig: reset generated values only if Kconfig and .config agree.
Normally generated values (Kconfig entries without a prompt) are cleared as
they are regenerated anyway and so they appear as new should they become
visible and defaults work as expected (once a value is set defaults aren't
used anymore).

The detection whether a value is generated or not is only based on its
visibility status, which can quickly change for a lot of symbols by just
removing a single line from .config or adding a dependency to Kconfig as you
noticed.

The patch now suppresses this logic when .config and Kconfig aren't in sync
and .config needs to be updated, so that you can remove now a random value
from .config and oldconfig won't reask for many other values.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:24:55 +02:00
Bernhard Walle 0584f9f9cb kconfig: strip 'CONFIG_' automatically in kernel configuration search
Modify the ncurses configuration tool ('make menuconfig') in a way that the
user can enter the search string (/) both with or without the leading
'CONFIG_'.

This simplifies using copy & paste from .config files because you can
select the whole word.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:24:55 +02:00
Mike Frysinger c05190371d kbuild: use POSIX BRE in headers install target
The sed expression used at the moment in scripts/Makefile.headersinst
relies on the (handy) GNU extension where you can escape ERE's in an
otherwise BRE without using the GNU -r option.  The following patch
replaces this "\+" usage with a functionally equivalent POSIX BRE compliant
"\{1,\}".  Tested with `make headers_install` against blackfin/x86_64/i386
targets.

Stupid whiny OS X users and their crappy sed ;)

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 14:24:55 +02:00
Ralf Baechle eec73e887a Whitelist references from __dbe_table to .init
This is needed on MIPS where the same mechanism as get_user() is used to
intercept bus error exceptions for some hardware probes.  Without this
patch modpost will throw spurious warnings:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  MODPOST vmlinux
WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text:

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 11:15:48 +02:00
Jan Beulich a5eb6a502b modpost white list pattern adjustment
gcc puts data into .data.rel or .data.rel.* on some architectures (e.g.
ia64) or under certain conditions, so whatever is legal relative to
.data should also be legal for those other sections. Fixes a few
modpost warnings on ia64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 11:10:21 +02:00
Sam Ravnborg 741f98fe29 kbuild: do section mismatch check on full vmlinux
Previously we did do the check on the .o files used to link
vmlinux but that failed to find questionable references across
the .o files.
Create a dedicated vmlinux.o file used only for section mismatch checks
that uses the defualt linker script so section does not get renamed.

The vmlinux.o may later be used as part of the the final link of vmlinux
but for now it is used fo section mismatch only.
For a defconfig build this is instant but for an allyesconfig this
add two minutes to a full build (that anyways takes ~2 hours).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17 10:54:06 +02:00
Sam Ravnborg 1e29a706ee kbuild: whitelist references from variables named _timer to .init.text
arm uses a lot of ops structures named *_timer that has legitimite
references to .init.text.
So let's add this variable to the list of variables that may reference
.init.text without causing any warning.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:25:00 +02:00
Sam Ravnborg 92cc6b0725 kbuild: remove hardcoded _logo names from modpost
Replaced this with a __init_refok marker
in front of fb_find_logo().

I think that the __initdata marker for the logo's are
wrong but I have not justified this so I did not remove it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:24:55 +02:00
Sam Ravnborg d3ab78560b kbuild: remove hardcoded apic_es7000 from modpost
Replace the hardcoded variable name apic_es7000 in modpost
with a __initdata_refok marker.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:24:51 +02:00
Sam Ravnborg 6fc53bae3d kbuild: warn about references from .init.text to .exit.text
The .exit.text section may be discarded either at build or at runtime.
So let modpost warn if this situation is detected.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:24:47 +02:00
Sam Ravnborg 1d8af559f9 kbuild: consolidate section checks
Move more checks from whitelist to the section check functions.
Remove the redundent pci_fixup check.
Renumber the patterns.
No functional changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:24:13 +02:00
Sam Ravnborg 1087247b7d kbuild: refactor code in modpost to improve maintainability
There were a great deal of overlap between the two functions
that check which sections may reference .init.text and .exit.text.
Factor out common check to a separate function and
sort entries in the original functions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 23:21:34 +02:00
Sam Ravnborg b28242e7e3 kbuild: ignore section mismatch warnings originating from .note section
.note* sections are ELF notes, which are typically used by external
tools to examine the kernel image.  Since this is removed from any
runtime consideration, it's OK to reference any section from a .note*
section.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 22:41:47 +02:00
Jeremy Fitzhardinge 1de564bbf8 kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
The .paravirtprobe section is obsolete, so modpost doesn't need to handle it.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 22:41:11 +02:00
Stephen Rothwell 1abe02fef9 kbuild: suppress modpost warnings for references from the .toc section as used by powerpc
We should do better here by effetively "dereferencing" references to
the .toc (or the .got2) section, but that is much harder.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 22:40:22 +02:00
Sam Ravnborg 56a974fa2d kbuild: make better section mismatch reports on arm
With this change we can find more symbols hereby improving
the readability of the warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 22:39:35 +02:00
Atsushi Nemoto ae4ac12323 kbuild: make better section mismatch reports on i386 and mips
On i386 and MIPS, warn_sec_mismatch() sometimes fails to show
usefull symbol name.  This is because empty 'refsym' due to 0 r_addend
value.  This patch is to adjust r_addend value, consulting with
apply_relocate() routine in kernel code.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:48:49 +02:00
Sam Ravnborg b70e325cfe kconfig: fix update-po-config
Massimo Maiurana <maiurana@gmail.com> reported that
update-po-config was broken:
1) spelling errors in Makefile so arch/um failed
2) UTF-8 was not supported

The following patch address the above problems.
kxgettext now append the output to the .pot file
generated by xgettext - so we have a header.
In all places UFT-8 is specifed so we now flawlessly
support UTF-8.
The Kconfig files had an empty string in a few cases -
these are now supressed in kxgettext.

With this the translators can now pick up where they left
and get it all translated.
There are ~11000 strings to be translated...

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Massimo Maiurana <maiurana@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-16 21:15:53 +02:00
Mike Frysinger 4c6f2eb979 kbuild: add support for squashing uid/gid in gen_initramfs_list.sh
Sometimes it is useful to squash all uid's/gid's to 0:0 regardless of
current owner.  For example, in build systems that get run as arbitrary
users (uClinux-dist).  This adds a special "squash" keyword so you can do
'-g squash -u squash' and have ownership squashed to root.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-07-16 21:15:52 +02:00
Mike Frysinger e99c343f16 kconfig: use POSIX equality test in check-lxdialog.sh
The "==" operator is not in POSIX, so use -eq instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:15:51 +02:00
H. Peter Anvin cb3ed5b7e0 scripts: Make cleanfile/cleanpatch warn about long lines
Make the "cleanfile" and "cleanpatch" script warn about long lines,
by default lines whose visual width exceeds 79 characters.

Per suggestion from Auke Kok.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:15:50 +02:00
Sam Ravnborg d72e5edbf4 kbuild: avoid environment to set variables used by kbuild
A few of the variables used by kbuild has fixed naming.
Make sure we do not pick up random values from the environment.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:15:49 +02:00
Segher Boessenkool 0ab2a272e6 kbuild: New 'cc-fullversion' macro
Prints a six-digit string including the GCC patchlevel.  Also fix
the 'usage' comment for cc-version.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16 21:15:47 +02:00
Randy Dunlap dcecc6c700 doc/oops-tracing: add Code: decode info
Add info that the Code: bytes line contains <xy> or (wxyz) in some
architecture oops reports and what that means.

Add a script by Andi Kleen that reads the Code: line from an Oops report
file and generates assembly code from the hex bytes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:48 -07:00
Andy Whitcroft de7d4f0e11 update checkpatch.pl to version 0.07
This version brings a number of new checks, fixes for flase
positives, plus a clarification of the output to better guide use.  Of
note:

  - checks for documentation for new __setup calls
  - clearer reporting where braces and parenthesis are involved
  - reports for closing brace and semi-colon spacing
  - reports on unwanted externs

This patch includes an update to the documentation on checkpatch.pl
itself to clarify when it should be used and to indicate that it
is not intended as the final arbitor of style.

Full changelog:

Andy Whitcroft (19):
      Version: 0.07
      ensure we do not apply control brace checks to preprocesor directives
      add {u,s}{8,16,32,64} to the type matcher
      accept lack of spacing after the semicolons in for (;;)
      report new externs in .c files
      fix up typedef exclusion for function prototypes
      else trailing statements check need to account for \ at end of line
      add enums to the type matcher
      add missing check descriptions
      suppress double reporting of ** spacing
      report on do{ spacing issues
      include an example of the brace/parenthesis in output
      check for spacing after closing braces
      prevent double reports on pointer spacing issues
      handle blank continuation lines on macros
      classify all reports error, warning, or check
      revamp hanging { checks and apply in context
      no spaces after the last ; in a for is ok
      check __setup has a corresponding addition to documentation

David Woodhouse (1):
      limit character set used in patches and descriptions to UTF-8

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:34 -07:00
David Woodhouse 0db19c412c x86_64: fix headers_install
A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of
files all of which are using the same #ifdef guard, "__ASM_STUB_" with no
postfix.  So the second and later asm files #included in the same C file
(often through standard headers like ioctl.h) yields no symbols.

Strangeness with the Ubuntu 'tell me if I support something that's not
explcitly mentioned in POSIX, and I'll strip it out' shell, I believe.

We don't need the 'export' but we do need a semicolon at the end of the
FNAME line:

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-06 10:23:43 -07:00
David Woodhouse edd5cd4a94 Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM
Not all the world is an i386.  Many architectures need 64-bit arguments to be
aligned in suitable pairs of registers, and the original
sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
argument register for padding after the first integer.  Since we don't
normally have more than 6 arguments for system calls, that left no room for
the final argument on some architectures.

Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
all fits nicely.  In fact, ARM already had that, but called it
sys_arm_sync_file_range.  Move it to fs/sync.c and rename it, then implement
the needed compatibility routine.  And stop the missing syscall check from
bitching about the absence of sys_sync_file_range() if we've implemented
sys_sync_file_range2() instead.

Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-28 11:38:30 -07:00
Andy Whitcroft d8aaf12142 update checkpatch.pl to version 0.06
Update to checkpatch.pl v0.06.  Of note:

 - do { and else handled correctly as control structures for { matching
 - trailing whitespace correctly tripped when line otherwise empty
 - support for const, including const foo * const bar
 - multiline macros defining values correctly reported

This version of checkpatch.pl can be found at the following URL:

http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.06

Full Changelog:

Andy Whitcroft (14):
      Version: 0.06
      cleanup the Type regular expression declarations
      fix up block counting
      end of line counts as a space for ++ and --
      do { needs the same checks as if, for et al
      handle "const foo * const a" as a valid type
      add spacing checks following ;
      complete whitespace lines should trip trailing whitespace check
      else is also a block control structure
      badly formatted else can trip function declaration
      detect and report trailing statements after else
      types need to be terminated by a boundary
      multiline macros defining values should be surrounded by parentheses
      soften the wording of the Signed-off-by: warnings

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-24 08:59:12 -07:00
Andy Whitcroft 653d4876b7 update checkpatch.pl to version 0.05
This version brings a some new tests, and a host of changes to fix
false positives, of particular note:

 - detect 'var ++;' and 'var --;' as a bad combination
 - multistatement #defines are now checked based on statement count
 - multistatement #defines with initialisation correctly reported
 - checks the location of the inline keywords
 - EXPORT_SYMBOL for variables are now understood
 - typedefs are loosened to handle sparse etc

This version of checkpatch.pl can be found at the following URL:

      http://www.shadowen.org/~apw/public/checkpatch/checkpatch.pl-0.05

Full Changelog:

Andy Whitcroft (18):
      Version: 0.05
      macro definition checks should be for a single statement
      avoid assignements only in if conditionals
      declarations of function pointers need no space
      multiline macros which are purely initialisation cannot be wrapped
      EXPORT_SYMBOL can also directly follow a variable definition
      check on the location of the inline keyword
      EXPORT_SYMBOL needs to allow for attributes
      ensure we do not find C99 // in strings
      handle malformed #include lines
      accept the {0,} form
      typedefs are sensible for defining function pointer parameters
      ensure { handling correctly handles nested switch() statements
      trailing whitespace checks are not anchored
      typedefs for sparse bitwise annotations make sense
      update the type matcher to include sparse annotations
      clean up indent and spacing

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-24 08:59:11 -07:00
Sam Ravnborg 2648a53acf kbuild: fix sh64 section mismatch problems
There's a special .cranges section that is almost always generated,
with data being moved to the appropriate section by the linker at a later
stage.

To give a bit of background, sh64 has both a native SHmedia instruction
set (32-bit instructions) and SHcompact (which is compatability with
normal SH -- 16-bit, a massively reduced register set, etc.). code ranges
are emitted when we're using the 32-bit ABI, but not the 64-bit one.

It is a special staging section used solely by binutils where code with
different flags get placed (more specifically differing flags for input
and output sections), before being lazily merged by the linker.

The closest I've been able to find to documentation is:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/emultempl/sh64elf.em?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=src

It's an array of 8-byte Elf32_CRange structure given in
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-sh64.h?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=src
that describes for which ISA a range is used.

Silence the warnings by allowing references from .init.text to .cranges.

The following warnings are fixed:

WARNING: init/built-in.o(.cranges+0x0): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0xa): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x14): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x1e): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x28): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x32): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x50): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x5a): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x64): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0xfa): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x104): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x10e): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x154): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x15e): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x6e): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x78): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x82): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0xaa): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x136): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x140): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x168): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x1f4): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x1fe): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x302): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x30c): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x316): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x3a2): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x3ac): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x4ce): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x4d8): Section mismatch: reference to .init.text:

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Kaz Kojima <kkojima@rr.iij4u.or.jp>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-06-11 21:52:04 +02:00
Andy Whitcroft 00df344fd0 update checkpatch.pl to version 0.04
This version brings a some new tests, and a host of changes to fix
false positives, of particular note:

  - check for and report #if 0
  - extend checking of line lengths and spacing for .pl, .sh etc
  - extends the pointer type checks to multiple levels
  - updates printk handling to track newlines
  - adds a wrapped patch detector
  - drops the leading component of the filenames
  - extends switch indent handling to switch statmentes rooted in
    the context
  - adds foo * bar single pointer checks

This version of checkpatch.pl can be found at the following URL:

      http://www.shadowen.org/~apw/public/checkpatch/checkpatch.pl-0.04

Full Changelog:

Andy Whitcroft (16):
      allow checking line lengths and spacing on other source files
      clean up that whitespace
      sanitise the input line standardising the content of quotes
      clean up pointer type * and space checks
      fix up the sanitiser so it maintains the line length
      apply the printk facility checks only to the first printk in a set
      switch/case indent checks may anchor in the context
      add a wrapped patch detector
      put the #ifdef in C file checks on ice
      asm volatile is acceptable
      check for and report #if 0
      drop the leading component of the filename as patches are -p1
      use the original line when reporting operator errors
      correct spelling of Joel's name
      Version: 0.04
      add support for struct foo * bar checks

Geert Uytterhoeven (1):
      Fix checkpatch.pl name in usage template

Randy Dunlap (1):
      checkpatch: produce fewer lines of output

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08 17:23:34 -07:00
Randy Dunlap 389834b680 checkpatch: produce fewer lines of output
Produce one less line of output per flagged incident.

Change this:

use tabs not spaces
PATCH: /home/rddunlap/arcmsr1200014.patch4:756:
FILE: b/drivers/scsi/arcmsr/arcmsr_hba.c:1843:
+                     return PCI_ERS_RESULT_NEED_RESET;$

to this:

use tabs not spaces
#756: FILE: b/drivers/scsi/arcmsr/arcmsr_hba.c:1843:
+                     return PCI_ERS_RESULT_NEED_RESET;$

Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08 17:23:34 -07:00
Andy Whitcroft 4a0df2ef45 update checkpatch.pl to version 0.03
This version brings a host of changes to cure false positives and
bugs detected on patches submitted to lkml and -mm.  It also brings
a number of new tests in response to reviews, of particular note:

  - catch use of volatile
  - allow deprecated functions to be listed in feature-removal-schedule.txt
  - warn about #ifdef's in c files
  - check that spinlock_t and struct mutex use is commented
  - report on architecture specific defines being used
  - report memory barriers without an associated comment

Full changelog:

      catch use of volatile
      convert other quoted string checks to common routine
      alloc deprecated functions to be listed in feature-removal-schedule.txt
      split out the line length and indent for each line
      improve switch block handling
      handle GNU diff context lines with no leading space
      warn about #ifdef's in c files
      tidy up tests for signed-off-by using raw mode
      check that spinlock_t and struct mutex use is commented
      syntax checks for open brace placement may drop off the bottom of hunk
      report memory barriers without an associated comment
      when a sign off is present but ugly do not report it missing
      do not mistake bitfield definitions for indented labels
      report on architecture specific defines being used
      major update to the operator checks
      prevent switch/if/while etc matching foo_switch
      generify assignement in condition error message
      introduce an operator context marker
      Version: 0.03

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08 17:23:32 -07:00
Andy Whitcroft 8381e04b90 checkpatch.pl: should be executable
scripts/checkpatch.pl should be executable, make it so.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07 08:52:15 -07:00
Andy Whitcroft 0a920b5b66 add a trivial patch style checker
We are seeing increasing levels of minor patch style violations in submissions
to the mailing lists as well as making it into the tree.  These detract from
the quality of the submission and cause unnessary work for reviewers.

As a first step package up the current state of the patch style checker and
include it in the kernel tree.  Add instructions suggesting running it on
submissions.  This adds version v0.01 of the checkpatch.pl script.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
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>
2007-06-01 08:18:28 -07:00
David Woodhouse df5f6311f1 Make 'headerscheck' stop immediately on an error
This should make it stop immediately after printing the _helpful_ error
message, rather than continuing to spit out many pages more of 'CHECK
include/linux/foo.h' before eventually coming to a halt with something
less obvious.

Now I get this...
  CHECK   include/linux/smb_fs.h
/shiny/git/linux-2.6/usr/include/linux/smb_fs.h requires linux/jiffies.h, which does not exist in exported headers
make[2]: *** [/shiny/git/linux-2.6/usr/include/linux/.check.smb_fs.h] Error 1
make[1]: *** [linux] Error 2
make: *** [headers_check] Error 2

Signed-off-by-if-Sam-says-so: David Woodhouse <dwmw2@infradead.org>
[ Sam had better say so! This made me waste way too much time. - Linus]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 21:47:27 -07:00
Linus Torvalds efa5bf1dd2 Revert "kbuild: make better section mismatch reports on i386, arm and mips"
This reverts commit f892b7d480, which
totally broke the build on x86 with CONFIG_RELOCATABLE (which, as far as
I can tell, is the only case where it should even matter!) due to a
SIGSEGV in modpost.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 18:41:17 -07:00
Linus Torvalds 080e89270a Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix:
  mm/slab: fix section mismatch warning
  mm: fix section mismatch warnings
  init/main: use __init_refok to fix section mismatch
  kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
  all-archs: consolidate .data section definition in asm-generic
  all-archs: consolidate .text section definition in asm-generic
  kbuild: add "Section mismatch" warning whitelist for powerpc
  kbuild: make better section mismatch reports on i386, arm and mips
  kbuild: make modpost section warnings clearer
  kconfig: search harder for curses library in check-lxdialog.sh
  kbuild: include limits.h in sumversion.c for PATH_MAX
  powerpc: Fix the MODALIAS generation in modpost for of devices
2007-05-21 12:03:04 -07:00
Andi Kleen 4c87b948b2 x86_64: Support x86_64 in make buildtar
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:56:56 -07:00
Sam Ravnborg 577a32f620 mm: fix section mismatch warnings
modpost had two cases hardcoded for mm/
Shift over to __init_refok and kill the
hardcoded function names in modpost.

This has the drawback that the functions
will always be kept no matter configuration.
With previous code the function were placed in
init section if configuration allowed it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:58 +02:00
Sam Ravnborg 92080309df init/main: use __init_refok to fix section mismatch
Kill a special case in modpost by introducing the
__init_refok marker.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:58 +02:00
Sam Ravnborg 0e0d314e6a kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
Throughout the kernel there are a few legitimite references
to init or exit sections. Most of these are covered by the
patterns included in modpost but a few nees special attention.
To avoid hardcoding a lot of function names in modpost introduce
a marker so relevant function/data can be marked.
When modpost see a reference to a init/exit function from
a function/data marked no warning will be issued.

Idea from: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
2007-05-19 09:11:58 +02:00
Li Yang cd5477911f kbuild: add "Section mismatch" warning whitelist for powerpc
This patch fixes the following class of "Section mismatch" warnings when
building powerpc platforms.

WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from prom_entry (offset 0x0)
WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.text:mpc8313_rdb_probe from .machine.desc after 'mach_mpc8313_rdb' (at offset 0x4)
....

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:57 +02:00
Atsushi Nemoto f892b7d480 kbuild: make better section mismatch reports on i386, arm and mips
On i386, ARM and MIPS, warn_sec_mismatch() sometimes fails to show
usefull symbol name.  This is because empty 'refsym' due to 0 r_addend
value.  This patch is to adjust r_addend value, consulting with
apply_relocate() routine in kernel code.

Without this patch:
  MODPOST vmlinux
WARNING: init/built-in.o - Section mismatch: reference to .init.text: from .text between 'rest_init' (at offset 0xf4) and 'try_name'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

With this patch:
  MODPOST vmlinux
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

Now modpost can detect "kernel_init" name (and whitelist it) and show
"set_up_list3s" name.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:57 +02:00
Russell King 2560120997 kbuild: make modpost section warnings clearer
Change modpost section mismatch warnings to be less confusing;
model them on the binutils linker warnings which we all know how
to interpret.

Also, fix the wrong ordering of arguments for the final case -
fromsec and refsymname were reversed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:57 +02:00
Mike Frysinger 03c9587d75 kconfig: search harder for curses library in check-lxdialog.sh
The check-lxdialog.sh script searches for "libFOO.so" which fails on OS X, due
to their special naming of libraries like "libfoo.dylib".  This patch turns
the curses lib search into extensible loops and adds dylib as a valid
extension.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:11:15 +02:00
Mike Frysinger fc31c77163 kbuild: include limits.h in sumversion.c for PATH_MAX
POSIX says limits.h defines PATH_MAX so we should include it (which fixes
compiling on some systems like OS X).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:10:59 +02:00
Sylvain Munaut d1ab423502 powerpc: Fix the MODALIAS generation in modpost for of devices
Since the devices may have multiple (or none) compatible properties,
the uevent generated internally by the kernel may have multiple
"C..." entries. So the MODALIAS stored in the module must have
wilcard before and after the compatible entry.
Also, if the 'compatible' field is not used for matching, there
will be no 'C' and that must handled as well.

The previous code handled all those case incorrectly and it
"mostly" worked ... but not always.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-19 09:10:10 +02:00
Linus Torvalds 9a9136e270 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
  sound: convert "sound" subdirectory to UTF-8
  MAINTAINERS: Add cxacru website/mailing list
  include files: convert "include" subdirectory to UTF-8
  general: convert "kernel" subdirectory to UTF-8
  documentation: convert the Documentation directory to UTF-8
  Convert the toplevel files CREDITS and MAINTAINERS to UTF-8.
  remove broken URLs from net drivers' output
  Magic number prefix consistency change to Documentation/magic-number.txt
  trivial: s/i_sem /i_mutex/
  fix file specification in comments
  drivers/base/platform.c: fix small typo in doc
  misc doc and kconfig typos
  Remove obsolete fat_cvf help text
  Fix occurrences of "the the "
  Fix minor typoes in kernel/module.c
  Kconfig: Remove reference to external mqueue library
  Kconfig: A couple of grammatical fixes in arch/i386/Kconfig
  Correct comments in genrtc.c to refer to correct /proc file.
  Fix more "deprecated" spellos.
  Fix "deprecated" typoes.
  ...

Fix trivial comment conflict in kernel/relay.c.
2007-05-09 12:54:17 -07:00
Roman Zippel e61a1c1c4f Allow arch to initialize arch field of the module structure
This will later allow an arch to add module specific information via linker
generated tables instead of poking directly in the module object structure.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-09 12:30:56 -07:00
Borislav Petkov 0366299bd2 kernel-doc: small kernel-doc optimization
Get the kernel version string only once from the environment, thus slightly
speeding up kernel-doc.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
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>
2007-05-09 12:30:50 -07:00
Michael Opdenacker 59c51591a0 Fix occurrences of "the the "
Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 08:57:56 +02:00
Borislav Petkov 53f049fa5f kill warnings when building mandocs
This patch shuts warnings of the sort:

make -C /mnt/samsung_200/sam/kernel/trees/21-rc6/build \
	KBUILD_SRC=/mnt/samsung_200/sam/kernel/trees/21-rc6 \
	KBUILD_EXTMOD="" -f /mnt/samsung_200/sam/kernel/trees/21-rc6/Makefile mandocs
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=scripts/basic
make -f /mnt/samsung_200/sam/kernel/trees/21-rc6/scripts/Makefile.build obj=Documentation/DocBook mandocs
  SRCTREE=/mnt/samsung_200/sam/kernel/trees/21-rc6/ /mnt/samsung_200/sam/kernel/trees/21-rc6/build/scripts/basic/docproc doc /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/wanbook.tmpl >Documentation/DocBook/wanbook.xml
  if grep -q refentry Documentation/DocBook/wanbook.xml; then xmlto man -m /mnt/samsung_200/sam/kernel/trees/21-rc6/Documentation/DocBook/stylesheet.xsl -o Documentation/DocBook/man Documentation/DocBook/wanbook.xml ; gzip -f Documentation/DocBook/man/*.9; fi
Note: meta version: No productnumber or alternative     sppp_close
Note: meta version: No refmiscinfo@class=version        sppp_close
Note: Writing sppp_close.9
Note: meta version: No productnumber or alternative     sppp_open
Note: meta version: No refmiscinfo@class=version        sppp_open

by adding a RefMiscInfo xml tag in the form of the current kernel version
to the function, struct and enum definitions in files included by
kernel-doc when building 'mandocs'.  However, the version string appears
truncated on the manpage due to some constraints in the xml DTD for the man
header, I believe, for the troff output is truncated too.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:13 -07:00
Randy Dunlap 3eb014a103 kernel-doc: html mode struct highlights
Johannes Berg reported that struct names are not highlighted
(bold, italic, etc.) in html kernel-doc output.  (Also not in
text-mode output, but I don't see that changing.)

This patch adds the following:
- highlight struct names in html output mode
- highlight environment var. names in html output mode
- indent struct fields in the original struct layout

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:10 -07:00
Borislav Petkov 884f2810b1 kernel-doc: handle arrays with arithmetic expressions as initializers
In a different approach here's a patch that handles the special case of
composite arithmetic expressions in array size initializers.  With it,
prior to pushing the split strings on the @first_arg array, I split the
keywords before the array name as before and then keep the array name along
with the subscript expression as a single whole element which gets pushed
last.  In this manner, kernel-doc produces correct output without removing
whitespaces which makes the array subscripts unreadable in the docs.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
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>
2007-05-08 11:15:09 -07:00
Randy Dunlap 3c308798a3 scripts: kernel-doc whitespace cleanup
Whitespace cleanup only:  convert some series of spaces to tabs.

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>
2007-05-08 11:14:59 -07:00
Yasunori Goto 72280ede31 Add white list into modpost.c for memory hotplug code and ia64's machvec section
This patch is add white list into modpost.c for some functions and
ia64's section to fix section mismatchs.

  sparse_index_alloc() and zone_wait_table_init() calls bootmem allocator
  at boot time, and kmalloc/vmalloc at hotplug time. If config
  memory hotplug is on, there are references of bootmem allocater(init text)
  from them (normal text). This is cause of section mismatch.

  Bootmem is called by many functions and it must be
  used only at boot time. I think __init of them should keep for
  section mismatch check. So, I would like to register sparse_index_alloc()
  and zone_wait_table_init() into white list.

  In addition, ia64's .machvec section is function table of some platform
  dependent code. It is mixture of .init.text and normal text. These
  reference of __init functions are valid too.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:57 -07:00
Bryan Wu 1394f03221 blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix!  Tinyboards.

The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc.  (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000.  Since then ADI has put this core into its Blackfin
processor family of devices.  The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set.  It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.

The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf

The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc

This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/

We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel

[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:58 -07:00
Linus Torvalds 15700770ef Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
  kconfig: fix mconf segmentation fault
  kbuild: enable use of code from a different dir
  kconfig: error out if recursive dependencies are found
  kbuild: scripts/basic/fixdep segfault on pathological string-o-death
  kconfig: correct minor typo in Kconfig warning message.
  kconfig: fix path to modules.txt in Kconfig help
  usr/Kconfig: fix typo
  kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
  kbuild: be more explicit on missing .config file
  kbuild: clarify the creation of the LOCALVERSION_AUTO string.
  kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
  kconfig: refer to qt3 if we cannot find qt libraries
  kbuild: handle compressed cpio initramfs-es
  kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
  kbuild: remove stale comment in modpost.c
  kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
  kbuild: fix make mrproper for Documentation/DocBook/man
  kbuild: remove kconfig binaries during make mrproper
  kconfig/menuconfig: do not hardcode '.config'
  kbuild: override build timestamp & version
  ...
2007-05-06 13:21:57 -07:00
Marcin Garski 11de39e2fb kconfig: fix mconf segmentation fault
I have found small bug in mconf, when you run it without any argument it
will sigsegv.

Without patch:
$ scripts/kconfig/mconf
Segmentation fault

With patch:
$ scripts/kconfig/mconf
can't find file (null)

Signed-off-by: Marcin Garski <mgarski@post.pl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-06 09:27:15 +02:00
Sam Ravnborg 767e581d75 kbuild: enable use of code from a different dir
To introduce support for source in one directory but output files
in another directory during a non O= build prefix all paths
with $(src) repsectively $(obj).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-06 09:23:45 +02:00
Sam Ravnborg 5447d34b08 kconfig: error out if recursive dependencies are found
Sample:
config FOO
	bool "This is foo"
	depends on BAR

config BAR
	bool "This is bar"
	depends on FOO

This will result in following error message:
error: found recursive dependency: FOO -> BAR -> FOO

And will then exit with exit code equal 1 so make will stop.
Inspired by patch from: Adrian Bunk <bunk@stusta.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
2007-05-06 09:20:10 +02:00
Andy Green 04c58f8196 kbuild: scripts/basic/fixdep segfault on pathological string-o-death
build scripts: fixdep blows segfault on string CONFIG_MODULE seen

The string "CONFIG_MODULE" appearing anywhere in a source file causes
fixdep to segfault.  This string appeared in the wild in the current
mISDN sources (I think they meant CONFIG_MODULES).  But it shouldn't
segfault (esp as CONFIG_MODULE appeared in a quoted string).

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 21:35:03 +02:00
Robert P. J. Day 1e093ecd4a kconfig: correct minor typo in Kconfig warning message.
Correct a minor spelling mistake in a Kconfig warning message.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:12 +02:00
Randy Dunlap 7ac1c14525 kbuild: be more explicit on missing .config file
Somewhat in reponse to kernel bugzilla #8197, be more explicit about
why 'make all' fails when there is no .config file.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:11 +02:00
Michael Ellerman eda890af79 kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
If the find(1) in scripts/gen_initramfs_list.sh generates any errors, it
will cause gen_initramfs_list.sh to fail (because of "set -e"), however
the errors from find are not printed to the user. This is rather confusing:

~/src/powerpc$ make O=~/build/powerpc-cell32/
make[2]: *** [usr/initramfs_data.cpio.gz] Error 1
make[1]: *** [usr] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [_all] Error 2

It is much easier to work out what the problem is if we let the errors
from find hit the console, eg:

~/src/powerpc$ make O=~/build/powerpc-cell32/
find: /home/michael/initramfs-source/home: Permission denied
find: /home/michael/initramfs-source/lost+found: Permission denied
find: /home/michael/initramfs-source/opt: Permission denied
find: /home/michael/initramfs-source/root: Permission denied
make[2]: *** [usr/initramfs_data.cpio.gz] Error 1
make[1]: *** [usr] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes.  Stop.
make: *** [_all] Error 2

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:11 +02:00
Sam Ravnborg 9ae57004ca kconfig: refer to qt3 if we cannot find qt libraries
We do not support qt4 (yet) so the simple fix was to warn
that qt3 are missing.
The better fix would have been to implment qt4 support
but that has failed so far.

This solves http://bugzilla.kernel.org/show_bug.cgi?id=8277

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Alex Landau c299ec2d8e kbuild: handle compressed cpio initramfs-es
Make kbuild handle compressed cpio initramfs-es.  An already compressed
cpio is copied directly to usr/, while a non-compressed cpio is filtered
through gzip (no changes here) on its way to usr/.

If the user has created a compressed cpio by other means, this saves him
from uncompressing it, just to be compressed again by kbuild.

Signed-off-by: Alex Landau <landau.alex@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg b4d5171ac7 kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
Added on request from:  Rusty Russell <rusty@rustcorp.com.au>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Rusty Russell <rusty@rustcorp.com.au>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 66bd32e443 kbuild: remove stale comment in modpost.c
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Uwe kleine-König f03e1666d6 kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
I'm currently using CROSS_COMPILE="ccache arm-linux-".  With that the bash
builtin command "type" searches for ccache and arm-linux-mkimage and so sets
MKIMAGE="/path/to/ccache" as I don't have arm-linux-mkimage.  Then the script
dies with an error, that ccache doesn't support the argument -A.

This patch adds some quoting such that it works again for me.

Please note that this patch doesn't help you if you use ${CROSSCOMPILE}-mkimage
and ccache as mkuboot.sh now searches for the command
"ccache arm-linux-mkimage".

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:10 +02:00
Sam Ravnborg 145c90475f kbuild: remove kconfig binaries during make mrproper
Nigel Cunningham <nigel@nigel.suspend2.net> noticed
that 'make mrproper' did not remove mconf.
Fixed so we now remove all relevant binaries.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Nigel Cunningham <nigel@nigel.suspend2.net>
2007-05-02 20:58:10 +02:00
Sam Ravnborg d802b50f0d kconfig/menuconfig: do not hardcode '.config'
Export and use the function conf_get_configname()
to retreive the default configuration filename.

Suggested by: Roman Zippel <zippel@linux-m68k.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 87c94bfb8a kbuild: override build timestamp & version
Introduce KBUILD_BUILD_VERSION to make it
possible to override kernel build version
during build time.

Introduce KBUILD_BUILD_TIMESTAMP to make it
possible to override kernel build timestamp
during build time.

But variables are useful mainly by distros
that want to pass info from an SCM when
building the kernel. Timestamp could be last
checkin date for a file etc.

The idea came from Olaf Hering <olaf@aepfle.de>

Cc: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg c53aeca059 kbuild: complain about missing system calls
Most system calls seems to get added to i386 first. This patch
automatically generates a warning for any new system call which is
implemented on i386 but not the architecture currently being compiled.
On PowerPC at the moment, for example, it results in these warnings:
init/missing_syscalls.h:935:3: warning: #warning syscall sync_file_range not implemented
init/missing_syscalls.h:947:3: warning: #warning syscall getcpu not implemented
init/missing_syscalls.h:950:3: warning: #warning syscall epoll_pwait not implemented

The file scripts/checksyscalls.sh list a number of legacy system calls
that are ignored because they only makes sense on i386 systems.

Other contributors to this patch are Russell King <rmk+lkml@arm.linux.org.uk>
and Stéphane Jourdois <kwisatz@rubis.org>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 4be40e2223 kbuild: do not emit src version warning for non-modules
modpost is now called with .o files that are not modules.
So do not warn if there is no corresponding .mod
file listing .o files (in .tmp_versions/).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:09 +02:00
Sam Ravnborg 95e30f9593 menuconfig: remember alternate config filename
When loading an alternate configuration use that file as
current configuration filename.
Make the filename visible in the dialog.
Default continue to be .config.

Inspired by patch from: Cyrill Gorcunov <gorcunov@gmail.com>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc:  Cyrill Gorcunov <gorcunov@gmail.com>
2007-05-02 20:58:09 +02:00
Matthew Wilcox 2a11665945 kbuild: distinguish between errors and warnings in modpost
Some of modpost's warnings are fatal, and some are not.  Adopt the
compiler distinction between errors and warnings by calling merror()
for fatal diagnostics and warn() for non-fatal ones.
merror() was used as replacemtn for error() to avoid clash with glibc

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Marco Costalba 63431e7569 kconfig/xconfig: sync main view with search dialog current menu
When changing current menu in search dialog update also main view

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Mike Frysinger f88d205501 menuconfig: dont use obsolete index() function in lxdialog
The index() function is obsolete, use strchr() instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
H. Peter Anvin 6e019b001d cleanpatch: a script to clean up stealth whitespace added by a patch
This script is a companion to the "cleanfile" script.  This cleans
up a patch in unified diff format *before* it is applied.  Note that
the empty lines at the end of file detection *requires* that the diff was
taken with at least one line of context around each hunk, or bad things
will happen.

This script cleans up various classes of stealth whitespace.  In
particular, it cleans up:

- Whitespace (spaces or tabs)before newline;
- DOS line endings (CR before LF);
- Space before tab (spaces are deleted or converted to tabs);
- Empty lines at end of file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
H. Peter Anvin 12b315603a cleanfile: a script to clean up stealth whitespace
This script cleans up various classes of stealth whitespace.  In
particular, it cleans up:

- Whitespace (spaces or tabs)before newline;
- DOS line endings (CR before LF);
- Space before tab (spaces are deleted or converted to tabs);
- Empty lines at end of file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg dc24f0e708 kbuild: remove dependency on input.h from file2alias
Almost all definitions used by file2alias was already
present in mod_devicetable.h.
Added the last definition and killed the input.h usage.

The errornous include was pointed out
by: Jan Engelhardt <jengelh@linux01.gwdg.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Deepak Saxena <dsaxena@plexity.net>
2007-05-02 20:58:08 +02:00
Sam Ravnborg 5a4910fbbe kbuild: whitelist logo references from .text to .init.data
drivers/video/logo has references from .text to .init.data
but function is only used during early init.
So reference is OK and we do not want to warn about them =>
whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:08 +02:00
Sam Ravnborg a61b2dfd18 kbuild: fix segmentation fault in modpost
If modpost was called manually with filenames without '/'
then modpost would segfault.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 9bf8cb9b79 kbuild: fix warnings from .pci_fixup section
Now where we do not pass vmlinux to modpost we started
to see section mismatch warnings from .pci_fixup.
Refactored code a little to include these in the
whitelist again.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg aae5f662a3 kbuild: whitelist section mismatch in init/main.c
In init/main.c we have a reference from rest_init() to .init.text
which is intentional.
Rename the function 'init' to 'kernel_init' to make it a
kernel wide unique symbol and whitelist the reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Sam Ravnborg 85bd2fddd6 kbuild: fix section mismatch check for vmlinux
vmlinux does not contain relocation entries which is
used by the section mismatch checks.
Reported by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Use the individual objects as inputs to overcome
this limitation.
In modpost check the .o files and skip non-ELF files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02 20:58:07 +02:00
Vivek Goyal 1833d6bc72 [PATCH] i386: modpost apic related warning fixes
o Modpost generates warnings for i386 if compiled with CONFIG_RELOCATABLE=y

WARNING: vmlinux - Section mismatch: reference to .init.text:find_unisys_acpi_oem_table from .text between 'acpi_madt_oem_check' (at offset 0xc0101eda) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:acpi_get_table_header_early from .text between 'acpi_madt_oem_check' (at offset 0xc0101ef0) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'acpi_madt_oem_check' (at offset 0xc0101f2e) and 'enable_apic_mode'
WARNING: vmlinux - Section mismatch: reference to .init.text:setup_unisys from .text between 'acpi_madt_oem_check' (at offset 0xc0101f37) and 'enable_apic_mode'WARNING: vmlinux - Section mismatch: reference to .init.text:parse_unisys_oem from .text between 'mps_oem_check' (at offset 0xc0101ec7) and 'acpi_madt_oem_check'
WARNING: vmlinux - Section mismatch: reference to .init.text:es7000_sw_apic from .text between 'enable_apic_mode' (at offset 0xc0101f48) and 'check_apicid_present'

o Some functions which are inline (acpi_madt_oem_check) are not inlined by
  compiler as these functions are accessed using function pointer. These
  functions are put in .text section and they in-turn access __init type
  functions hence modpost generates warnings.

o Do not iniline acpi_madt_oem_check, instead make it __init.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-05-02 19:27:08 +02:00
Jan Beulich c21b1e4d9b [PATCH] kbuild: fix dependency generation
Commit 2e3646e51b changed the way the
split config tree is built, but failed to also adjust fixdep accordingly
- if changing a config option from or to m, files referencing the
respective CONFIG_..._MODULE (but not the corresponding CONFIG_...)
didn't get rebuilt.

The problem is that trisate symbol are represent with three different
symbols:
    SYMBOL=n => no symbol defined
    SYMBOL=y => CONFIG_SYMBOL defined to '1'
    SYMBOL=m => CONFIG_SYMBOL_MODULE defined to '1'

But conf_split_config do not distingush between the =y and =m case, so
only the =y case is honoured.

This is fixed in fixdep so when a CONFIG symbol with _MODULE is found we
skip that part and only look for the CONFIG_SYMBOL version.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-01 14:23:57 -07:00
Randy Dunlap 328d24403d [PATCH] kernel-doc: allow space after __attribute__
Allow space(s) between "__attribute__" and "((blah))" so that
kernel-doc does not complain like:

Warning(/tester/linsrc/linux-2.6.20-git15//kernel/timer.c:939): No description found for parameter 'read_persistent_clock(void'

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>
2007-03-01 14:53:36 -08:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
David Brownell da68d61f89 [PATCH] remove modpost false warnings on ARM
This patch stops "modpost" from issuing erroneous modpost warnings on ARM
builds, which it's been doing since since maybe last summer.  A canonical
example would be driver method table entries:

  WARNING: <path> - Section mismatch: reference to .exit.text:<name>_remove
	from .data after '$d' (at offset 0x4)

That "$d" symbol is generated by tools conformant with ARM ABI specs; in
this case it's a symbol **in the middle of** a "<name>_driver" struct.

The erroneous warnings appear to be issued because "modpost" whitelists
references from "<name>_driver" data into init and exit sections ...  but
doesn't know should also include those "$d" mapping symbols, which are not
otherwise associated with "<name>_driver" symbols.

This patch prevents the modpost symbol lookup code from ever returning
those mapping symbols, so it will return a whitelisted symbol instead.
Then things work as expected.

Now to revert various code-bloating "fixes" that got merged because of this
modpost bug....

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Randy Dunlap 262d9b0130 [PATCH] kernel-doc: include struct short description in title output
Output of a function or struct in html mode needs to include the short
description from the function/struct name line in the output title line.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:14 -08:00
Kyle McMartin f354ef8abe [PARISC] rename *_ANY_ID to PA_*_ANY_ID in the exported header
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:09:12 -05:00
Kyle McMartin f3cf267335 [PARISC] generate modalias for parisc_device_id tables
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:08:45 -05:00
Kyle McMartin e7b3ca0854 Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
2007-02-17 00:18:23 -05:00
Linus Torvalds 414f827c46 Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (94 commits)
  [PATCH] x86-64: Remove mk_pte_phys()
  [PATCH] i386: Fix broken CONFIG_COMPAT_VDSO on i386
  [PATCH] i386: fix 32-bit ioctls on x64_32
  [PATCH] x86: Unify pcspeaker platform device code between i386/x86-64
  [PATCH] i386: Remove extern declaration from mm/discontig.c, put in header.
  [PATCH] i386: Rename cpu_gdt_descr and remove extern declaration from smpboot.c
  [PATCH] i386: Move mce_disabled to asm/mce.h
  [PATCH] i386: paravirt unhandled fallthrough
  [PATCH] x86_64: Wire up compat epoll_pwait
  [PATCH] x86: Don't require the vDSO for handling a.out signals
  [PATCH] i386: Fix Cyrix MediaGX detection
  [PATCH] i386: Fix warning in cpu initialization
  [PATCH] i386: Fix warning in microcode.c
  [PATCH] x86: Enable NMI watchdog for AMD Family 0x10 CPUs
  [PATCH] x86: Add new CPUID bits for AMD Family 10 CPUs in /proc/cpuinfo
  [PATCH] i386: Remove fastcall in paravirt.[ch]
  [PATCH] x86-64: Fix wrong gcc check in bitops.h
  [PATCH] x86-64: survive having no irq mapping for a vector
  [PATCH] i386: geode configuration fixes
  [PATCH] i386: add option to show more code in oops reports
  ...
2007-02-14 09:46:06 -08:00
Cyrill V. Gorcunov ed8b4d4d7a [PATCH] qconf: hide empty list items
This patch fixes showing empty config list items if "Option/Show All
Options" is turned on.  For example empty items appears on list of 'Block
Layer' menu.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Cyrill V. Gorcunov f253f00003 [PATCH] qconf: Back button behaviour normalization
Do "Back" button behaviour normalization so it is enabled starting from
second-level menu only.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Cyrill V. Gorcunov 786fb18d01 [PATCH] qconf: fix showing help info on failed search
qconf does not clear help text in search window if previous search has been
failed.

Signed-off-by: Cyrill V. Gorcunov <gorcunov@mail.ru>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:52 -08:00
Shlomi Fish 66e7c7230f [PATCH] qconf: relocate Search Command
Relocate the qconf search command to the "Edit"->"Find" menu option.

This is per the discussion on my qconf search dialog patch.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00
Karsten Wiese 49e5646d65 [PATCH] qconf: immediately update integer and string values in xconfig display
In xconfig's display integer and string values are also shown as part of
the config item's descriptive text.

This patch updates the descriptive text, when the corresponding value has
been changed.  Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7744

Take2 uses updateList() so config values dependending on the changed value
see the change.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00
s situert 895a39a084 [PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -v
Fix a minor bug in mkcompile_h.  As one can see, the current locale is used
while getting the version of gcc.  This produces problems when a locale
other than C or en_US is used.  As an example, my /proc/version contains
Turkish characters in iso-8859-9 encoding.

This patch fixes this issue by making sure that the C locale is used to get
gcc's version.

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00
Mike Frysinger 8c7e4498ad [PATCH] search a little harder for mkimage
Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
the standard `mkimage`

The Blackfin toolchain includes mkimage, but we dont want to namespace
collide with any of the user's system setup, so we prefix it with our
toolchain name.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Oleg Verych <olecom@flower.upol.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:51 -08:00