[PATCH] SuperH floppy: kill 'register' keyword from floppy.h header - Kernel

This is a discussion on [PATCH] SuperH floppy: kill 'register' keyword from floppy.h header - Kernel ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] SuperH floppy: kill 'register' keyword from floppy.h header

  1. [PATCH] SuperH floppy: kill 'register' keyword from floppy.h header


    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 SuperH floppy
    driver.


    Signed-off-by: Jesper Juhl
    ---

    floppy.h | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h
    index 59fbfdc..afa7f8f 100644
    --- a/include/asm-sh/floppy.h
    +++ b/include/asm-sh/floppy.h
    @@ -54,7 +54,7 @@ static int doing_pdma;

    static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
    {
    - register unsigned char st;
    + unsigned char st;

    #undef TRACE_FLPY_INT

    @@ -74,8 +74,8 @@ static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
    #endif

    {
    - register int lcount;
    - register char *lptr;
    + int lcount;
    + char *lptr;

    st = 1;
    for(lcount=virtual_dma_count, lptr=virtual_dma_addr;



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] SuperH floppy: kill 'register' keyword from floppy.h header

    On Wed, Mar 26, 2008 at 02:16:32AM +0100, Jesper Juhl wrote:
    >
    > 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 SuperH floppy
    > driver.
    >
    >
    > Signed-off-by: Jesper Juhl


    applied, thanks.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread