Home
last modified time | relevance | path

Searched hist:"5 bc26726ada73264c0fd7b93ccbe7d9e78b2b2d2" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/net/ethernet/freescale/
H A Dfec_main.cdiff 5bc26726ada73264c0fd7b93ccbe7d9e78b2b2d2 Mon Oct 13 04:53:48 CEST 2014 Nimrod Andy <B38611@freescale.com> 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 <festevam@gmail.com>
Suggested-by: Christopher Li <sparse@chrisli.org>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>