Re: [PATCH 6/6] staging: sm750fb: Spinlock and unlock in the same block

2015-03-11 Thread Dan Carpenter
On Wed, Mar 11, 2015 at 01:28:45AM +, Lorenzo Stoakes wrote: > -static inline void myspin_lock(spinlock_t * sl){ > - struct lynx_share * share; > - share = container_of(sl,struct lynx_share,slock); > - if(share->dual){ > - spin_lock(sl); > - } > -} Yes, good. We

Re: [PATCH 6/6] staging: sm750fb: Spinlock and unlock in the same block

2015-03-11 Thread Dan Carpenter
On Wed, Mar 11, 2015 at 01:28:45AM +, Lorenzo Stoakes wrote: -static inline void myspin_lock(spinlock_t * sl){ - struct lynx_share * share; - share = container_of(sl,struct lynx_share,slock); - if(share-dual){ - spin_lock(sl); - } -} Yes, good. We all hate

[PATCH 6/6] staging: sm750fb: Spinlock and unlock in the same block

2015-03-10 Thread Lorenzo Stoakes
This patch combines spinlock locks and unlocks together in the same block rather than occurring in separate blocks preventing a possible deadlock. This fixes the following sparse warnings:- drivers/staging/sm750fb/sm750.c:218:22: warning: context imbalance in 'lynxfb_ops_fillrect' - different

[PATCH 6/6] staging: sm750fb: Spinlock and unlock in the same block

2015-03-10 Thread Lorenzo Stoakes
This patch combines spinlock locks and unlocks together in the same block rather than occurring in separate blocks preventing a possible deadlock. This fixes the following sparse warnings:- drivers/staging/sm750fb/sm750.c:218:22: warning: context imbalance in 'lynxfb_ops_fillrect' - different