LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86 floppy: kill off the 'register' keyword from header
@ 2008-03-26 1:16 Jesper Juhl
2008-03-26 6:06 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2008-03-26 1:16 UTC (permalink / raw)
To: LKML
Cc: H Peter Anvin, Ingo Molnar, Thomas Gleixner, Ian Molton,
Alain L Knaff, David C Niemi, Trivial Patch Monkey,
Andrew Morton
When compilers became generally better at optimizing code than humans, the
register keyword became mostly useless. For the floppy driver it certainly
is since it's so slow compared to the rest of the system that optimizing
access to a single variable or two isn't going to make any real
difference
So let's just leave it to the compiler - it'll do a better job anyway.
This patch does away with a few register keywords in the x86 floppy driver.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
floppy.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/asm-x86/floppy.h b/include/asm-x86/floppy.h
index a48d715..31b0d80 100644
--- a/include/asm-x86/floppy.h
+++ b/include/asm-x86/floppy.h
@@ -52,7 +52,7 @@ static int doing_pdma;
static irqreturn_t floppy_hardint(int irq, void *dev_id)
{
- register unsigned char st;
+ unsigned char st;
#undef TRACE_FLPY_INT
@@ -70,8 +70,8 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id)
#endif
{
- register int lcount;
- register char *lptr;
+ int lcount;
+ char *lptr;
st = 1;
for(lcount=virtual_dma_count, lptr=virtual_dma_addr;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86 floppy: kill off the 'register' keyword from header
2008-03-26 1:16 [PATCH] x86 floppy: kill off the 'register' keyword from header Jesper Juhl
@ 2008-03-26 6:06 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-03-26 6:06 UTC (permalink / raw)
To: Jesper Juhl
Cc: LKML, H Peter Anvin, Ingo Molnar, Thomas Gleixner, Ian Molton,
Alain L Knaff, David C Niemi, Trivial Patch Monkey,
Andrew Morton
* Jesper Juhl <jesper.juhl@gmail.com> wrote:
> - register unsigned char st;
> + unsigned char st;
> - register int lcount;
> - register char *lptr;
> + int lcount;
> + char *lptr;
thanks, applied.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-26 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-26 1:16 [PATCH] x86 floppy: kill off the 'register' keyword from header Jesper Juhl
2008-03-26 6:06 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).