Skip to content
Snippets Groups Projects
  1. Jul 25, 2011
  2. Jun 15, 2011
  3. May 25, 2011
  4. Mar 31, 2011
  5. Mar 22, 2011
    • Dave Jones's avatar
      checkpatch: warn about memset with swapped arguments · 309c00c7
      Dave Jones authored
      
      Because the second and third arguments of memset have the same type, it
      turns out to be really easy to mix them up.
      
      This bug comes up time after time, so checkpatch should really be checking
      for it at patch submission time.
      
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.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>
      309c00c7
    • Mike Frysinger's avatar
      scripts/checkpatch.pl: reset rpt_cleaners warnings · b0781216
      Mike Frysinger authored
      
      If you run checkpatch against multiple patches, and one of them has a
      whitespace issue which can be helped via a script (rpt_cleaners), you will
      see the same NOTE over and over for all subsequent patches.  It makes it
      seem like those patches also have whitespace problems when in reality,
      there's only one or two bad apples.
      
      So reset rpt_cleaners back to 0 after we've issued the note so that it
      only shows up near the patch with the actual problems.
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Cc: Andy Whitcroft <apw@canonical.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b0781216
    • Alexey Dobriyan's avatar
      kstrto*: converting strings to integers done (hopefully) right · 33ee3b2e
      Alexey Dobriyan authored
      
      1. simple_strto*() do not contain overflow checks and crufty,
         libc way to indicate failure.
      2. strict_strto*() also do not have overflow checks but the name and
         comments pretend they do.
      3. Both families have only "long long" and "long" variants,
         but users want strtou8()
      4. Both "simple" and "strict" prefixes are wrong:
         Simple doesn't exactly say what's so simple, strict should not exist
         because conversion should be strict by default.
      
      The solution is to use "k" prefix and add convertors for more types.
      Enter
      	kstrtoull()
      	kstrtoll()
      	kstrtoul()
      	kstrtol()
      	kstrtouint()
      	kstrtoint()
      
      	kstrtou64()
      	kstrtos64()
      	kstrtou32()
      	kstrtos32()
      	kstrtou16()
      	kstrtos16()
      	kstrtou8()
      	kstrtos8()
      
      Include runtime testsuite (somewhat incomplete) as well.
      
      strict_strto*() become deprecated, stubbed to kstrto*() and
      eventually will be removed altogether.
      
      Use kstrto*() in code today!
      
      Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
            they'll be unused at runtime. This is temporarily solution,
            because I don't want to hardcode list of archs where these
            functions aren't needed. Current solution with sizeof() and
            __alignof__ at least always works.
      
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      33ee3b2e
  6. Jan 27, 2011
  7. Jan 13, 2011
  8. Oct 30, 2010
    • Thomas Gleixner's avatar
      semaphore: Remove mutex emulation · 4882720b
      Thomas Gleixner authored
      
      Semaphores used as mutexes have been deprecated for years. Now that
      all users are either converted to real semaphores or to mutexes remove
      the cruft.
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      LKML-Reference: <20100907125057.562399240@linutronix.de>
      4882720b
  9. Oct 26, 2010
  10. Aug 09, 2010
    • Patrick Pannuto's avatar
      checkpatch: fix extraneous EXPORT_SYMBOL* warnings · b998e001
      Patrick Pannuto authored
      
      These are caused by checkpatch incorrectly parsing its internal
      representation of a statement block for struct's (or anything else that is
      a statement block encapsulated in {}'s that also ends with a ';').  Fix
      this by properly parsing a statement block.
      
      An example:
      
      	+struct dummy_type dummy = {
      	+	.foo	= "baz",
      	+};
      	+EXPORT_SYMBOL_GPL(dummy);
      	+
      	+static int dummy_func(void)
      	+{
      	+	return -EDUMMYCODE;
      	+}
      	+EXPORT_SYMBOL_GPL(dummy_func);
      
      	WARNING: EXPORT_SYMBOL(foo); should immediately \
      		follow its function/variable
      	#19: FILE: dummy.c:4:
      	+EXPORT_SYMBOL_GPL(dummy);
      
      The above warning is issued when it should not be.
      
      Signed-off-by: default avatarPatrick Pannuto <ppannuto@codeaurora.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>
      b998e001
Loading