]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging/mei: don't check if list is empty before looping
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 27 Nov 2011 19:43:34 +0000 (21:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 21:46:18 +0000 (06:46 +0900)
commitb7cd2d9fdc0185e0f4fede78f2a040c5f7c5a179
treec02b9cc282e69d619f427176cba06a6bca216a01
parentc83720941f92dc7b74c9d2869023b7e1cfcf9b6d
staging/mei: don't check if list is empty before looping

1. No need to check if a list is empty before list_for_each_ looping as
this is already checked by loop stopping conditional.

The side effect is reduced indentation depth
from:
if (!list_empty)
list_for_each()
to:
list_for_each()

2. drop cb_ prefix from cl_pos, cl_next variables used in list_for_each
loops. The code is more compact and readable

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/mei/init.c
drivers/staging/mei/interrupt.c
drivers/staging/mei/iorw.c
drivers/staging/mei/main.c