From: Jesper Juhl <jesper.juhl@gmail.com>
To: "linux-kernel" <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Ingo Oeser <ioe@informatik.tu-chemnitz.de>,
Jason Thomas <jason@topic.com.au>,
Matthew Hawkins <matt@mh.dropbear.id.au>
Subject: [PATCH 2/3] lib/string.c cleanup : remove pointless register keyword
Date: Fri, 23 Sep 2005 23:51:12 +0200 [thread overview]
Message-ID: <200509232351.12730.jesper.juhl@gmail.com> (raw)
In-Reply-To: <200509232344.26044.jesper.juhl@gmail.com>
Removes a few pointless register keywords. register is merely a compiler
hint that access to the variable should be optimized, but gcc (3.3.6 in my
case) generates the exact same code with and without the keyword, and even
if gcc did something different with register present I think it is doubtful
we would want to optimize access to these variables - especially since this
is generic library code and there are supposed to be optimized versions in
asm/ for anything that really matters speed wise.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
lib/string.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.14-rc2-git3/lib/string.c-with-patch-1 2005-09-23 22:44:42.000000000 +0200
+++ linux-2.6.14-rc2-git3/lib/string.c 2005-09-23 22:45:35.000000000 +0200
@@ -219,7 +219,7 @@ EXPORT_SYMBOL(strlcat);
#undef strcmp
int strcmp(const char *cs, const char *ct)
{
- register signed char __res;
+ signed char __res;
while (1) {
if ((__res = *cs - *ct++) != 0 || !*cs++)
@@ -239,7 +239,7 @@ EXPORT_SYMBOL(strcmp);
*/
int strncmp(const char *cs, const char *ct, size_t count)
{
- register signed char __res = 0;
+ signed char __res = 0;
while (count) {
if ((__res = *cs - *ct++) != 0 || !*cs++)
next prev parent reply other threads:[~2005-09-23 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 21:44 [PATCH 0/3] lib/string.c cleanup Jesper Juhl
2005-09-23 21:48 ` [PATCH 1/3] lib/string.c cleanup : whitespace and CodingStyle cleanups Jesper Juhl
2005-09-23 23:05 ` Alexey Dobriyan
2005-09-23 23:02 ` Jesper Juhl
2005-09-23 21:51 ` Jesper Juhl [this message]
2005-09-23 21:53 ` [PATCH 3/3] lib/string.c cleanup : remove pointless explicit casts Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509232351.12730.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=akpm@osdl.org \
--cc=ioe@informatik.tu-chemnitz.de \
--cc=jason@topic.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@mh.dropbear.id.au \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox