[PATCH linux dev-4.10 v5 31/31] drivers: hwmon: occ: Cancel occ operations in remove()

Brad Bishop bradleyb at fuzziesquirrel.com
Tue Oct 17 05:34:11 AEDT 2017


>>> 
>>> Why not spin_lock_irqsave/spin_unlock_irqsave? Same throughout this patch.
>> 
>> 
>> Well spin_lock_irq/spin_unlock_irq is used through the occ and sbefifo
>> drivers. Just following suit here. I can switch it if necessary.
> 
> If you understand the differences and used the non-save/restore
> versions intentionally, then we can keep the driver as it is.

This is my fault.  The initial sbefifo driver introduced this.  I don’t remember
what my mode of thinking was.  Regardless, it sounds like it was wrong.

> 
> In general, to be safe, more experienced kernel hackers than myself
> recommend the irqsave/irqrestore versions of the spin lock functions
> as they are safe to call from any context (IRQ or otherwise).
> 
> Cheers,
> 
> Joel


More information about the openbmc mailing list