From: Nimrod Andy Date: Mon, 13 Oct 2014 02:53:48 +0000 (+0800) Subject: net: fec: Fix sparse warnings with different lock contexts for basic block X-Git-Tag: fixes-against-v3.18-rc2~61^2~56 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bc26726ada73264c0fd7b93ccbe7d9e78b2b2d2;p=pandora-kernel.git net: fec: Fix sparse warnings with different lock contexts for basic block reproduce: make ARCH=arm C=1 2>fec.txt drivers/net/ethernet/freescale/fec_main.o cat fec.txt sparse warnings: drivers/net/ethernet/freescale/fec_main.c:2916:12: warning: context imbalance in 'fec_set_features' - different lock contexts for basic block Christopher Li suggest to change as below: if (need_lock) { lock(); do_something_real(); unlock(); } else { do_something_real(); } Reported-by: Fabio Estevam Suggested-by: Christopher Li Signed-off-by: Fugang Duan Signed-off-by: David S. Miller --- Reading git-diff-tree failed