Skip to content

Commit

Permalink
floppy: remove register keyword use from floppy driver
Browse files Browse the repository at this point in the history
The floppy drive is slow.  These days I see absolutely no good reason why the
floppy driver should try to gain a tiny bit of speed by telling gcc to
optimize access to some variables via the register keyword.  Better to just
leave gcc free to do whatever optimizations it deduces to be sane and not
hamper it by telling it that some variables in the floppy driver are special
and need to be fast (they don't).

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jesper Juhl authored and Linus Torvalds committed Oct 17, 2007
1 parent aee9041 commit fdc1ca8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,10 @@ static inline int is_selected(int dor, int unit)

static int set_dor(int fdc, char mask, char data)
{
register unsigned char drive, unit, newdor, olddor;
unsigned char unit;
unsigned char drive;
unsigned char newdor;
unsigned char olddor;

if (FDCS->address == -1)
return -1;
Expand Down Expand Up @@ -937,7 +940,7 @@ static void motor_off_callback(unsigned long nr)
static void floppy_off(unsigned int drive)
{
unsigned long volatile delta;
register int fdc = FDC(drive);
int fdc = FDC(drive);

if (!(FDCS->dor & (0x10 << UNIT(drive))))
return;
Expand Down

0 comments on commit fdc1ca8

Please sign in to comment.