Commit 433ef1b2 authored by Erik Stromdahl's avatar Erik Stromdahl Committed by Kalle Valo

ath10k: sdio: fix compile warning

As suggested by Arnd Bergmann, replace
"while (time_before_...) {}"
with
"do {} while (time_before_...)"

This fixes the following warnings detected by gcc 4.1.2:

drivers/net/wireless/ath/ath10k/sdio.c: In function
‘ath10k_sdio_mbox_rxmsg_pending_handler’:
drivers/net/wireless/ath/ath10k/sdio.c:676: warning: ‘ret’ may be used uninitialized in this function

...

drivers/net/wireless/ath/ath10k/sdio.c: In function
‘ath10k_sdio_irq_handler’:
drivers/net/wireless/ath/ath10k/sdio.c:1331: warning: ‘ret’ may be used uninitialized in this function
Signed-off-by: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 4db66499
...@@ -683,7 +683,7 @@ static int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k *ar, ...@@ -683,7 +683,7 @@ static int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k *ar,
lookaheads[0] = msg_lookahead; lookaheads[0] = msg_lookahead;
timeout = jiffies + SDIO_MBOX_PROCESSING_TIMEOUT_HZ; timeout = jiffies + SDIO_MBOX_PROCESSING_TIMEOUT_HZ;
while (time_before(jiffies, timeout)) { do {
/* Try to allocate as many HTC RX packets indicated by /* Try to allocate as many HTC RX packets indicated by
* n_lookaheads. * n_lookaheads.
*/ */
...@@ -719,7 +719,7 @@ static int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k *ar, ...@@ -719,7 +719,7 @@ static int ath10k_sdio_mbox_rxmsg_pending_handler(struct ath10k *ar,
* performance in high throughput situations. * performance in high throughput situations.
*/ */
*done = false; *done = false;
} } while (time_before(jiffies, timeout));
if (ret && (ret != -ECANCELED)) if (ret && (ret != -ECANCELED))
ath10k_warn(ar, "failed to get pending recv messages: %d\n", ath10k_warn(ar, "failed to get pending recv messages: %d\n",
...@@ -1336,11 +1336,11 @@ static void ath10k_sdio_irq_handler(struct sdio_func *func) ...@@ -1336,11 +1336,11 @@ static void ath10k_sdio_irq_handler(struct sdio_func *func)
sdio_release_host(ar_sdio->func); sdio_release_host(ar_sdio->func);
timeout = jiffies + ATH10K_SDIO_HIF_COMMUNICATION_TIMEOUT_HZ; timeout = jiffies + ATH10K_SDIO_HIF_COMMUNICATION_TIMEOUT_HZ;
while (time_before(jiffies, timeout) && !done) { do {
ret = ath10k_sdio_mbox_proc_pending_irqs(ar, &done); ret = ath10k_sdio_mbox_proc_pending_irqs(ar, &done);
if (ret) if (ret)
break; break;
} } while (time_before(jiffies, timeout) && !done);
sdio_claim_host(ar_sdio->func); sdio_claim_host(ar_sdio->func);
......
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