Use bitops for testing, setting and clearing bits Signed-off-by: Alexis Bruemmer <alexisb@xxxxxxxxxx> --- Index: linux-2.6.17-rc5/drivers/scsi/sas/sas_internal.h =================================================================== --- linux-2.6.17-rc5.orig/drivers/scsi/sas/sas_internal.h 2006-06-05 13:12:57.000000000 -0700 +++ linux-2.6.17-rc5/drivers/scsi/sas/sas_internal.h 2006-06-06 09:23:29.000000000 -0700 @@ -76,21 +76,22 @@ unsigned long flags; spin_lock_irqsave(lock, flags); - if (*pending & (1 << event)) { + if (test_bit(event, pending)) { spin_unlock_irqrestore(lock, flags); return; } - *pending |= (1 << event); + __set_bit(event, pending); spin_unlock_irqrestore(lock, flags); scsi_queue_work(shost, work); } -static inline void sas_begin_event(int event, spinlock_t *lock, u32 *pending) +static inline void sas_begin_event(int event, spinlock_t *lock, + unsigned long *pending) { unsigned long flags; spin_lock_irqsave(lock, flags); - *pending &= ~(1 << event); + __clear_bit(event, pending); spin_unlock_irqrestore(lock, flags); } - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html