> 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); > } What else does the spinlock protect? By using test_and_set_bit/clear_bit you could get rid of them unless it's needed elsewhere. - : 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