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>
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>
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>
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>
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>
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>
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>
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>
* 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
...
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>
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>
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>
* '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.
* '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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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
...
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
* 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
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>
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>
> 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.htmlhttp://ozlabs.org/pipermail/linuxppc-dev/2005-September/019736.htmlhttp://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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* '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
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>
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>
* 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
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>
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>
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>
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>
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>
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>
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 <p>, 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>
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>
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>
* 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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>