Message ID | 1560789179-3857-5-git-send-email-kvalo@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 34276bb47f8dacf5cddf9105a8f25dbb136324b6 |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/5] ath11k: 'static' is not at beginning of declaration [-Wold-style-declaration] | expand |
diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index 97ecde81559c..95bf80d38ea7 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -805,7 +805,7 @@ static ssize_t ath11k_write_extd_rx_stats(struct file *file, goto exit; } - if (enable < 0 || enable > 1) { + if (enable > 1) { ret = -EINVAL; goto exit; } diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c index 75d5629c3979..202dba40ba4f 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -650,10 +650,12 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, cmd->ring_base_addr_hi = (u64)params.ring_base_paddr >> HAL_ADDR_MSB_REG_SHIFT; - ring_entry_sz = ath11k_hal_srng_get_entrysize(ring_type); - if (ring_entry_sz < 0) + ret = ath11k_hal_srng_get_entrysize(ring_type); + if (ret < 0) return -EINVAL; + ring_entry_sz = ret; + ring_entry_sz >>= 2; cmd->info1 = FIELD_PREP(HTT_SRNG_SETUP_CMD_INFO1_RING_ENTRY_SIZE, ring_entry_sz);
Fix gcc W=1 warnings: drivers/net/wireless/ath/ath11k/dp_tx.c:654:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/net/wireless/ath/ath11k/debug.c:808:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Kalle Valo <kvalo@codeaurora.org> --- drivers/net/wireless/ath/ath11k/debug.c | 2 +- drivers/net/wireless/ath/ath11k/dp_tx.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-)