Skip to contentSkip to conversation

remove CONFIG_LBD ifdefs from fusion

PATCH In review Christoph Hellwig 1 participant 2 messages May 31, 2004 – Jul 4, 2004

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

PATCH 1/1 remove CONFIG_LBD ifdefs from fusion

The CONFIG_LBD case is also fine for !CONFIG_LBD, just a bit more complicated in the source (but the compile optimizes that away - ->bios_param isn't exactly a fast-path either..)

drivers/message/fusion/mptscsih.c +1 -10
@@ -3195,19 +3099,14 @@
 	int		heads;
 	int		sectors;
 	sector_t	cylinders;
-#ifdef CONFIG_LBD
 	ulong 		dummy;
-#endif
 
 	heads = 64;
 	sectors = 32;
-#ifdef CONFIG_LBD
+
 	dummy = heads * sectors;
 	cylinders = capacity;
 	sector_div(cylinders,dummy);
-#else
-	cylinders = (ulong)capacity / (heads * sectors);
-#endif
 
 	/*
 	 * Handle extended translation size for logical drives
@@ -3216,13 +3115,9 @@
 	if ((ulong)capacity >= 0x200000) {
 		heads = 255;
 		sectors = 63;
-#ifdef CONFIG_LBD
 		dummy = heads * sectors;
 		cylinders = capacity;
 		sector_div(cylinders,dummy);
-#else
-		cylinders = (ulong)capacity / (heads * sectors);
-#endif
 	}
 
 	/* return result */
#1 lore raw
Quoted 3 lines · Christoph Hellwig

The CONFIG_LBD case is also fine for !CONFIG_LBD, just a bit more complicated in the source (but the compile optimizes that away - ->bios_param isn't exactly a fast-path either..)

Still doesn't seem to be merged. Here's the patch again:

drivers/message/fusion/mptscsih.c +1 -10
@@ -3195,19 +3099,14 @@
 	int		heads;
 	int		sectors;
 	sector_t	cylinders;
-#ifdef CONFIG_LBD
 	ulong 		dummy;
-#endif
 
 	heads = 64;
 	sectors = 32;
-#ifdef CONFIG_LBD
+
 	dummy = heads * sectors;
 	cylinders = capacity;
 	sector_div(cylinders,dummy);
-#else
-	cylinders = (ulong)capacity / (heads * sectors);
-#endif
 
 	/*
 	 * Handle extended translation size for logical drives
@@ -3216,13 +3115,9 @@
 	if ((ulong)capacity >= 0x200000) {
 		heads = 255;
 		sectors = 63;
-#ifdef CONFIG_LBD
 		dummy = heads * sectors;
 		cylinders = capacity;
 		sector_div(cylinders,dummy);
-#else
-		cylinders = (ulong)capacity / (heads * sectors);
-#endif
 	}
 
 	/* return result */