Skip to contentSkip to conversation

- 2.6.2 - spinlock.h - compiler cleanups

PATCH New Ron Gage 1 participant 1 message Feb 13, 2004

Subsystems (2)
lore
Share & tools
lore

Ron Gage

author
#0 lore raw

PATCH 1/1 - 2.6.2 - spinlock.h - compiler cleanups

This patch eliminates "parameter defined but not used" warnings in spinlock.h.

Probably useless, but I like clean compiles. :)

Signature · 2 lines
Ron Gage - LPIC1, MCP, A+, Net+
Pontiac, Michigan
include/linux/spinlock.h +13 -0
@@ -411,11 +411,15 @@
 	 * attempt to acquire the lock bit.
 	 */
 	preempt_disable();
+
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
 	while (test_and_set_bit(bitnum, addr)) {
 		while (test_bit(bitnum, addr))
 			cpu_relax();
 	}
+#else
+	addr = addr;
+	bitnum = bitnum;
 #endif
 }
 
@@ -434,6 +438,8 @@
 	return ret;
 #else
 	preempt_disable();
+	bitnum = bitnum;
+	addr = addr;
 	return 1;
 #endif
 }
@@ -447,6 +453,9 @@
 	BUG_ON(!test_bit(bitnum, addr));
 	smp_mb__before_clear_bit();
 	clear_bit(bitnum, addr);
+#else
+	bitnum = bitnum;
+	addr = addr;
 #endif
 	preempt_enable();
 }
@@ -459,8 +468,12 @@
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
 	return test_bit(bitnum, addr);
 #elif defined CONFIG_PREEMPT
+	bitnum = bitnum;
+	addr = addr;
 	return preempt_count();
 #else
+	bitnum = bitnum;
+	addr = addr;
 	return 1;
 #endif
 }

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors