Skip to contentSkip to conversation

floppy.c: Remove pointless register keywords

PATCH Superseded Jesper Juhl 1 participant 1 message Feb 5, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 floppy.c: Remove pointless register keywords

This patch removes the use of the 'register' keyword from floppy.c

Marking some variables 'register' may have made sense in the past (though I doubt it for these ones), but these days I very much suspect that we would rather grant gcc more freedom in how to handle the variables and I doubt very much that in this day and age optimizing access to variables via 'register' makes any sense for a floppy driver. Let's just get rid of it.

---

 floppy.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/floppy.c renamed from drivers/block/floppy.c.patch1 +2 -2
@@ -791,7 +791,7 @@
 
 static int set_dor(int fdc, char mask, char data)
 {
-	register unsigned char drive, unit, newdor, olddor;
+	unsigned char drive, unit, newdor, olddor;
 
 	if (FDCS->address == -1)
 		return -1;
@@ -946,7 +946,7 @@
 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;