Commit Graph

1444 Commits

Author SHA1 Message Date
Nicolas Palix cf5842de75 Add scripts/coccinelle/alloc/kzalloc-simple.cocci
This semantic patch replaces a pair of calls to kmalloc and memset
by a single call to kzalloc.

It only looks for simple cases to avoid false positives.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-12 00:00:29 +02:00
Nicolas Palix 51169c8015 Add scripts/coccinelle/alloc/drop_kmalloc_cast.cocci
The purpose of this semantic patch is to remove
useless casts, as mentioned in the Linux documentation.
See Chapter 14 in Documentation/CodingStyle for more information.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-12 00:00:29 +02:00
Nicolas Palix 74425eee71 Add a target to use the Coccinelle checker
A 'coccicheck' target is added. It can be called with four different
modes. Each one generates a different kind of output, i.e. context,
patch, org, report, according to the corresponding mode to be
activated.

The new target calls the 'coccicheck' front-end in the 'scripts'
directory with the MODE argument. Every SmPL file in the
subdirectories of 'scripts/coccinelle' is then given to the front-end
and applied to the entire source tree.

The four modes behave as follows:

'report' generates a list in the following format:
  file:line:column-column: message

'patch' proposes a fix, when possible.

'context' highlights lines of interest and their context in a
diff-like style. Lines of interest are indicated with '-'.

'org' generates a report in the Org mode format of Emacs.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-12 00:00:29 +02:00
Michal Marek 607b30fcf2 kbuild: Create output directory in Makefile.modbuiltin
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-10 12:23:08 +02:00
Arnaldo Carvalho de Melo 8e5564e6c7 perf tools: Make target to generate self contained source tarball
Useful for when people want to try some version of the perf tools and don't
wants to download the kernel tarball.

Here is a session using this new target:

  [root@emilia linux-2.6-tip]# make help | grep -i perf
    perf-tar-src-pkg    - Build perf-2.6.35-rc1.tar source tarball
    perf-targz-src-pkg  - Build perf-2.6.35-rc1.tar.gz source tarball
    perf-tarbz2-src-pkg - Build perf-2.6.35-rc1.tar.bz2 source tarball
  [root@emilia linux-2.6-tip]# make perf-tarbz2-src-pkg
    TAR
  [root@emilia linux-2.6-tip]# ls -la perf-2.6.35-rc1.tar.bz2
  -rw-r--r-- 1 root root 295731 May 31 11:18 perf-2.6.35-rc1.tar.bz2
  [root@emilia linux-2.6-tip]# tar xf perf-2.6.35-rc1.tar.bz2
  [root@emilia linux-2.6-tip]# cd perf-2.6.35-rc1
  [root@emilia perf-2.6.35-rc1]# ls
  arch  HEAD  include  lib  tools
  [root@emilia perf-2.6.35-rc1]# cd tools/perf
  [root@emilia perf]# make -j9 2>&1 | tail
      CC arch/x86/util/dwarf-regs.o
      CC util/probe-finder.o
      CC util/newt.o
      CC util/scripting-engines/trace-event-perl.o
      CC scripts/perl/Perf-Trace-Util/Context.o
      CC perf.o
      CC builtin-help.o
      AR libperf.a
      LINK perf
  rm .perf.dev.null
  [root@emilia perf]# ./perf record -a sleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.262 MB perf.data (~11457 samples) ]
  [root@emilia perf]# ./perf report | head -12
  # Events: 6K cycles
  #
  # Overhead          Command       Shared Object  Symbol
  # ........  ...............  ..................  ......
  #
       4.73%             perf  [kernel.kallsyms]   [k] format_decode
       4.49%             perf  libc-2.12.so        [.] _IO_file_underflow_internal
       4.38%             init  [kernel.kallsyms]   [k] mwait_idle
       3.29%             perf  [kernel.kallsyms]   [k] vsnprintf
       2.38%             init  [kernel.kallsyms]   [k] sched_clock_local
       2.35%             init  [kernel.kallsyms]   [k] apic_timer_interrupt
       1.86%     sirq-timer/5  [kernel.kallsyms]   [k] find_busiest_group
  [root@emilia perf]#

Acked-by: Michal Marek <mmarek@suse.cz>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20100528185357.GA28009@ghostprotocols.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-06-05 09:33:35 -03:00
Linus Torvalds c1518f12ba Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  gconfig: fix build failure on fedora 13
2010-06-04 15:37:21 -07:00
Don Zickus e26d6b834c Makefile.build: make KBUILD_SYMTYPES work again
commit 37a8d9f67f tried to combine some
duplicate code and accidentally broke how KBUILD_SYMTYPES worked

This fixes the code to match the original intention by the author who
originally added the code I believe.

The fixes include:
- removing extra whitespaces in the if-statements
- moving the if-statement from around the -r to the -T
- adding a second arg to cmd_gensymtypes to simplify the options passed
  to genksyms.

Tested by instrumenting genksyms and seeing what options were passed in
during a make, KBUILD_SYMTYPES make, and when a foo.symref was created.

Everything compiled and looked ok.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-04 12:46:48 +02:00
Rabin Vincent b396aa0308 scripts: decodecode: remove bashisms
Remove bashisms to make scripts/decodecode work with other shells.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-04 10:26:35 +02:00
Li Zefan e7401d8321 menuconfig: truncate list items
Truncate list items to fit in a single line, otherwise those items
which have long prompts will cover some other items.

This follows the behavior of menubox.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:41:02 +02:00
Li Zefan 42ef223c4a menuconfig: fix to center checklist correctly in a corner case
Run:
	make ARCH=arm menuconfig

And then select "System Type" -> "ARM system type". The kconfig
"choice" menu at this point looks empty.

It's because config ARCH_S3C2410 has a long prompt:

config ARCH_S3C2410
        bool "Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443, S3C2450"
	...

menuconfig centers the checklist according to this prompt without
considering the width of the list, and then things get wrong.

Reported-by: Nobin Mathew <nobin.mathew@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:41:02 +02:00
Rogério Brito aa42abedc3 kbuild: Change section of generated debian packages to kernel
To follow the way that Official Debian kernel packages are made, put the
generated packages in the right section, the kernel section.  This also
avoids polluting the admin section.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:53 +02:00
Rogério Brito 2d7204ac60 kbuild: Mark that the packages generated conform to Standards-Version 3.8.4
The packages generated by the builddeb script conform to the Debian
Policy version 3.8.4. Make this explicit in the generated packages.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:52 +02:00
Rogério Brito ee6eed803d kbuild: Add homepage field to debian/control file
This helps when the user sees information of the packages on package
managers like aptitude.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 13:17:52 +02:00
Roland Dreier 03b550d3f9 checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters
Quite a few Kconfig symbols contain lowercase letters.  The current
checkkconfigsymbols.sh code only contains A-Z in the regexp it uses to
find config symbols in source code, so it comes up with the wrong symbol
to look for in Kconfig files and then generates false positives when it
doesn't find that wrong symbol.  For example checking drivers/net
generates a false positive for MAC89 because the the actual config
option is MAC89x0.

Fix this by also adding a-z to the regexp.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 10:39:39 +02:00
Américo Wang 073ed10363 scripts: add nconf into gitignore file
scripts/kconfig/nconf is generated by 'make nconfig',
add it into .gitignore.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 10:12:40 +02:00
Richard Kennedy cbab05f041 gconfig: fix build failure on fedora 13
Making gconfig fails on fedora 13 as the linker cannot resolve dlsym.

Adding libdl to the link command fixes this.

make shows this error :-
    /usr/bin/ld: scripts/kconfig/kconfig_load.o: undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
    /usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
    /lib64/libdl.so.2: could not read symbols: Invalid operation

tested on x86_64 fedora 13.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-03 10:05:18 +02:00
Li Zefan 39a4897c1b xconfig: add support to show hidden options which have prompts
This feature has been supported in menuconfig and gconfig, so
here add it to xconfig.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:33 +02:00
Li Zefan 120d63e633 xconfig: remove unused function
Remove ConfigInfoView::setSource().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:33 +02:00
Li Zefan c1f96f091e xconfig: clean up
@ok is a pointer to a bool var, so we should check the value of
*ok. But actually we don't need to check it, so just remove the
if statement.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:33 +02:00
Li Zefan c10d03caf3 gconfig: fix null pointer warning
In gconfig if you enable "Show all options", you'll see some "(null)"
config options, and clicking those options triggers a warning:

(gconf:9368): Gtk-CRITICAL **: gtk_text_buffer_insert_with_tags: assertion `text != NULL' failed

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:33 +02:00
Li Zefan e0bb7fe2d7 gconfig: fix to tag NEW symbols correctly
The logic should be reversed.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:32 +02:00
Li Zefan f9447c4939 menuconfig: improive help text a bit
Suggested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:32 +02:00
Li Zefan 3fb9acb329 kconfig: fix to tag NEW symbols correctly
Those configs are not new:

  $ cat .config
  ...
  CONFIG_NAMESPACES=y
  ...
  CONFIG_BLOCK=y
  ...

But are tagged as NEW:

  $ yes "" | make config > myconf
  $ cat myconf | grep '(NEW)'
  Namespaces support (NAMESPACES) [Y/?] (NEW) y
  ...
  Enable the block layer (BLOCK) [Y/?] (NEW) y
  ...

You can also notice this bug when using gconfig/xconfig.

It's because the SYMBOL_DEF_USER bit of an invisible symbol is cleared
when the config file is read:

int conf_read(const char *name)
{
	...
	for_all_symbols(i, sym) {
		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
			/* Reset values of generates values, so they'll appear
			 * as new, if they should become visible, but that
			 * doesn't quite work if the Kconfig and the saved
			 * configuration disagree.
			 */
			if (sym->visible == no && !conf_unsaved)
				sym->flags &= ~SYMBOL_DEF_USER;
	...
}

But a menu item which represents an invisible symbol is still
visible, if it's sub-menu is visible, so its SYMBOL_DEF_USER
bit should be set to indicate it's not NEW.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:32 +02:00
Li Zefan 70ed074718 kconfig: print the range of integer/hex symbol in help text
Without this patch, one has to refer to the Kconfig file to find
out the range of an integer/hex symbol.

  │ Symbol: NR_CPUS [=4]
  │ Type  : integer
  │ Range : [2 8]
  │ Prompt: Maximum number of CPUs
  │   Defined at arch/x86/Kconfig:761
  │   Depends on: SMP [=y] && !MAXSMP [=n]
  │   Location:
  │     -> Processor type and features

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:10:32 +02:00
Li Zefan b040b44c35 kconfig: print symbol type in help text
Randy suggested to print out the symbol type in gconfig.

Note this change does more than Randy's suggestion, that it also
affects menuconfig and "make config".

  │ Symbol: BLOCK [=y]
  │ Type  : boolean
  │ Prompt: Enable the block layer
  │   Defined at block/Kconfig:4
  │   Depends on: EMBEDDED [=n]

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 15:09:12 +02:00
Aristeu Rozanski f0778c8c41 kconfig: introduce nonint_oldconfig and loose_nonint_oldconfig
This patch has been around for a long time in Fedora and Red Hat Enterprise
Linux kernels and it may be useful for others. The nonint_oldconfig target
will fail and print the unset config options while loose_nonint_oldconfig will
simply let the config option unset. They're useful in distro kernel packages
where the config files are built using a combination of smaller config files.

Arjan van de Ven wrote the initial nonint_config and Roland McGrath added the
loose_nonint_oldconfig.

Signed-off-by: Arjan van de Ven <arjan@redhat.com> [defunct email]
Whatevered-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
[mmarek: whitespace fixes]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02 14:40:09 +02:00
Linus Torvalds 1f73897861 Merge branch 'for-35' of git://repo.or.cz/linux-kbuild
* 'for-35' of git://repo.or.cz/linux-kbuild: (81 commits)
  kbuild: Revert part of e8d400a to resolve a conflict
  kbuild: Fix checking of scm-identifier variable
  gconfig: add support to show hidden options that have prompts
  menuconfig: add support to show hidden options which have prompts
  gconfig: remove show_debug option
  gconfig: remove dbg_print_ptype() and dbg_print_stype()
  kconfig: fix zconfdump()
  kconfig: some small fixes
  add random binaries to .gitignore
  kbuild: Include gen_initramfs_list.sh and the file list in the .d file
  kconfig: recalc symbol value before showing search results
  .gitignore: ignore *.lzo files
  headerdep: perlcritic warning
  scripts/Makefile.lib: Align the output of LZO
  kbuild: Generate modules.builtin in make modules_install
  Revert "kbuild: specify absolute paths for cscope"
  kbuild: Do not unnecessarily regenerate modules.builtin
  headers_install: use local file handles
  headers_check: fix perl warnings
  export_report: fix perl warnings
  ...
2010-06-01 08:55:52 -07:00
Toralf Förster 1743192819 kconfig: Hide error output in find command in streamline_config.pl
Finding the list of Makefiles in streamline-config should not report errors.

Also move the "chomp" to the @makefiles array instead of doing it in the
for loop. This is more efficient, and does not make it any less readable
by C programmers.

Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>
LKML-Reference: <201005262022.02928.toralf.foerster@gmx.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28 10:34:41 -04:00
Toralf Foerster 1d1d1feafd kconfig: Fix typo in comment in streamline_config.pl
Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>
LKML-Reference: <201005281025.52753.toralf.foerster@gmx.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28 10:34:07 -04:00
Toralf Foerster e5199edb9e kconfig: Make a variable local in streamline_config.pl
Proper perl requires that local variables should be declared with 'my',
otherwise this may produce errors.

Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de>
LKML-Reference: <201005281025.00358.toralf.foerster@gmx.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28 10:31:25 -04:00
Albin Tonnerre 2a2a400f66 initramfs: add support for in-kernel initramfs compressed with LZO
Add the necessary parts to be enable the use of LZO-compressed initramfs
build into the kernel.

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:54 -07:00
Tobias Klauser d4977c78e9 checkpatch: warn on declaration with storage class not at the beginning
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:06 -07:00
Andi Kleen 3354957a4f checkpatch: add check for too short Kconfig descriptions
I've seen various new Kconfigs with rather unhelpful one liner
descriptions.  Add a Kconfig warning for a minimum length of the Kconfig
help section.

Right now I arbitarily chose 4. The exact value can be debated.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:06 -07:00
Florian Mickler 0fa0559900 scripts/get_maintainer.pl: default to not include unspecified tags
This changes the default of the option --git-all-signature-types to be
disabled by default.

The effect being, that only certain (currently Signed-Off-By:, Acked-by:
and Reviewed-By:) tags are used to get adresses of potential maintainers.

Motivated is this change by the desire to not 'spam' people unnecessary: A
Tested-By or a Reported-By is not ment as a hint that those people want
to/are able to review patches to the code in question.

In a quest to find resilient statistics for this i came up with this:

I produced a list of all the tag-signers not already covered with a
signed-off/acked/reviewed tag somewhere in the last year of git history.

Those were 650 addresses of "assumed non-developers".

And to check if those "assumed non-developers" are professional
testers/reporters worth cc'ing, i then counted their total appearences
in the git log:

469 were mentioned only once.
123 were mentioned twice.
38 three times
8 four times
5 six times
5 five times
1 eight times
1 fourteen times

I believe this supports my thesis, that the ''non-maintainer-tags'' are
not actively useful for patch-review.  (except probably the guy mentioned
fourteen times...)

But of course one could also find arguments to poke holes in this
statistics, for example does this statistic not include code-locality: A
tested-by on a patch that touches some specific piece of code can be more
worth than a signed-off in another part of the tree.

But...  let's play it safe and let's err on the "safe" side meaning to not
spam those people when in doubt.  We already have the signed-off's and
Maintainers file.  So this should be ok.  And if need be, the maintainers
can always forward the patch.

[i probably could make a diploma thesis out of this changelog :)]

Signed-off-by: Florian Mickler <florian@mickler.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Joe Perches <joe@perches.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:05 -07:00
Joe Perches 368669da20 scripts/get_maintainer.pl: add .get_maintainer.conf default options file
Allow the use of a .get_maintainer.conf file to control the default
options applied when scripts/get_maintainer.pl is run.

.get_maintainer.conf can contain any valid command-line argument.

File contents are prepended to any additional command line arguments.

Multiple lines may be used, blank lines ignored, # is a comment.

Updated scripts/get_maintainer.pl version to 0.24

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:04 -07:00
Joe Perches e4d26b027a scripts/get_maintainer.pl: optionally ignore non-maintainer signatures
When using --git to determine who to send a patch to, get_maintainers will
currently include all signatures.  This can include signers that simply
report an issue or test a patch.  Signers that use this tag are not
necessarily good candidates to review new patches.

This patch allows get_maintainers to optionally restrict output to only
signatures that use Signed-off-by:, Acked-by:, or Reviewed-by:.

Signed-off-by: is included because those are people who are responsible
for the code.

Acked-by: is questionable, but as signers that use this tag tend to be
active linux gatekeepers, false positives are tolerable.

Reviewed-by: is included because signers responsible for the code thought
that the review feedback for a changeset by that signer was valuable.

This patch has been modified from Florian's original submission to change
the supported signature types to the canonical forms and use slightly
different spacing.  A couple of spacing issues were also corrected in the
original source.  The command line argument was also renamed.

Original-patch-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:04 -07:00
Linus Torvalds a8251096b4 Merge branch 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: drop the lock while waiting for module to complete initialization.
  MODULE_DEVICE_TABLE(isapnp, ...) does nothing
  hisax_fcpcipnp: fix broken isapnp device table.
  isapnp: move definitions to mod_devicetable.h so file2alias can reach them.
2010-05-21 17:15:44 -07:00
Peter Zijlstra 1704f47b50 lockdep: Add novalidate class for dev->mutex conversion
The conversion of device->sem to device->mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.

Add a checkpatch error so the usage is reserved for device->mutex.

[ tglx: checkpatch and compile fix for LOCKDEP=n ]

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-21 09:37:30 -07:00
Linus Torvalds f8965467f3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
  qlcnic: adding co maintainer
  ixgbe: add support for active DA cables
  ixgbe: dcb, do not tag tc_prio_control frames
  ixgbe: fix ixgbe_tx_is_paused logic
  ixgbe: always enable vlan strip/insert when DCB is enabled
  ixgbe: remove some redundant code in setting FCoE FIP filter
  ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
  ixgbe: fix header len when unsplit packet overflows to data buffer
  ipv6: Never schedule DAD timer on dead address
  ipv6: Use POSTDAD state
  ipv6: Use state_lock to protect ifa state
  ipv6: Replace inet6_ifaddr->dead with state
  cxgb4: notify upper drivers if the device is already up when they load
  cxgb4: keep interrupts available when the ports are brought down
  cxgb4: fix initial addition of MAC address
  cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
  cnic: Convert cnic_local_flags to atomic ops.
  can: Fix SJA1000 command register writes on SMP systems
  bridge: fix build for CONFIG_SYSFS disabled
  ARCNET: Limit com20020 PCI ID matches for SOHARD cards
  ...

Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).

Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
2010-05-20 21:04:44 -07:00
Linus Torvalds f39d01be4c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
  vlynq: make whole Kconfig-menu dependant on architecture
  add descriptive comment for TIF_MEMDIE task flag declaration.
  EEPROM: max6875: Header file cleanup
  EEPROM: 93cx6: Header file cleanup
  EEPROM: Header file cleanup
  agp: use NULL instead of 0 when pointer is needed
  rtc-v3020: make bitfield unsigned
  PCI: make bitfield unsigned
  jbd2: use NULL instead of 0 when pointer is needed
  cciss: fix shadows sparse warning
  doc: inode uses a mutex instead of a semaphore.
  uml: i386: Avoid redefinition of NR_syscalls
  fix "seperate" typos in comments
  cocbalt_lcdfb: correct sections
  doc: Change urls for sparse
  Powerpc: wii: Fix typo in comment
  i2o: cleanup some exit paths
  Documentation/: it's -> its where appropriate
  UML: Fix compiler warning due to missing task_struct declaration
  UML: add kernel.h include to signal.c
  ...
2010-05-20 09:20:59 -07:00
Linus Torvalds 96b5b7f4f2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (61 commits)
  KEYS: Return more accurate error codes
  LSM: Add __init to fixup function.
  TOMOYO: Add pathname grouping support.
  ima: remove ACPI dependency
  TPM: ACPI/PNP dependency removal
  security/selinux/ss: Use kstrdup
  TOMOYO: Use stack memory for pending entry.
  Revert "ima: remove ACPI dependency"
  Revert "TPM: ACPI/PNP dependency removal"
  KEYS: Do preallocation for __key_link()
  TOMOYO: Use mutex_lock_interruptible.
  KEYS: Better handling of errors from construct_alloc_key()
  KEYS: keyring_serialise_link_sem is only needed for keyring->keyring links
  TOMOYO: Use GFP_NOFS rather than GFP_KERNEL.
  ima: remove ACPI dependency
  TPM: ACPI/PNP dependency removal
  selinux: generalize disabling of execmem for plt-in-heap archs
  LSM Audit: rename LSM_AUDIT_NO_AUDIT to LSM_AUDIT_DATA_NONE
  CRED: Holding a spinlock does not imply the holding of RCU read lock
  SMACK: Don't #include Ext2 headers
  ...
2010-05-20 08:55:50 -07:00
Ondrej Zary fedb3d27d9 MODULE_DEVICE_TABLE(isapnp, ...) does nothing
On Monday 23 November 2009 04:29:53 Rusty Russell wrote:
> On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote:
> > The problem is that
> > scripts/mod/file2alias.c simply ignores isapnp.
>
> AFAICT it always has, and noone has complained until now.  Perhaps
> something was still reading /lib/modules/`uname -r`/modules.isapnpmap?

The patch below works fine (at least with Debian). It needs your first
patch that moves the definitions to mod_devicetable.h. Verified that
aliases for these modules are generated correctly:

drivers/media/radio/radio-sf16fmi.c
drivers/net/ne.c
drivers/net/3c515.c
drivers/net/smc-ultra.c
drivers/pcmcia/i82365.c
drivers/scsi/aha1542.c
drivers/scsi/aha152x.c
drivers/scsi/sym53c416.c
drivers/scsi/g_NCR5380.c

Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380)
cards - they now work automatically.

Generate pnp:d aliases for isapnp_device_tables. This allows udev to load
these modules automatically.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-05-19 17:33:39 +09:30
David S. Miller 2ec8c6bb5d Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
	include/linux/mod_devicetable.h
	scripts/mod/file2alias.c
2010-05-18 23:01:55 -07:00
Linus Torvalds cb41838bbc Merge branch 'core-hweight-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-hweight-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, hweight: Use a 32-bit popcnt for __arch_hweight32()
  arch, hweight: Fix compilation errors
  x86: Add optimized popcnt variants
  bitops: Optimize hweight() by making use of compile-time evaluation
2010-05-18 09:17:01 -07:00
James Morris 539c99fd7f Merge branch 'next' into for-linus 2010-05-18 08:57:00 +10:00
Geert Uytterhoeven bf54a2b3c0 m68k: amiga - Zorro bus modalias support
Add Amiga Zorro bus modalias and uevent support

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-05-17 21:37:41 +02:00
Jiri Kosina 6c9468e9eb Merge branch 'master' into for-next 2010-04-23 02:08:44 +02:00
Li Zefan 06f9a55cf7 gconfig: add support to show hidden options that have prompts
There's a button in gconfig to "Show all options", but I think
normally we are not interested in those configs which have no
prompt and thus can't be changed, so here I add a new button to
show hidden options which have prompts.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:19 +02:00
Li Zefan 22c7eca61e menuconfig: add support to show hidden options which have prompts
Usage:
  Press <Z> to show all config symbols which have prompts.

Quote Tim Bird:

| I've been bitten by this numerous times.  I most often
| use ftrace on ARM, but when I go back to x86, I almost
| always go through a sequence of searching for the
| function graph tracer in the menus, then realizing it's
| completely missing until I disable CC_OPTIMIZE_FOR_SIZE.
|
| Is there any way to have the menu item appear, but be
| unsettable unless the SIZE option is disabled?  I'm
| not a Kconfig guru...

I myself found this useful too. For example, I need to test
ftrace/tracing and want to be sure all the tracing features are
enabled, so I  enter the "Tracers" menu, and press <Z> to
see if there is any config hidden.

I also noticed gconfig and xconfig have a button "Show all options",
but that's a bit too much, and I think normally what we are not
interested in those configs which have no prompt thus can't be
changed by users.

Exmaple:

      --- Tracers
      -*-   Kernel Function Tracer
      - -     Kernel Function Graph Tracer
      [*]   Interrupts-off Latency Tracer
      - -   Preemption-off Latency Tracer
      [*]   Sysprof Tracer

Here you can see 2 tracers are not selectable, and then can find
out how to make them selectable.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:19 +02:00
Li Zefan 7b5d87215b gconfig: remove show_debug option
This option is a no-op, so remove it.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:18 +02:00
Li Zefan 2944235430 gconfig: remove dbg_print_ptype() and dbg_print_stype()
Just use sym_get_type() and prop_get_type_name().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:18 +02:00
Li Zefan c6ccc30fd7 kconfig: fix zconfdump()
zconfdump(), which is used for debugging, can't recognize P_SELECT,
P_RANGE and P_MENU (if associated with a symbol, aka "menuconfig"),
and output something like this:

config X86
  boolean
  default y
  unknown prop 6!
  unknown prop 6!
  unknown prop 6!
  ...

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:18 +02:00
Li Zefan 4280eae099 kconfig: some small fixes
- fix a typo in documentation
- fix a typo in a printk on error
- fix comments in dialog_inputbox()

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-04-14 15:34:18 +02:00
David S. Miller 871039f02f Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/stmmac/stmmac_main.c
	drivers/net/wireless/wl12xx/wl1271_cmd.c
	drivers/net/wireless/wl12xx/wl1271_main.c
	drivers/net/wireless/wl12xx/wl1271_spi.c
	net/core/ethtool.c
	net/mac80211/scan.c
2010-04-11 14:53:53 -07:00
Borislav Petkov d61931d89b x86: Add optimized popcnt variants
Add support for the hardware version of the Hamming weight function,
popcnt, present in CPUs which advertize it under CPUID, Function
0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
default lib/hweight.c sw versions.

A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
a 3x speedup on a F10h machine.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100318112015.GC11152@aftab>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-04-06 15:52:11 -07:00
David Woodhouse 8626d3b432 phylib: Support phy module autoloading
We don't use the normal hotplug mechanism because it doesn't work. It will
load the module some time after the device appears, but that's not good
enough for us -- we need the driver loaded _immediately_ because otherwise
the NIC driver may just abort and then the phy 'device' goes away.

[bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-02 14:30:39 -07:00
James Morris d25d6fa1a9 Merge branch 'master' into next 2010-03-31 08:39:27 +11:00
Gilles Espinasse f77f13e22d Fix comment and Kconfig typos for 'require' and 'fragment'
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-29 15:41:47 +02:00
Randy Dunlap 20072205fc scripts/kernel-doc: fix fatal error on function prototype
Fix a fatal error in scripts/kernel-doc when a function signature uses
__init_or_module (just ignore that string):

Error(drivers/base/platform.c:568): cannot understand prototype: 'struct platform_device * __init_or_module platform_create_bundle(struct platform_driver *driver, int (*probe)(struct platform_device *), struct resource *res, unsigned int n_res, const void *data, size_t size) '

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>
2010-03-24 16:31:20 -07:00
Wolfram Sang 3a4df13d24 get_maintainer: repair STDIN usage
Commit 22dd5b0cba (fix perlcritic warnings)
broke the ability to handle STDIN because the three argument version of
open() cannot handle standard IO-streams (which is mentioned in
PerlBestPractices, too).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:20 -07:00
Randy Dunlap ef5da59f12 scripts/kernel-doc: handle struct member __aligned
scripts/kernel-doc erroneously says:

Warning(include/linux/skbuff.h:410): Excess struct/union/enum/typedef member 'cb' description in 'sk_buff'

on this line in struct sk_buff:
	char			cb[48] __aligned(8);

due to treating the last field as the struct member name, so teach
kernel-doc to ignore __aligned(x) in structs.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-24 16:31:19 -07:00
Jason Gunthorpe b83419363e kbuild: Include gen_initramfs_list.sh and the file list in the .d file
Expand the dependency set used for the initrd to include the
CONFIG_INITRAMFS_SOURCE file and the generator script itself.
Otherwise changing the initramfs file list does not rebuild the CPIO.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-23 13:07:59 +01:00
Li Zefan da6df879b9 kconfig: recalc symbol value before showing search results
A symbol's value won't be recalc-ed until we save config file or
enter the menu where the symbol sits.

So If I enable OPTIMIZE_FOR_SIZE, and search FUNCTION_GRAPH_TRACER:

  Symbol: FUNCTION_GRAPH_TRACER [=y]
  Prompt: Kernel Function Graph Tracer
    Defined at kernel/trace/Kconfig:140
    Depends on: ... [=y] && (!X86_32 [=y] || !CC_OPTIMIZE_FOR_SIZE [=y])
    ...

From the dependency it should result in FUNCTION_GRAPH_TRACER=n,
but it still shows FUNCTION_GRAPH_TRACER=y.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-23 12:29:07 +01:00
Stephen Hemminger 1dcd810024 headerdep: perlcritic warning
Minor perlcritic warning:
headerdep.pl: "return" statement with explicit "undef" at line 84, column 2.  See page 199 of PBP.  (Severity: 5)

The rationale according to PBP is that an explicit return of undef
(contrary to most people's expectations) doesn't
always evaluate as false. It has to with the fact that perl return value
depends on context the function is called. If function is used in
list context, the appropriate return value for false is an empty list;
whereas in scalar context the return value for false is undefined.
By just using a "return" both cases are handled.

In the context of a trivial script this doesn't matter. But one script
may be cut-paste into later code (most people like me only know 50%
of perl), that is why perlcritic always complains

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-23 12:26:38 +01:00
James Morris 310de047ee selinux: fix warning in genheaders
Fix const warning in the genheaders script as a result of
changes to the headers, as noted here:

http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-03/msg03977.html

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: James Morris <jmorris@namei.org>
2010-03-16 08:47:36 +11:00
Thomas Weber 31a2d31dbd kconfig: util: Fix typo in comment
sting replaced with string

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-15 15:17:01 +01:00
Linus Torvalds c32da02342 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
  doc: fix typo in comment explaining rb_tree usage
  Remove fs/ntfs/ChangeLog
  doc: fix console doc typo
  doc: cpuset: Update the cpuset flag file
  Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
  Remove drivers/parport/ChangeLog
  Remove drivers/char/ChangeLog
  doc: typo - Table 1-2 should refer to "status", not "statm"
  tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
  No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
  devres/irq: Fix devm_irq_match comment
  Remove reference to kthread_create_on_cpu
  tree-wide: Assorted spelling fixes
  tree-wide: fix 'lenght' typo in comments and code
  drm/kms: fix spelling in error message
  doc: capitalization and other minor fixes in pnp doc
  devres: typo fix s/dev/devm/
  Remove redundant trailing semicolons from macros
  fix typo "definetly" -> "definitely" in comment
  tree-wide: s/widht/width/g typo in comments
  ...

Fix trivial conflict in Documentation/laptops/00-INDEX
2010-03-12 16:04:50 -08:00
Randy Dunlap 4c98ecaf35 scripts/kernel-doc: fix empty function description section
scripts/kernel-doc mishandles a function that has a multi-line function
short description and no function parameters.  The observed problem was
from drivers/scsi/scsi_netlink.c:

/**
 * scsi_netlink_init - Called by SCSI subsystem to intialize
 * 	the SCSI transport netlink interface
 *
 **/

kernel-doc treated the " * " line as a Description: section with only a
newline character in the Description contents.  This caused
output_highlight() to complain: "output_highlight got called with no
args?", plus produce a perl call stack backtrace.

The fix is just to ignore Description sections if they only contain "\n".

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:35 -08:00
Wu Zhangjin 2d74b2c62c scripts/Makefile.lib: Align the output of LZO
The output of LZO is not aligned with the other output:
  ...
  CC      drivers/usb/mon/usbmon.mod.o
  LZO    arch/mips/boot/compressed/vmlinux.lzo
  ...

This patch fixes it.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-11 11:01:15 +01:00
Jiri Kosina 318ae2edc3 Merge branch 'for-next' into for-linus
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
2010-03-08 16:55:37 +01:00
Michal Marek e93bc1a0ca Revert "kbuild: specify absolute paths for cscope"
This reverts commit eb8f844c0a. Ian
Campbell writes:
> I keep my kernel source tree on a more powerful build box where I run my
> builds etc (including "make cscope") but run my editor from my
> workstation with an NFS mount to the source. This worked fine for me
> using relative paths for cscope. Using absolute paths in cscope breaks
> this previously working setup because the root path is not the same on
> both systems. I guess this is similar to moving the source tree around.
>
> Without wanting to start a flamewar it really sounds to me like we are
> working around a vim (or cscope) bug here, emacs with cscope bindings
> works fine in this configuration.

Given that absolute paths can be forced by make O=. cscope, change the
default back to relative paths.

Ian Campbell <ijc@hellion.org.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-08 10:26:22 +01:00
Stephen Hemminger bae4cecc09 headers_install: use local file handles
Better practice to use 3 arg open and local file handles.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:43:49 +01:00
Stephen Hemminger dbbe33e99f headers_check: fix perl warnings
According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:43:07 +01:00
Stephen Hemminger 91416cfdf9 export_report: fix perl warnings
Use local file handles, use three argument open.
Don't modify arguments in perl grep (use sed instead)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:41:04 +01:00
Stephen Hemminger 9c49fd307a profile2linkerlist: fix perl warnings
Turn on strict checking.
Simplify code by using "unless" statement.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:39:33 +01:00
Stephen Hemminger 86d08e569f namespace: perlcritic warnings
Use local file handle not global.
Make loop and other variables local in scope.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hui Zhu <teawater@gmail.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:38:32 +01:00
Stephen Hemminger a208868fc0 checkversion: perl cleanup
Turn on strict checking.
Use three arguement open
Standard practice in perl is to use undef not zero for false

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:22:56 +01:00
Stephen Hemminger 3da2715731 checkincludes: fix perlcritic warnings
Turn on strict checking.
Use local file handles.
Use three argument open.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:19:57 +01:00
Stephen Hemminger 1f2a144f5a scripts: improve checkstack
Cleanup checkstack script:
  * Turn on strict checking
  * Fix resulting error message because the declaration syntax
    was incorrect.
  * Remove incorrect and misleading use of prototype
     - prototype not required for this type of sort function
       because $a and $b are being used in this contex
     - if prototype was being used it should be for both arguments
  * Use closure for sort function

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Cong Wang <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 21:19:09 +01:00
FEJES Jozsef b59a122584 kbuild: deb-pkg md5sums
This patch creates the standard md5sums file for 'make deb-pkg' just
like the dh_md5sums debhelper script.

Signed-off-by: Jozsef Fejes <fejes@joco.name>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-07 13:33:00 +01:00
Joe Perches 5e79d96eed checkpatch: warn on unnecessary spaces before quoted newlines
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Alberto Panizzo 08e4436566 checkpatch.pl: warn if an adding line introduce spaces before tabs.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Emese Revfy 79404849e9 checkpatch.pl: extend list of expected-to-be-const structures
Based on Arjan's suggestion, extend the list of ops structures that should
be const.

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Stefani Seibold 22fd2d3e4f checkpatch.pl: add union and struct to the exceptions list
Here is a small code snippet, which will be complained about by
checkpatch.pl:

#define __STRUCT_KFIFO_COMMON(recsize, ptrtype) \
	union { \
		struct { \
			unsigned int	in; \
			unsigned int	out; \
		}; \
		char		rectype[recsize]; \
		ptrtype		*ptr; \
		const ptrtype	*ptr_const; \
	};

This construct is legal and safe, so checkpatch.pl should accept this.  It
should be also true for struct defined in a macro.

Add the `struct' and `union' keywords to the exceptions list of the
checkpatch.pl script, to prevent error message "Macros with multiple
statements should be enclosed in a do - while loop".  Otherwise it is not
possible to build a struct or union with a macro.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Wolfram Sang 52131292c0 checkpatch: fix false positive on __initconst
checkpatch falsely complained about '__initconst' because it thought the
'const' needed a space before.  Fix this by changing the list of
attributes:

- add '__initconst'
- force plain 'init' to contain a word-boundary at the end

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Joe Perches 691e669ba8 checkpatch.pl: allow > 80 char lines for logging functions not just printk
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Hidetoshi Seto 42bdf74c95 checkpatch: trivial fix for trailing statements check
In case if the statement and the conditional are in one line, the line
appears in the report doubly.

And items of this check have no blank line before the next item.

This patch fixes these trivial problems, to improve readability of the
report.

[sample.c]
  > if (cond1
  >        && cond2
  >        && cond3) func_foo();
  >
  > if (cond4) func_bar();

Before:
  > ERROR: trailing statements should be on next line
  > #1: FILE: sample.c:1:
  > +if (cond1
  > [...]
  > +       && cond3) func_foo();
  > ERROR: trailing statements should be on next line
  > #5: FILE: sample.c:5:
  > +if (cond4) func_bar();
  > +if (cond4) func_bar();
  > total: 2 errors, 0 warnings, 5 lines checked

After:
  > ERROR: trailing statements should be on next line
  > #1: FILE: sample.c:1:
  > +if (cond1
  > [...]
  > +       && cond3) func_foo();
  >
  > ERROR: trailing statements should be on next line
  > #5: FILE: sample.c:5:
  > +if (cond4) func_bar();
  >
  > total: 2 errors, 0 warnings, 5 lines checked

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Joe Perches 8f53a9b80f scripts/checkpatch.pl: add WARN on sizeof(&foo)
sizeof(&foo) is frequently an error.  Warn on its use.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:44 -08:00
Joe Perches 3c840c18bc scripts/get_maintainer.pl: fix possible infinite loop
If MAINTAINERS section entries are misformatted, it was possible to have
an infinite loop.

Correct the defect by always moving the index to the end of section + 1

Also, exit check for exclude as soon as possible.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:34 -08:00
Stephen Hemminger a63ceb4c36 get_maintainer: quote email address with period
Picky mail systems won't accept email addresses where recipient has period
in name; ie.  David S.  Miller <davemloft.net> will not work.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:34 -08:00
Stephen Hemminger 22dd5b0cba get_maintainer: fix perlcritic warnings
perlcritic is a standard checker for Perl Best Practices.  This patch
fixes most of the warnings in the get_maintainer script.  If kernel
programmers are going to have checkpatch they should write clean scripts
as well...

Bareword file handle opened at line 176, column 1.  See pages 202,204 of PBP.  (Severity: 5)
Two-argument "open" used at line 176, column 1.  See page 207 of PBP.  (Severity: 5)
Bareword file handle opened at line 207, column 5.  See pages 202,204 of PBP.  (Severity: 5)
Two-argument "open" used at line 207, column 5.  See page 207 of PBP.  (Severity: 5)
Bareword file handle opened at line 246, column 6.  See pages 202,204 of PBP.  (Severity: 5)
Two-argument "open" used at line 246, column 6.  See page 207 of PBP.  (Severity: 5)
Bareword file handle opened at line 258, column 2.  See pages 202,204 of PBP.  (Severity: 5)
Two-argument "open" used at line 258, column 2.  See page 207 of PBP.  (Severity: 5)
Expression form of "eval" at line 983, column 17.  See page 161 of PBP.  (Severity: 5)
Expression form of "eval" at line 985, column 17.  See page 161 of PBP.  (Severity: 5)
Subroutine prototypes used at line 1186, column 1.  See page 194 of PBP.  (Severity: 5)
Subroutine prototypes used at line 1206, column 1.  See page 194 of PBP.  (Severity: 5)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:34 -08:00
Joe Perches 64f77f312b scripts/get_maintainer.pl: add ability to read from STDIN
Doesn't need or accept '-' as a trailing option to read stdin.  Doesn't
print usage() after bad options.  Adds --usage as command line equivalent
of --help

