summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2007-08-11update checkpatch.pl to version 0.09Andy Whitcroft
This version brings a number of new checks, and a number of bug fixes. Of note: - checks for spacing on round and square bracket combinations - loosening of the single statement brace checks, to allow them when they contain comments or where other blocks in a compound statement have them. - parks the multple declaration support - allows architecture defines in architecture specific headers Andy Whitcroft (21): Version: 0.09 loosen single statement brace checks fix up multiple declaration to avoid function arguments add some function space parenthesis check exceptions handle EXPORT_'s with parentheses in their names clean up some warnings in multi-line macro bracketing support park the multiple declaration checks make block brace checks count comments as a statement __volatile__ and __extension__ are not functions allow architecture specific defined within architecture includes check spacing on square brackets check spacing on parentheses ensure we apply checks to the part before start comment check #ifdef conditional spacing handle __init_refok and __must_check add noinline to inline checks prevent email addresses from tripping spacing checks handle typed initialiser spacing handle line contination as end of line add bool to the type matcher refine EXPORT_SYMBOL checks to handle pointers Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-31kbuild: whitelist references from __dbe_table to .initRalf Baechle
This is needed on MIPS where the same mechanism as get_user() is used to intercept bus error exceptions for some hardware probes. Without this patch modpost will throw spurious warnings: LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map MODPOST vmlinux WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-25kbuild: fix modpost warnings for xtensaSam Ravnborg
The Xtensa architecture places literal pools in sections separate from the instructions. The corresponsing text sections, therefore, reference the .literal section, and we have to suppress those warnings. The naming convention defines the name for a literal section as .SECTION.literal, unless .SECTION is .text. In that case the name is only .literal. Using strncmp() instead of strcmp() to compare the from-section with .SECTION.init.refok in pattern 0 should not cause any regressions for other architectures. We also need to suppress warnings for two informational sections (.xt.lit and .xt.prop) used by the Xtensa architecture. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kbuild: be more foregiving on init section namingSam Ravnborg
In the whitelist function of modpost now use the same check to identify init_section as in other places of modpost. This has the effect that we now recognize sections named .init.text.19 as init sections and we no longer warn when we see these. At the same time make surrounding code readable by dropping use of temporary flags. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kbuild: rearrange a few function in modpostSam Ravnborg
This is a preparational patch that just move two functions and add one (for now unused) function. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kbuild: use LDFLAGS_MODULE only for .ko linksRoland McGrath
Sam Ravnborg pointed out that Documentation/kbuild/makefiles.txt already says this is what it's for. This patch makes the reality live up to the documentation. This fixes the problem of LDFLAGS_BUILD_ID getting into too many places. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kconfig: remove unused members from struct symbolSam Ravnborg
dep and dep2 in struct symbol was unused - remove them. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25kconfig: attach help text to menusSam Ravnborg
Roman Zippel wrote: > A simple example would be > help texts, right now they are per symbol, but they should really be per > menu, so archs can provide different help texts for something. This patch does this and at the same time introduce a few API funtions used to access the help text. The relevant api functions are introduced in the various frontends. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2007-07-25kbuild: fix up printing of Linux C Library version in scripts/ver_linuxJesper Juhl
I noticed, when running scripts/ver_linux on both a Gentoo system and a Slackware system, that the line printing the C library version looked a little odd. So I fixed it up to be in line with all the rest. Old output: Linux C Library > libc.2.5 New output: Linux C Library 2.5 Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kbuild: do not do section mismatch checks on vmlinux in 2nd passSam Ravnborg
We already check and warn about section mismatches from vmlinux (build as vmlinux.o) during first pass so skip the checks during the 2nd pass where we process modules. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-23ACPI: autoload modules - Create ACPI alias interfaceThomas Renninger
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias like: grep acpi /lib/modules/2.6.22-rc4-default/modules.alias alias acpi*:SNY5001:* sony_laptop alias acpi*:SNY6001:* sony_laptop for e.g. the sony_laptop module. This module matches against all ACPI devices with a HID or CID of SNY5001 or SNY6001 Export an uevent and modalias sysfs file containing the string: [MODALIAS=]acpi:PNP0C0C: additional CIDs are concatenated at the end. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-20Fix Lindent to not indent preprocessor comments so farMatthew Wilcox
I recently ran Lindent over the AdvanSys driver and it moved the comments on #else and #endif lines way over to the right: #else /* ADVANSYS_DEBUG */ This doesn't match what I expect from kernel style, but it is documented. We just need another flag to indent to make this look like: #else /* ADVANSYS_DEBUG */ Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-20m68k: teach modpost about .m68_fixupAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits) xtensa: use DATA_DATA in xtensa powerpc: add missing DATA_DATA to powerpc cris: use DATA_DATA in cris kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c kbuild: use -fno-optimize-sibling-calls unconditionally kconfig: reset generated values only if Kconfig and .config agree. kbuild: fix the warning when running make tags kconfig: strip 'CONFIG_' automatically in kernel configuration search kbuild: use POSIX BRE in headers install target Whitelist references from __dbe_table to .init modpost white list pattern adjustment kbuild: do section mismatch check on full vmlinux kbuild: whitelist references from variables named _timer to .init.text kbuild: remove hardcoded _logo names from modpost kbuild: remove hardcoded apic_es7000 from modpost kbuild: warn about references from .init.text to .exit.text kbuild: consolidate section checks kbuild: refactor code in modpost to improve maintainability kbuild: ignore section mismatch warnings originating from .note section kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it ...
2007-07-19update checkpatch.pl to version 0.08Andy Whitcroft
This version brings a number of new checks, and a number of bug fixes. Of note: - warnings for multiple assignments per line - warnings for multiple declarations per line - checks for single statement blocks with braces This patch includes an update for feature-removal-schedule.txt to better target checks. Andy Whitcroft (12): Version: 0.08 only apply printk checks where there is a string literal allow suppression of errors for when no patch is found warn about multiple assignments warn on declaration of multiple variables check for kfree() with needless null check check for single statement braced blocks check for aggregate initialisation on the next line handle the => operator check for spaces between function name and open parenthesis move to explicit Check: entries in feature-removal-schedule.txt handle pointer attributes Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19kernel-doc: fix leading dot in man-mode outputRandy Dunlap
If a parameter description begins with a '.', this indicates a "request" for "man" mode output (*roff), so it needs special handling. Problem case is in include/asm-i386/atomic.h for function atomic_add_unless(): * @u: ...unless v is equal to u. This parameter description is currently not printed in man mode output. [akpm@linux-foundation.org: cleanup] Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19kernel-doc: strip C99 commentsRandy Dunlap
Strip C99-style comments from the input stream. /*...*/ comments are already stripped. C99 comments confuse the kernel-doc script. Also update some comments. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19kernel-doc: fix unnamed struct/union warningRandy Dunlap
Fix kernel-doc warning: Warning(linux-2.6.22-rc2-git2/include/linux/skbuff.h:316): No description found for parameter '}' which is caused by nested anonymous structs/unions ending with: }; }; Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17kallsyms: make KSYM_NAME_LEN include space for trailing '\0'Tejun Heo
KSYM_NAME_LEN is peculiar in that it does not include the space for the trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating buffer. This is nonsense and error-prone. Moreover, when the caller forgets that it's very likely to subtly bite back by corrupting the stack because the last position of the buffer is always cleared to zero. This patch increments KSYM_NAME_LEN by one and updates code accordingly. * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro is fixed. * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together, MODULE_NAME_LEN was treated as if it didn't include space for the trailing '\0'. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Paulo Marques <pmarques@grupopie.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.cPaulo Marques
The only in-kernel user of "memmem" is scripts/kallsyms.c and it only uses it to find tokens that are 2 bytes in size. It is trivial to replace it with a simple function that finds 2-byte tokens. This should help users from systems that don't have the memmem GNU extension available. Signed-off-by: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17kconfig: reset generated values only if Kconfig and .config agree.Roman Zippel
Normally generated values (Kconfig entries without a prompt) are cleared as they are regenerated anyway and so they appear as new should they become visible and defaults work as expected (once a value is set defaults aren't used anymore). The detection whether a value is generated or not is only based on its visibility status, which can quickly change for a lot of symbols by just removing a single line from .config or adding a dependency to Kconfig as you noticed. The patch now suppresses this logic when .config and Kconfig aren't in sync and .config needs to be updated, so that you can remove now a random value from .config and oldconfig won't reask for many other values. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17kconfig: strip 'CONFIG_' automatically in kernel configuration searchBernhard Walle
Modify the ncurses configuration tool ('make menuconfig') in a way that the user can enter the search string (/) both with or without the leading 'CONFIG_'. This simplifies using copy & paste from .config files because you can select the whole word. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17kbuild: use POSIX BRE in headers install targetMike Frysinger
The sed expression used at the moment in scripts/Makefile.headersinst relies on the (handy) GNU extension where you can escape ERE's in an otherwise BRE without using the GNU -r option. The following patch replaces this "\+" usage with a functionally equivalent POSIX BRE compliant "\{1,\}". Tested with `make headers_install` against blackfin/x86_64/i386 targets. Stupid whiny OS X users and their crappy sed ;) Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17Whitelist references from __dbe_table to .initRalf Baechle
This is needed on MIPS where the same mechanism as get_user() is used to intercept bus error exceptions for some hardware probes. Without this patch modpost will throw spurious warnings: LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map MODPOST vmlinux WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text: Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17modpost white list pattern adjustmentJan Beulich
gcc puts data into .data.rel or .data.rel.* on some architectures (e.g. ia64) or under certain conditions, so whatever is legal relative to .data should also be legal for those other sections. Fixes a few modpost warnings on ia64. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-17kbuild: do section mismatch check on full vmlinuxSam Ravnborg
Previously we did do the check on the .o files used to link vmlinux but that failed to find questionable references across the .o files. Create a dedicated vmlinux.o file used only for section mismatch checks that uses the defualt linker script so section does not get renamed. The vmlinux.o may later be used as part of the the final link of vmlinux but for now it is used fo section mismatch only. For a defconfig build this is instant but for an allyesconfig this add two minutes to a full build (that anyways takes ~2 hours). Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: whitelist references from variables named _timer to .init.textSam Ravnborg
arm uses a lot of ops structures named *_timer that has legitimite references to .init.text. So let's add this variable to the list of variables that may reference .init.text without causing any warning. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: remove hardcoded _logo names from modpostSam Ravnborg
Replaced this with a __init_refok marker in front of fb_find_logo(). I think that the __initdata marker for the logo's are wrong but I have not justified this so I did not remove it. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: remove hardcoded apic_es7000 from modpostSam Ravnborg
Replace the hardcoded variable name apic_es7000 in modpost with a __initdata_refok marker. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: warn about references from .init.text to .exit.textSam Ravnborg
The .exit.text section may be discarded either at build or at runtime. So let modpost warn if this situation is detected. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: consolidate section checksSam Ravnborg
Move more checks from whitelist to the section check functions. Remove the redundent pci_fixup check. Renumber the patterns. No functional changes. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: refactor code in modpost to improve maintainabilitySam Ravnborg
There were a great deal of overlap between the two functions that check which sections may reference .init.text and .exit.text. Factor out common check to a separate function and sort entries in the original functions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: ignore section mismatch warnings originating from .note sectionSam Ravnborg
.note* sections are ELF notes, which are typically used by external tools to examine the kernel image. Since this is removed from any runtime consideration, it's OK to reference any section from a .note* section. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle itJeremy Fitzhardinge
The .paravirtprobe section is obsolete, so modpost doesn't need to handle it. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: suppress modpost warnings for references from the .toc section as ↵Stephen Rothwell
used by powerpc We should do better here by effetively "dereferencing" references to the .toc (or the .got2) section, but that is much harder. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: make better section mismatch reports on armSam Ravnborg
With this change we can find more symbols hereby improving the readability of the warnings. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: make better section mismatch reports on i386 and mipsAtsushi Nemoto
On i386 and MIPS, warn_sec_mismatch() sometimes fails to show usefull symbol name. This is because empty 'refsym' due to 0 r_addend value. This patch is to adjust r_addend value, consulting with apply_relocate() routine in kernel code. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kconfig: fix update-po-configSam Ravnborg
Massimo Maiurana <maiurana@gmail.com> reported that update-po-config was broken: 1) spelling errors in Makefile so arch/um failed 2) UTF-8 was not supported The following patch address the above problems. kxgettext now append the output to the .pot file generated by xgettext - so we have a header. In all places UFT-8 is specifed so we now flawlessly support UTF-8. The Kconfig files had an empty string in a few cases - these are now supressed in kxgettext. With this the translators can now pick up where they left and get it all translated. There are ~11000 strings to be translated... Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Massimo Maiurana <maiurana@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-07-16kbuild: add support for squashing uid/gid in gen_initramfs_list.shMike Frysinger
Sometimes it is useful to squash all uid's/gid's to 0:0 regardless of current owner. For example, in build systems that get run as arbitrary users (uClinux-dist). This adds a special "squash" keyword so you can do '-g squash -u squash' and have ownership squashed to root. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-07-16kconfig: use POSIX equality test in check-lxdialog.shMike Frysinger
The "==" operator is not in POSIX, so use -eq instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16scripts: Make cleanfile/cleanpatch warn about long linesH. Peter Anvin
Make the "cleanfile" and "cleanpatch" script warn about long lines, by default lines whose visual width exceeds 79 characters. Per suggestion from Auke Kok. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: avoid environment to set variables used by kbuildSam Ravnborg
A few of the variables used by kbuild has fixed naming. Make sure we do not pick up random values from the environment. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16kbuild: New 'cc-fullversion' macroSegher Boessenkool
Prints a six-digit string including the GCC patchlevel. Also fix the 'usage' comment for cc-version. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-16doc/oops-tracing: add Code: decode infoRandy Dunlap
Add info that the Code: bytes line contains <xy> or (wxyz) in some architecture oops reports and what that means. Add a script by Andi Kleen that reads the Code: line from an Oops report file and generates assembly code from the hex bytes. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16update checkpatch.pl to version 0.07Andy Whitcroft
This version brings a number of new checks, fixes for flase positives, plus a clarification of the output to better guide use. Of note: - checks for documentation for new __setup calls - clearer reporting where braces and parenthesis are involved - reports for closing brace and semi-colon spacing - reports on unwanted externs This patch includes an update to the documentation on checkpatch.pl itself to clarify when it should be used and to indicate that it is not intended as the final arbitor of style. Full changelog: Andy Whitcroft (19): Version: 0.07 ensure we do not apply control brace checks to preprocesor directives add {u,s}{8,16,32,64} to the type matcher accept lack of spacing after the semicolons in for (;;) report new externs in .c files fix up typedef exclusion for function prototypes else trailing statements check need to account for \ at end of line add enums to the type matcher add missing check descriptions suppress double reporting of ** spacing report on do{ spacing issues include an example of the brace/parenthesis in output check for spacing after closing braces prevent double reports on pointer spacing issues handle blank continuation lines on macros classify all reports error, warning, or check revamp hanging { checks and apply in context no spaces after the last ; in a for is ok check __setup has a corresponding addition to documentation David Woodhouse (1): limit character set used in patches and descriptions to UTF-8 Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-06x86_64: fix headers_installDavid Woodhouse
A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of files all of which are using the same #ifdef guard, "__ASM_STUB_" with no postfix. So the second and later asm files #included in the same C file (often through standard headers like ioctl.h) yields no symbols. Strangeness with the Ubuntu 'tell me if I support something that's not explcitly mentioned in POSIX, and I'll strip it out' shell, I believe. We don't need the 'export' but we do need a semicolon at the end of the FNAME line: Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-28Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARMDavid Woodhouse
Not all the world is an i386. Many architectures need 64-bit arguments to be aligned in suitable pairs of registers, and the original sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an argument register for padding after the first integer. Since we don't normally have more than 6 arguments for system calls, that left no room for the final argument on some architectures. Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which all fits nicely. In fact, ARM already had that, but called it sys_arm_sync_file_range. Move it to fs/sync.c and rename it, then implement the needed compatibility routine. And stop the missing syscall check from bitching about the absence of sys_sync_file_range() if we've implemented sys_sync_file_range2() instead. Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-24update checkpatch.pl to version 0.06Andy Whitcroft
Update to checkpatch.pl v0.06. Of note: - do { and else handled correctly as control structures for { matching - trailing whitespace correctly tripped when line otherwise empty - support for const, including const foo * const bar - multiline macros defining values correctly reported This version of checkpatch.pl can be found at the following URL: http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.06 Full Changelog: Andy Whitcroft (14): Version: 0.06 cleanup the Type regular expression declarations fix up block counting end of line counts as a space for ++ and -- do { needs the same checks as if, for et al handle "const foo * const a" as a valid type add spacing checks following ; complete whitespace lines should trip trailing whitespace check else is also a block control structure badly formatted else can trip function declaration detect and report trailing statements after else types need to be terminated by a boundary multiline macros defining values should be surrounded by parentheses soften the wording of the Signed-off-by: warnings Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-24update checkpatch.pl to version 0.05Andy Whitcroft
This version brings a some new tests, and a host of changes to fix false positives, of particular note: - detect 'var ++;' and 'var --;' as a bad combination - multistatement #defines are now checked based on statement count - multistatement #defines with initialisation correctly reported - checks the location of the inline keywords - EXPORT_SYMBOL for variables are now understood - typedefs are loosened to handle sparse etc This version of checkpatch.pl can be found at the following URL: http://www.shadowen.org/~apw/public/checkpatch/checkpatch.pl-0.05 Full Changelog: Andy Whitcroft (18): Version: 0.05 macro definition checks should be for a single statement avoid assignements only in if conditionals declarations of function pointers need no space multiline macros which are purely initialisation cannot be wrapped EXPORT_SYMBOL can also directly follow a variable definition check on the location of the inline keyword EXPORT_SYMBOL needs to allow for attributes ensure we do not find C99 // in strings handle malformed #include lines accept the {0,} form typedefs are sensible for defining function pointer parameters ensure { handling correctly handles nested switch() statements trailing whitespace checks are not anchored typedefs for sparse bitwise annotations make sense update the type matcher to include sparse annotations clean up indent and spacing Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-11kbuild: fix sh64 section mismatch problemsSam Ravnborg
There's a special .cranges section that is almost always generated, with data being moved to the appropriate section by the linker at a later stage. To give a bit of background, sh64 has both a native SHmedia instruction set (32-bit instructions) and SHcompact (which is compatability with normal SH -- 16-bit, a massively reduced register set, etc.). code ranges are emitted when we're using the 32-bit ABI, but not the 64-bit one. It is a special staging section used solely by binutils where code with different flags get placed (more specifically differing flags for input and output sections), before being lazily merged by the linker. The closest I've been able to find to documentation is: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/emultempl/sh64elf.em?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=src It's an array of 8-byte Elf32_CRange structure given in http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-sh64.h?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=src that describes for which ISA a range is used. Silence the warnings by allowing references from .init.text to .cranges. The following warnings are fixed: WARNING: init/built-in.o(.cranges+0x0): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0xa): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x14): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x1e): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x28): Section mismatch: reference to .init.text: WARNING: init/built-in.o(.cranges+0x32): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x50): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x5a): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x64): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0xfa): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x104): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x10e): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x154): Section mismatch: reference to .init.text: WARNING: kernel/built-in.o(.cranges+0x15e): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x6e): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x78): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0x82): Section mismatch: reference to .init.text: WARNING: mm/built-in.o(.cranges+0xaa): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x136): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x140): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x168): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x1f4): Section mismatch: reference to .init.text: WARNING: fs/built-in.o(.cranges+0x1fe): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x302): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x30c): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x316): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x3a2): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x3ac): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x4ce): Section mismatch: reference to .init.text: WARNING: net/built-in.o(.cranges+0x4d8): Section mismatch: reference to .init.text: Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: Kaz Kojima <kkojima@rr.iij4u.or.jp> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>