projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd7f1b6
)
staging: qlge: qlge_dbg: Simplify while statements
author
Suraj Upadhyay
<usuraj35@gmail.com>
Mon, 13 Jul 2020 12:16:21 +0000
(17:46 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 13 Jul 2020 13:37:42 +0000
(15:37 +0200)
Simplify while loops into more readable and simple for loops.
Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link:
https://lore.kernel.org/r/79e35c695a80168639c073137a80804da3362301.1594642213.git.usuraj35@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge_dbg.c
patch
|
blob
|
history
diff --git
a/drivers/staging/qlge/qlge_dbg.c
b/drivers/staging/qlge/qlge_dbg.c
index 32fbd30a6a2e23b670bfdf5071ad45ba530e9071..985a6c34129467d2928692701f66641cd39826c3 100644
(file)
--- a/
drivers/staging/qlge/qlge_dbg.c
+++ b/
drivers/staging/qlge/qlge_dbg.c
@@
-42,9
+42,9
@@
static int ql_wait_other_func_reg_rdy(struct ql_adapter *qdev, u32 reg,
u32 bit, u32 err_bit)
{
u32 temp;
- int count
= 10
;
+ int count;
-
while (count
) {
+
for (count = 10; count; count--
) {
temp = ql_read_other_func_reg(qdev, reg);
/* check for errors */
@@
-53,7
+53,6
@@
static int ql_wait_other_func_reg_rdy(struct ql_adapter *qdev, u32 reg,
else if (temp & bit)
return 0;
mdelay(10);
- count--;
}
return -1;
}