Suggested-by: Borislav Petkov <petkovbb@googlemail.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:34 -08:00
Joe Perches f11e9a1534 scripts/get_maintainer.pl: change --sections to print in the same style as MAINTAINERS
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:34 -08:00
Joe Perches 4b76c9da61 scripts/get_maintainer.pl: add --sections, print entire matched subsystem
Print the complete contents of the matched subsystems
in pattern match depth order.

Sample output:

$ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c
USB SMSC95XX ETHERNET DRIVER
M:Steve Glendinning <steve.glendinning@smsc.com>
L:netdev@vger.kernel.org
S:Supported
F:drivers/net/usb/smsc95xx.*
USB SUBSYSTEM
M:Greg Kroah-Hartman <gregkh@suse.de>
L:linux-usb@vger.kernel.org
W:http://www.linux-usb.org
T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
S:Supported
F:Documentation/usb/
F:drivers/net/usb/
F:drivers/usb/
F:include/linux/usb.h
F:include/linux/usb/
NETWORKING DRIVERS
L:netdev@vger.kernel.org
W:http://www.linuxfoundation.org/en/Net
T:git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git
S:Odd Fixes
F:drivers/net/
F:include/linux/if_*
F:include/linux/*device.h
THE REST
M:Linus Torvalds <torvalds@linux-foundation.org>
L:linux-kernel@vger.kernel.org
Q:http://patchwork.kernel.org/project/LKML/list/
T:git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
S:Buried alive in reporters
F:*
F:*/

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:33 -08:00
Joe Perches 03372dbbe6 scripts/get_maintainer.pl: add --file-emails, find embedded email addresses
Add an imperfect option to search a source file for email addresses.

