Commit 587b839d authored by Colin Ian King's avatar Colin Ian King Committed by Tony Nguyen

ice: remove redundant continue statement in a for-loop

The continue statement in the for-loop is redundant. Re-work the hw_lock
check to remove it.

Addresses-Coverity: ("Continue has no effect")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 4d7f75fe
......@@ -410,13 +410,11 @@ bool ice_ptp_lock(struct ice_hw *hw)
for (i = 0; i < MAX_TRIES; i++) {
hw_lock = rd32(hw, PFTSYN_SEM + (PFTSYN_SEM_BYTES * hw->pf_id));
hw_lock = hw_lock & PFTSYN_SEM_BUSY_M;
if (hw_lock) {
/* Somebody is holding the lock */
usleep_range(10000, 20000);
continue;
} else {
if (!hw_lock)
break;
}
/* Somebody is holding the lock */
usleep_range(10000, 20000);
}
return !hw_lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment