Skip to content
Snippets Groups Projects
  1. Apr 29, 2008
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.18 · 9c9ba34e
      Andy Whitcroft authored
      
      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: default avatarAndy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c9ba34e
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.17 · 171ae1a4
      Andy Whitcroft authored
      
      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: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      171ae1a4
    • Joe Perches's avatar
      scripts/Lindent: support gnu indent v2.2.10 · ee8900c9
      Joe Perches authored
      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: default avatarJoe Perches <joe@perches.com>
      Acked-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ee8900c9
  2. Apr 28, 2008
  3. Apr 26, 2008
  4. Apr 25, 2008
  5. Apr 20, 2008
    • Kay Sievers's avatar
      PNP: add all PNP card device id's as individual aliases · 0c81eed4
      Kay Sievers authored
      
      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: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0c81eed4
  6. Mar 28, 2008
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.16 · 773647a0
      Andy Whitcroft authored
      
      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: default avatarAndy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      773647a0
  7. Mar 23, 2008
  8. Mar 13, 2008
  9. Mar 05, 2008
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.15 · cf655043
      Andy Whitcroft authored
      
      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: default avatarAndy 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cf655043
  10. Feb 24, 2008
    • Richard Kennedy's avatar
      kernel-doc: fix function-pointer-parameter parsing · 00d62961
      Richard Kennedy authored
      
      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: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00d62961
  11. Feb 19, 2008
    • Geert Uytterhoeven's avatar
      kbuild: fix reversed symbol name order in modpost · b1d2675a
      Geert Uytterhoeven authored
      
      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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      b1d2675a
  12. Feb 15, 2008
  13. Feb 14, 2008
    • Mathieu Desnoyers's avatar
      Linux Kernel Markers: create modpost file · b2e3e658
      Mathieu Desnoyers authored
      
      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: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: David Smith <dsmith@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b2e3e658
  14. Feb 13, 2008
    • Roman Zippel's avatar
      kconfig: fix select in combination with default · 587c9061
      Roman Zippel authored
      
      > 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: default avatarRoman Zippel <zippel@linux-m68k.org>
      Tested-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      587c9061
  15. Feb 11, 2008
  16. Feb 09, 2008
  17. Feb 08, 2008
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.14 · 13214adf
      Andy Whitcroft authored
      
      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: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      13214adf
    • Andy Whitcroft's avatar
      update checkpatch.pl to version 0.13 · c2fdda0d
      Andy Whitcroft authored
      
      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: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c2fdda0d
  18. Feb 07, 2008
  19. Feb 06, 2008
    • Joern Engel's avatar
      Claim maintainership for block2mtd and update email addresses · 2b54aaef
      Joern Engel authored
      
      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: default avatarJoern Engel <joern@lazybastard.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2b54aaef
    • Paulo Marques's avatar
      kallsyms should prefer non weak symbols · f2df3f65
      Paulo Marques authored
      
      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: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Looks-great-to: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f2df3f65
Loading