<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/scripts/checkpatch.pl, branch linux-2.6.38.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-2.6.38.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-2.6.38.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2011-04-21T21:32:41+00:00</updated>
<entry>
<title>kstrto*: converting strings to integers done (hopefully) right</title>
<updated>2011-04-21T21:32:41+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-03-22T23:34:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=280a1c38c907ab1e2617bdcef66de6bc70897253'/>
<id>urn:sha1:280a1c38c907ab1e2617bdcef66de6bc70897253</id>
<content type='text'>
commit 33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c upstream.

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: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>checkpatch.pl: add "prefer __packed" check</title>
<updated>2011-01-13T16:03:11+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-01-13T01:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3d130fd03e06672f7700e2cb694b29f9a98227ca'/>
<id>urn:sha1:3d130fd03e06672f7700e2cb694b29f9a98227ca</id>
<content type='text'>
There's a __packed #define for __attribute__((packed)).  Add a checkpatch
to tell people about it.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: check for world-writeable sysfs/debugfs files</title>
<updated>2011-01-13T16:03:11+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2011-01-13T00:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=88f8831c055858179a7844d9dd4ddd7d3621322e'/>
<id>urn:sha1:88f8831c055858179a7844d9dd4ddd7d3621322e</id>
<content type='text'>
Exporting world writable sysfs/debugfs files is usually a bad thing.  Warn
about it.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch.pl: fix CAST detection</title>
<updated>2011-01-13T16:03:11+00:00</updated>
<author>
<name>Florian Mickler</name>
<email>florian@mickler.org</email>
</author>
<published>2011-01-13T00:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c023e4734c3e8801e0ecb5e81b831d42a374d861'/>
<id>urn:sha1:c023e4734c3e8801e0ecb5e81b831d42a374d861</id>
<content type='text'>
We should only claim that something is a cast if we did not encouter a
token before, that did set av_pending.

This fixes the operator * in the line below to be detected as binary (vs
unary).

kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);

Reported-by: Audun Hoem &lt;audun.hoem@gmail.com&gt;
Signed-off-by: Florian Mickler &lt;florian@mickler.org&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/checkpatch.pl: add check for multiple terminating semicolons and casts of vmalloc</title>
<updated>2011-01-13T16:03:11+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-01-13T00:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=caf2a54f101a55ec318c2a20253a1977802f7de4'/>
<id>urn:sha1:caf2a54f101a55ec318c2a20253a1977802f7de4</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>semaphore: Remove mutex emulation</title>
<updated>2010-10-30T10:12:50+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-09-07T14:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4882720b267b7b1d1b0ce08334b205f0329d4615'/>
<id>urn:sha1:4882720b267b7b1d1b0ce08334b205f0329d4615</id>
<content type='text'>
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: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
LKML-Reference: &lt;20100907125057.562399240@linutronix.de&gt;

</content>
</entry>
<entry>
<title>scripts/checkpatch.pl: add check for declaration of pci_device_id</title>
<updated>2010-10-26T23:52:21+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-10-26T21:23:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5'/>
<id>urn:sha1:93ed0e2d07b25aff4db1d61bfbcd1e82074c0ad5</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/checkpatch.pl: add warnings for static char that could be static const char</title>
<updated>2010-10-26T23:52:21+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-10-26T21:23:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cb710eca6820493add0ddd3d7e8e3ee53f2b6e57'/>
<id>urn:sha1:cb710eca6820493add0ddd3d7e8e3ee53f2b6e57</id>
<content type='text'>
Add warnings for possible missing const uses of
	static char foo[] = "bar"
    that could be
	static const char foo[] = "bar"
and
	static const char *foo[] = {"bar", "baz"}
    that could be
	static const char * const foo[] = {"bar", "baz"}

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Mike Frysinger &lt;vapier.adi@gmail.com&gt;
Cc: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: version 0.31</title>
<updated>2010-10-26T23:52:21+00:00</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@canonical.com</email>
</author>
<published>2010-10-26T21:23:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=267ad8f42644c2fa4ff6c2e7596d2b02c7397c85'/>
<id>urn:sha1:267ad8f42644c2fa4ff6c2e7596d2b02c7397c85</id>
<content type='text'>
Signed-off-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>checkpatch: statement/block context analyser should look at sanitised lines</title>
<updated>2010-10-26T23:52:21+00:00</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@canonical.com</email>
</author>
<published>2010-10-26T21:23:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=01464f30a97c5c30bf9633309b27cce055cef8fd'/>
<id>urn:sha1:01464f30a97c5c30bf9633309b27cce055cef8fd</id>
<content type='text'>
When tracking context to find a block or statement we need to use the
sanitised lines, else perentheses '(' &amp; ')' and braces '{' &amp; '}' can throw
the scanner out.  Also fix up a couple of error outputs which include
those sanitised lines incorrectly.

Signed-off-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
