aboutsummaryrefslogtreecommitdiffstats
path: root/scripts (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-28kbuild: check return value of asprintf()Namhyung Kim1-1/+4
Check return value of asprintf() in docsect() and exit if error occurs. This removes following warning: HOSTCC scripts/basic/docproc scripts/basic/docproc.c: In function ‘docsect’: scripts/basic/docproc.c:336: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28Merge commit 'v2.6.36' into kbuild/miscMichal Marek44-807/+1893
Update to be able to fix a recent change to scripts/basic/docproc.c (commit eda603f).
2010-10-28scripts/namespace.pl: improve to get more correct resultsAmerigo Wang1-9/+12
Exclude more symbols from arch/x86/vdso/ and arch/x86/boot/; add some more linker-defined symbols into exception list; add other cond_syscalls besides "sys_*". Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28scripts/namespace.pl: some bug fixesAmerigo Wang1-7/+10
1. Teach namespace.pl to understand "V" and "v" 2. cond_syscalls are moved into kernel/sys_ni.c Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28scripts/namespace.pl: update file exclusion listStephen Hemminger1-47/+56
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-28scripts/namespace.pl: fix wrong source pathAmerigo Wang1-4/+4
File::Find will do chdir automatically, so we need to get the absolute patch with $File::Find::dir. Reported-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Amerigo Wang <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13Coccinelle: Use the -no_show_diff option for org and report modeNicolas Palix1-4/+6
This allows to write the semantic patches with code sharing for the matching parts. Signed-off-by: Nicolas Palix <npalix.work@gmail.com> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13Coccinelle: Add a new mode named 'chain'Nicolas Palix1-5/+11
spatch now returns -1 when a virtual rule (given with -D on the command line) is not defined in the semantic patch. Using this spatch feature, coccicheck is now tries several modes by default, in the order: patch, report, context, org Signed-off-by: Nicolas Palix <npalix.work@gmail.com> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13Coccinelle: Use new comment format to explain kfree.cocciNicolas Palix1-4/+5
Use new comment format to separate proposed commit message and information about generated false positives Signed-off-by: Nicolas Palix <npalix.work@gmail.com> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-13Coccinelle: Improve user information with a new kind of commentNicolas Palix1-3/+11
Improve user information with a new kind of comment about semantic patch output. Fix spelling. Signed-off-by: Nicolas Palix <npalix.work@gmail.com> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-11Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds4-7/+5
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: fix oldnoconfig to do the right thing kconfig: Temporarily disable dependency warnings kconfig: delay symbol direct dependency initialization
2010-10-09kbuild: fix oldnoconfig to do the right thingKyle McMartin1-1/+1
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on if (input_mode == nonint_oldconfig || input_mode == oldnoconfig) { if (input_mode == nonint_oldconfig && sym->name && !sym_is_choice_value(sym)) { to avoid oldnoconfig chugging through the else stanza. Fix that to restore expected behaviour (which I've confirmed in the Fedora kernel build that the configs end up looking the same.) Signed-off-by: Kyle McMartin <kyle@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-09kconfig: Temporarily disable dependency warningsMichal Marek1-0/+2
After fixing a use-after-free bug in kconfig, a 'make defconfig' or 'make allmodconfig' fills the screen with warnings that were not detected before. Given that we are close to the release now, disable the warnings temporarily and deal with them after 2.6.36. Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-04kconfig: delay symbol direct dependency initializationArnaud Lacombe2-6/+2
This fixes the use-after-free and associated crash in kconfig introduced in commit 246cf9c26bf11f2bffbecea6e5bd222eee7b1df8. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-09-11docbook: warn on unused doc entriesJohannes Berg2-3/+178
When you don't use !E or !I but only !F, then it's very easy to miss including some functions, structs etc. in documentation. To help finding which ones were missed, allow printing out the unused ones as warnings. For example, using this on mac80211 yields a lot of warnings like this: Warning: didn't use docs for DOC: mac80211 workqueue Warning: didn't use docs for ieee80211_max_queues Warning: didn't use docs for ieee80211_bss_change Warning: didn't use docs for ieee80211_bss_conf when generating the documentation for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-11kernel-doc: ignore case when stripping attributesJohannes Berg1-1/+1
There are valid attributes that could have upper case letters, but we still want to remove, like for example __attribute__((aligned(NETDEV_ALIGN))) as encountered in the wireless code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-31Coccinelle: Add misc/ifcol.cocciNicolas Palix1-0/+48
Find confusingly indented code in or after an if. An if branch should be indented. The code following an if should not be indented. Sometimes, code after an if that is indented is actually intended to be part of the if branch. This has a high rate of false positives, because Coccinelle's column calculation does not distinguish between spaces and tabs, so code that is not visually aligned may be considered to be in the same column. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add misc/doubleinit.cocciNicolas Palix1-0/+53
Find duplicate field initializations. This has a high rate of false positives due to #ifdefs, which Coccinelle is not aware of in a structure initialization. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Move alloc directory into api directoryNicolas Palix2-1/+5
alloc contains various semantic patches related to the allocation APIs Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Move resource_size.cocci to the api directoryNicolas Palix1-0/+0
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-08-31Coccinelle: Move err_cast.cocci to the api directoryNicolas Palix1-0/+0
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-08-31Coccinelle: Add api/memdup_userNicolas Palix1-0/+35
Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add api/memdup.cocciNicolas Palix1-0/+40
Use kmemdup rather than duplicating its implementation Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add api/kstrdup.cocciNicolas Palix1-0/+39
Use kstrdup rather than duplicating its implementation Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add free/kfree.cocciNicolas Palix1-0/+116
Find a use after free. Values of variables may imply that some execution paths are not possible, resulting in false positives. Another source of false positives are macros such as SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add iterators/list_entry_update.cocciNicolas Palix1-0/+62
list_for_each_entry uses its first argument to get from one element of the list to the next, so it is usually not a good idea to reassign it. The first rule finds such a reassignment and the second rule checks that there is a path from the reassignment back to the top of the loop. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add iterators/itnull.cocciNicolas Palix1-0/+58
Many iterators have the property that the first argument is always bound to a real list element, never NULL. False positives arise for some iterators that do not have this property, or in cases when the loop cursor is reassigned. The latter should only happen when the matched code is on the way to a loop exit (break, goto, or return). Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add iterators/fen.cocciNicolas Palix1-0/+64
for_each_node iterators only exit normally when the loop cursor is NULL, so there is no point to call of_node_put on the final value. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add locks/mini_lock.cocciNicolas Palix1-0/+95
Find missing unlocks. This semantic match considers the specific case where the unlock is missing from an if branch, and there is a lock before the if and an unlock after the if. False positives are due to cases where the if branch represents a case where the function is supposed to exit with the lock held, or where there is some preceding function call that releases the lock. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add locks/double_lock.cocciNicolas Palix1-0/+92
Find double locks. False positives may occur when some paths cannot occur at execution, due to the values of variables, and when there is an intervening function call that releases the lock. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add locks/call_kern.cocciNicolas Palix1-0/+74
Find functions that refer to GFP_KERNEL but are called with locks held. The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Move deref_null.cocci to a more appropriate directoryNicolas Palix1-0/+0
deref_null.cocci is moved to the 'null' directory which contains other null related rules. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add null/kmerr.cocciNicolas Palix1-0/+72
This semantic patch looks for kmalloc etc that are not followed by a NULL check. It only gives a report in the case where there is some error handling code later in the function, which may be helpful in determining what the error handling code for the call to kmalloc etc should be. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add null/eno.cocciNicolas Palix1-0/+20
The various basic memory allocation functions don't return ERR_PTR Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-23Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds4-5/+11
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: setlocalversion: Ignote SCMs above the linux source tree makefile: not need to regenerate kernel.release file when make kernelrelease fixes for using make 3.82 kconfig: fix segfault when detecting recursive dependency kconfig: fix savedefconfig with choice marked optional
2010-08-21setlocalversion: Ignote SCMs above the linux source treeMichal Marek1-2/+2
Dan McGee <dpmcgee@gmail.com> writes: > Note that when in git, you get the appended "+" sign. If > LOCALVERSION_AUTO is set, you will get something like > "eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still > returns "eee"). It doesn't matter whether the working tree is dirty or > clean. > > Is there a way to disable this? I'm building from a clean tarball that > just happens to be unpacked inside a git repository. One would think > setting LOCALVERSION_AUTO to false would do it, but no such luck... Fix this by checking if the kernel source tree is the root of the git or hg repository. No fix for svn: If the kernel source is not tracked in the svn repository, it works as expected, otherwise determining the 'repository root' is not really a defined task. Reported-and-tested-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-20Merge commit 'v2.6.36-rc1' into kbuild/rc-fixesMichal Marek25-91/+963
2010-08-17fixes for using make 3.82Jan Beulich1-1/+3
It doesn't like pattern and explicit rules to be on the same line, and it seems to be more picky when matching file (or really directory) names with different numbers of trailing slashes. Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Andrew Benton <b3nton@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-16Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into trace/tip/perf/urgent-4Steven Rostedt1-1/+6
Conflicts: kernel/trace/trace_events.c Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-08-15kconfig: fix segfault when detecting recursive dependencySam Ravnborg1-0/+2
Following sample Kconfig generated a segfault: config FOO bool select PERF_EVENTS if HAVE_HW_BREAKPOINT config PERF_EVENTS bool config HAVE_HW_BREAKPOINT bool depends on PERF_EVENTS Fix by reverting back to a valid property if there was no property on the stack of symbols. The above pattern were seen in sh Kconfig. A fix for the Kconfig file has been sent to the sh folks. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-15kconfig: fix savedefconfig with choice marked optionalSam Ravnborg1-2/+4
savedefconfig failed to save the correct minimal config when it encountered a choice marked optional. Consider following minimal configuration: $cat Kconfig choice prompt "choice" optional config A bool "a" config B bool "b" endchoice $cat .config | grep -v ^# CONFIG_A=y $conf --savedefconfig=defconfig Kconfig would before this fix result in an empty file, because kconfig would assume that CONFIG_A=y is a default value. But because the choice is optional the default is that both A and B are =n. Fix so we handle optional choices correct. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-14kbuild: drop unifdef-y supportSam Ravnborg1-2/+1
unifdef-y is not used anymore - drop remaining references Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2010-08-13Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-1/+1
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: setlocalversion: fix version for untaged nontip mercurial revs Fix CONFIG_CROSS_COMPILE issue in .config
2010-08-13Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds5-43/+97
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kconfig: Fix warning: ignoring return value of 'fgets' kconfig: Fix warning: ignoring return value of 'fwrite' nconfig: Fix segfault when menu is empty kconfig: fix tristate choice with minimal config kconfig: fix savedefconfig for tristate choices
2010-08-13setlocalversion: fix version for untaged nontip mercurial revsMilton Miller1-1/+1
The manpage for cut says it will return all lines without the delimiter unless -s is specified. When I backed up my mecurial tree to generate modules, I found that the scm part of localversion was turning up blank. Signed-off-by: Milton Miller <miltonm@bga.com> Cc: Michal Marek <mmarek@suse.cz> Cc: "Michał Górny" <gentoo@mgorny.alt.pl> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-13kconfig: Fix warning: ignoring return value of 'fgets'Jean Sacren2-2/+16
This fix facilitates fgets() either it returns on success or on error or when end of file occurs. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-13kconfig: Fix warning: ignoring return value of 'fwrite'Jean Sacren3-2/+9
This fix facilitates fwrite() in both confdata.c and expr.c, either it succeeds in writing, or an error occurs, or the end of file is reached. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-13nconfig: Fix segfault when menu is emptyAndrej Gelenberg1-0/+2
nconf crush with segfault if press right arrow in empty menu. Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-12Merge branch 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linusLinus Torvalds1-0/+13
* 'params' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (22 commits) param: don't deref arg in __same_type() checks param: update drivers/acpi/debug.c to new scheme param: use module_param in drivers/message/fusion/mptbase.c ide: use module_param_named rather than module_param_call param: update drivers/char/ipmi/ipmi_watchdog.c to new scheme param: lock if_sdio's lbs_helper_name and lbs_fw_name against sysfs changes. param: lock myri10ge_fw_name against sysfs changes. param: simple locking for sysfs-writable charp parameters param: remove unnecessary writable charp param: add kerneldoc to moduleparam.h param: locking for kernel parameters param: make param sections const. param: use free hook for charp (fix leak of charp parameters) param: add a free hook to kernel_param_ops. param: silence .init.text references from param ops Add param ops struct for hvc_iucv driver. nfs: update for module_param_named API change AppArmor: update for module_param_named API change param: use ops in struct kernel_param, rather than get and set fns directly param: move the EXPORT_SYMBOL to after the definitions. ...
2010-08-12MN10300: Permit .GCC-command-line sectionsDavid Howells1-0/+1
Permit .GCC-command-line sections in modules. Otherwise modpost says things like: WARNING: drivers/mtd/chips/map_ram.o (.GCC-command-line): unexpected non-allocatable section. Did you forget to use "ax"/"aw" in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>