Message ID | 1569386658-1325-1-git-send-email-vthiagar@codeaurora.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 8cc72b4807778f4173f0a3ceae1383c48014a9ea |
Delegated to: | Kalle Valo |
Headers | show |
Series | [bringup,1/3] ath11k: Clean ups in ath11k_ce_rx_buf_enqueue_pipe() error path | expand |
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> wrote: > Unify the unlock/ring_access_end calls with error path in > ath11k_ce_rx_buf_enqueue_pipe(). Update to ce_pipe->rx_buf_needed > is done inside srng->lock before ath11k_hal_srng_access_end(). > Also rename the goto label from err to exit. > > Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> 3 patches applied to ath11k-post-bringup branch of ath.git, thanks. d28909b5a9ac ath11k: Clean ups in ath11k_ce_rx_buf_enqueue_pipe() error path 759b5305b0bc ath11k: Clean up parameter list in ath11k_ce_completed_send_next() 51725f95094a ath11k: Use struct_size() to get the structure size with trailing array
Kalle Valo <kvalo@codeaurora.org> writes: > Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> wrote: > >> Unify the unlock/ring_access_end calls with error path in >> ath11k_ce_rx_buf_enqueue_pipe(). Update to ce_pipe->rx_buf_needed >> is done inside srng->lock before ath11k_hal_srng_access_end(). >> Also rename the goto label from err to exit. >> >> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> >> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> > > 3 patches applied to ath11k-post-bringup branch of ath.git, thanks. > > d28909b5a9ac ath11k: Clean ups in ath11k_ce_rx_buf_enqueue_pipe() error path > 759b5305b0bc ath11k: Clean up parameter list in ath11k_ce_completed_send_next() > 51725f95094a ath11k: Use struct_size() to get the structure size with trailing array Please disregard, I applied to a wrong branch.
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> wrote: > Unify the unlock/ring_access_end calls with error path in > ath11k_ce_rx_buf_enqueue_pipe(). Update to ce_pipe->rx_buf_needed > is done inside srng->lock before ath11k_hal_srng_access_end(). > Also rename the goto label from err to exit. > > Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org> 3 patches applied to ath11k-bringup branch of ath.git, thanks. 8cc72b480777 ath11k: Clean ups in ath11k_ce_rx_buf_enqueue_pipe() error path 9f55e5658237 ath11k: Clean up parameter list in ath11k_ce_completed_send_next() 3dcb3e76a260 ath11k: Use struct_size() to get the structure size with trailing array
diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c index c1b170c..205f28e 100644 --- a/drivers/net/wireless/ath/ath11k/ce.c +++ b/drivers/net/wireless/ath/ath11k/ce.c @@ -131,13 +131,13 @@ static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe, if (unlikely(ath11k_hal_srng_src_num_free(ab, srng, false) < 1)) { ret = -ENOSPC; - goto err; + goto exit; } desc = ath11k_hal_srng_src_get_next_entry(ab, srng); if (!desc) { ret = -ENOSPC; - goto err; + goto exit; } ath11k_hal_ce_dst_set_desc(desc, paddr); @@ -146,15 +146,10 @@ static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe, write_index = CE_RING_IDX_INCR(nentries_mask, write_index); ring->write_index = write_index; - ath11k_hal_srng_access_end(ab, srng); - - spin_unlock_bh(&srng->lock); - pipe->rx_buf_needed--; - return 0; - -err: + ret = 0; +exit: ath11k_hal_srng_access_end(ab, srng); spin_unlock_bh(&srng->lock);
Unify the unlock/ring_access_end calls with error path in ath11k_ce_rx_buf_enqueue_pipe(). Update to ce_pipe->rx_buf_needed is done inside srng->lock before ath11k_hal_srng_access_end(). Also rename the goto label from err to exit. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org> --- drivers/net/wireless/ath/ath11k/ce.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)