]> git.baikalelectronics.ru Git - kernel.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)
commit240cf2a5b8061f8ba7893a85c9f7d683a5095d3a
treec02b9cc282e69d619f427176cba06a6bca216a01
parent90564f08514652450d2dc496adaf3fe4f31ee8a2
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