From: Zachary Warren Date: Sat, 17 Jan 2015 11:39:53 +0000 (+1100) Subject: staging: unisys: rework signal remove/insert to avoid sparse lock warnings X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~83^2~136 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b12fdf7da;p=pandora-kernel.git staging: unisys: rework signal remove/insert to avoid sparse lock warnings Avoids the following warnings from sparse: visorchannel_funcs.c:457:9: warning: context imbalance in 'visorchannel_signalremove' - different lock contexts for basic block visorchannel_funcs.c:512:9: warning: context imbalance in 'visorchannel_signalinsert' - different lock contexts for basic These warnings are false positives. Sparse can't track conditional contexts. The change puts the lock/unlock into the same context by splitting the insert/remove functions each into a wrapper function that does locking if necessary and an inner function that does the insert/remove operation. Signed-off-by: Zachary Warren Acked-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed