mirror of
https://github.com/opnsense/src.git
synced 2026-05-19 16:35:42 -04:00
Fix clang 15 warning in cxgbe
Clang 15 warns:
sys/dev/cxgbe/cudbg/cudbg_lib.c:2949:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
int i = 0;
^
Apparently 'i' was meant as the current retry counter, but '1' was used
in the while loop comparison instead, making the loop potentially
infinite, if 'busy' never gets reset.
MFC after: 3 days
Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D35834
(cherry picked from commit fb0493d559)
This commit is contained in:
parent
dc2e12abb2
commit
fde05f9864
1 changed files with 1 additions and 1 deletions
|
|
@ -2950,7 +2950,7 @@ static int check_busy_bit(struct adapter *padap)
|
|||
int retry = 10;
|
||||
int status = 0;
|
||||
|
||||
while (busy & (1 < retry)) {
|
||||
while (busy && i < retry) {
|
||||
val = t4_read_reg(padap, A_CIM_HOST_ACC_CTRL);
|
||||
busy = (0 != (val & CUDBG_CIM_BUSY_BIT));
|
||||
i++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue