]> asedeno.scripts.mit.edu Git - linux.git/commit
Staging: qlge: Rewrite two while loops as simple for loops
authorSamuil Ivanov <samuil.ivanovbg@gmail.com>
Wed, 23 Oct 2019 20:58:55 +0000 (23:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Oct 2019 18:49:09 +0000 (20:49 +0200)
commit41e1bf811ace29bdc0df15523e3dfb3233704d1b
tree2da5b6fa29fe672720f76db8f0b7f8004b1ab633
parentf29acb9c5d0fe438291be62a68590891ce1cad9a
Staging: qlge: Rewrite two while loops as simple for loops

This is a task from the TODO list of qlge driver:
 - some "while" loops could be rewritten with simple "for"

The change is in functions ql_wait_reg_rdy and ql_wait_cfg in qlge_main.c.
The while loops are basically count based
(they decrement on each iteration),
and it makes more sense to be a for loop construction instead.

Signed-off-by: Samuil Ivanov <samuil.ivanovbg@gmail.com>
Link: https://lore.kernel.org/r/20191023205855.GA1841@samuil-ThinkCentre-M92P
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge_main.c