Skip to contentSkip to conversation

=?iso-8859-1?Q?

KJ Domen Puncer 1 participant 1 message Apr 29, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Weird subject :-)

Quoted 3 lines · On 29/04/05 11:18 +0200, [email protected] wrote:

--- linux-2.6.11.7/drivers/net/irda/ep7211_ir.c.orig

2005-04-27 17:41:36.000000000 +0100

+++ linux-2.6.11.7/drivers/net/irda/ep7211_ir.c 2005-04-29

No description, no Signed-off-by:, lines wrapped.

Review line 17

Quoted 6 lines

10:10:07.000000000 +0100

(quoted diff) +1 -0
@@ -14,6 +14,7 @@
 
 #include <asm/io.h>
 #include <asm/hardware.h>
+#include<linux/spinlock.h>

Please put this after others linux/ includes, with a space before '<'.

Review

Quoted 9 lines
(quoted diff) +0 -0
 static void ep7211_ir_open(dongle_t *self, struct qos_info
 *qos)
 {
(quoted diff) +3 -2
 	unsigned int syscon1, flags;
-
-	save_flags(flags); cli();
+	spin_lock_init(&driver_lock);
+
+	spin_lock_irqsave(&driver_lock,flags);

This doesn't look safe. Imagine 2 processes on SMP. (After some browsing, this looks like some ARM architecture, so probably no SMP; still better put this in ep7211_ir_init() or declare with static DEFINE_SPINLOCK.)

Space after ',' missing, not just here.

Domen

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