New option:  --file-emails or --fe

email addresses in files are freeform text and are nearly impossible to
parse.  Still, might as well try to do a somewhat acceptable job of
finding them.  This code should find all addresses that are in the form
addr@domain.tld

The code assumes that up to 3 alphabetic words along with dashes, commas,
and periods that preceed the email address are a name.

If 3 words are found for the name, and one of the first two words are a
single letter and period, or just a single letter then the 3 words are use
as name otherwise the last 2 words are used.

Some variants that are shown correctly:
    John Smith <jksmith@domain.org>
    Random J. Developer <rjd@tld.com>
    Random J. Developer (rjd@tld.com)
    J. Random Developer rjd@tld.com

Variants that are shown nominally correctly:
    Written by First Last (funny-addr@somecompany.com)
is shown as:
    First Last <funny-addr@somecompany.com>

Variants that are shown incorrectly:
    Some Really Long Name <srln@foo.bar>
    MontaVista Software, Inc. <source@mvista.com>
are returned as:
    Long Name <srln@foo.bar>
    "Software, Inc" <source@mvista.com>

--roles and --rolestats show "(in file)" for matches.

For instance:

Without -file-emails:

$ ./scripts/get_maintainer.pl -f -nogit -roles net/core/netpoll.c
David S. Miller <davem@davemloft.net> (maintainer:NETWORKING [GENERAL])
linux-kernel@vger.kernel.org (open list)

With -fe:

$ ./scripts/get_maintainer.pl -f -fe -nogit -roles net/core/netpoll.c
David S. Miller <davem@davemloft.net> (maintainer:NETWORKING [GENERAL])
Matt Mackall <mpm@selenic.com> (in file)
Ingo Molnar <mingo@redhat.com> (in file)
linux-kernel@vger.kernel.org (open list)
netdev@vger.kernel.org (open list:NETWORKING [GENERAL])

The number of email addresses in the file in not limited.  Neither is the
number of returned email addresses.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-06 11:26:33 -08:00
John Kacur bc75cc6b56 tags: Add the ability to make tags for all archs using "all"
make ALLSOURCE_ARCHS=all tags
- Document this in kbuild.txt
Without this change you have to type each arch separately.

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-03 10:47:09 +01:00
John Kacur 4431d4ce99 tags: Fix spelling error in comment (is->if)
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-03 10:45:22 +01:00
Linus Torvalds e0d272429a Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
  ftrace: Add function names to dangling } in function graph tracer
  tracing: Simplify memory recycle of trace_define_field
  tracing: Remove unnecessary variable in print_graph_return
  tracing: Fix typo of info text in trace_kprobe.c
  tracing: Fix typo in prof_sysexit_enable()
  tracing: Remove CONFIG_TRACE_POWER from kernel config
  tracing: Fix ftrace_event_call alignment for use with gcc 4.5
  ftrace: Remove memory barriers from NMI code when not needed
  tracing/kprobes: Add short documentation for HAVE_REGS_AND_STACK_ACCESS_API
  s390: Add pt_regs register and stack access API
  tracing/kprobes: Make Kconfig dependencies generic
  tracing: Unify arch_syscall_addr() implementations
  tracing: Add notrace to TRACE_EVENT implementation functions
  ftrace: Allow to remove a single function from function graph filter
  tracing: Add correct/incorrect to sort keys for branch annotation output
  tracing: Simplify test for function_graph tracing start point
  tracing: Drop the tr check from the graph tracing path
  tracing: Add stack dump to trace_printk if stacktrace option is set
  tracing: Use appropriate perl constructs in recordmcount.pl
  tracing: optimize recordmcount.pl for offsets-handling
  ...
2010-02-28 10:17:55 -08:00
Ilya Dryomov 1c32fd0c5a kernel-doc: drop the -filelist option, it doesn't work
I also found the -filelist option, but apparently the implementation
is broken, and it was broken from the very first git commit.
For the -filelist option I suggest the removal (I wasn't able to find
any users of it, moreover it's not even listed in the
usage() output, so presumably nobody knows about it).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-26 17:23:50 -08:00
Ilya Dryomov a9e7314b79 kernel-doc: track line numbers for each file separately
The problem is that $. keeps track of the current record number (which
is line number by default). But if you pass it multiple files, it does
not wrap at the end of file, and therefore contains the *total* number
of processed lines.
I suppose we can fix line numbering by introducing a simple assignment
$. = 1
before processing every new file.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-26 17:23:49 -08:00