<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/lib/test-kstrtox.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2015-09-10T20:29:01+00:00</updated>
<entry>
<title>kstrto*: accept "-0" for signed conversion</title>
<updated>2015-09-10T20:29:01+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2015-09-09T22:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d2e4715a65ca7e81b292d01ae009a03ccedb9b5'/>
<id>urn:sha1:2d2e4715a65ca7e81b292d01ae009a03ccedb9b5</id>
<content type='text'>
strtol(3) et al accept "-0", so should we.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&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>lib/test-kstrtox.c: use ARRAY_SIZE instead of sizeof/sizeof[0]</title>
<updated>2014-08-07T01:01:25+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-08-06T23:09:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=129965a916a8b659d7bb3b59877a3e8259bed5e3'/>
<id>urn:sha1:129965a916a8b659d7bb3b59877a3e8259bed5e3</id>
<content type='text'>
Use kernel.h definition.

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: 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;
</content>
</entry>
<entry>
<title>lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata</title>
<updated>2012-05-29T23:22:32+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2012-05-29T22:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26d7b99b835294ab21e2a2b4b3bdf04b03b0028d'/>
<id>urn:sha1:26d7b99b835294ab21e2a2b4b3bdf04b03b0028d</id>
<content type='text'>
As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt.  If there were one however
compilation would fail with

	error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: 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;
</content>
</entry>
<entry>
<title>kstrtox: fix compile warnings in test</title>
<updated>2011-04-14T23:06:54+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2011-04-14T22:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01eda2e0c0cf035308308a19581e4979285b51ec'/>
<id>urn:sha1:01eda2e0c0cf035308308a19581e4979285b51ec</id>
<content type='text'>
Fix the following warnings:

    CC [M]  lib/test-kstrtox.o
  lib/test-kstrtox.c: In function 'test_kstrtou64_ok':
  lib/test-kstrtox.c:318: warning: this decimal constant is unsigned only in ISO C90
	...

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.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>kstrto*: converting strings to integers done (hopefully) right</title>
<updated>2011-03-23T00:44:14+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.radix-linux.su/kernel/linux.git/commit/?id=33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c'/>
<id>urn:sha1:33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c</id>
<content type='text'>
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;
</content>
</entry>
</feed>
