diff mbox series

[01/15] ath11k: rename per_transfer_context to skb

Message ID 156534276745.30736.11736417077894270794.stgit@x230 (mailing list archive)
State Accepted
Commit 3e4f065bbf2b4f298f63db161ee1bc467b958103
Delegated to: Kalle Valo
Headers show
Series [01/15] ath11k: rename per_transfer_context to skb | expand

Commit Message

Kalle Valo Aug. 9, 2019, 9:26 a.m. UTC
Rename the field to skb to make it more clear what it contains. While at it,
change also two function parameters to use skb instead context.

No functional changes. Only compile tested.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/ce.c |   24 +++++++++++-------------
 drivers/net/wireless/ath/ath11k/ce.h |    2 +-
 2 files changed, 12 insertions(+), 14 deletions(-)

Comments

Kalle Valo Aug. 12, 2019, 3:02 p.m. UTC | #1
Kalle Valo <kvalo@codeaurora.org> wrote:

> Rename the field to skb to make it more clear what it contains. While at it,
> change also two function parameters to use skb instead context.
> 
> No functional changes. Only compile tested.
> 
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

15 patches applied to ath11k-bringup branch of ath.git, thanks.

3e4f065bbf2b ath11k: rename per_transfer_context to skb
78eb3c7fce34 ath11k: remove unused struct ath11k_ce_sg_item
75a016fcc8f7 ath11k: cleanup and rename ath11k_send_crash_inject_cmd()
c3df984c6cc3 ath11k: remove unused IEEE80211_VHTCAP defines
9abae4e48e1e ath11k: move ath11k_mac_destroy() after _create()
44781976e2e6 ath11k: random whitespace fixes
bf1a82d6d7aa ath11k: make static const in debugfs functions
dbb836bbbf6f ath11k: remove box comments
6b5972013e22 ath11k: move fops_pktlog_filter to correct place
2a5adaf9109a ath11k: avoid excessive casting in debug_htt_stats.c
ae021cdb8522 ath11k: debug_htt_stats: pass stats_req as a properly typed pointer
9566b90559c6 ath11k: debug_htt_stats: remove unnecessary cast
8cfd6f1e670b ath11k: debug_htt_stats: move tag_buf assignment to the first
31689a989dc5 ath11k: debug_htt_stats: fix line over 90 char warnings
2e1a3ed0437e ath11k: debug_htt_stats: move fops structs close to the functions
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c
index 4ac65a16d72f..c1b170cf45ba 100644
--- a/drivers/net/wireless/ath/ath11k/ce.c
+++ b/drivers/net/wireless/ath/ath11k/ce.c
@@ -142,7 +142,7 @@  static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe,
 
 	ath11k_hal_ce_dst_set_desc(desc, paddr);
 
-	ring->per_transfer_context[write_index] = skb;
+	ring->skb[write_index] = skb;
 	write_index = CE_RING_IDX_INCR(nentries_mask, write_index);
 	ring->write_index = write_index;
 
@@ -212,7 +212,7 @@  static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe)
 }
 
 static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe,
-					 struct sk_buff **context, int *nbytes)
+					 struct sk_buff **skb, int *nbytes)
 {
 	struct ath11k_base *ab = pipe->ab;
 	struct hal_srng *srng;
@@ -244,8 +244,8 @@  static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe,
 		goto err;
 	}
 
-	*context = pipe->dest_ring->per_transfer_context[sw_index];
-	pipe->dest_ring->per_transfer_context[sw_index] = NULL;
+	*skb = pipe->dest_ring->skb[sw_index];
+	pipe->dest_ring->skb[sw_index] = NULL;
 
 	sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index);
 	pipe->dest_ring->sw_index = sw_index;
@@ -302,7 +302,7 @@  static void ath11k_ce_recv_process_cb(struct ath11k_ce_pipe *pipe)
 }
 
 static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe,
-					 struct sk_buff **transfer_contextp)
+					 struct sk_buff **skb)
 {
 	struct ath11k_base *ab = pipe->ab;
 	struct hal_srng *srng;
@@ -328,9 +328,9 @@  static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe,
 		goto err_unlock;
 	}
 
-	*transfer_contextp = pipe->src_ring->per_transfer_context[sw_index];
+	*skb = pipe->src_ring->skb[sw_index];
 
-	pipe->src_ring->per_transfer_context[sw_index] = NULL;
+	pipe->src_ring->skb[sw_index] = NULL;
 
 	sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index);
 	pipe->src_ring->sw_index = sw_index;
@@ -412,9 +412,7 @@  ath11k_ce_alloc_ring(struct ath11k_base *ab, int nentries, int desc_sz)
 	struct ath11k_ce_ring *ce_ring;
 	dma_addr_t base_addr;
 
-	ce_ring = kzalloc(sizeof(*ce_ring) +
-			  (nentries *
-			   sizeof(*ce_ring->per_transfer_context)),
+	ce_ring = kzalloc(sizeof(*ce_ring) + (nentries * sizeof(*ce_ring->skb)),
 			  GFP_KERNEL);
 	if (ce_ring == NULL)
 		return ERR_PTR(-ENOMEM);
@@ -568,7 +566,7 @@  int ath11k_ce_send(struct ath11k_base *ab, struct sk_buff *skb, u8 pipe_id,
 	ath11k_hal_ce_src_set_desc(desc, ATH11K_SKB_CB(skb)->paddr,
 				   skb->len, transfer_id, byte_swap_data);
 
-	pipe->src_ring->per_transfer_context[write_index] = skb;
+	pipe->src_ring->skb[write_index] = skb;
 	pipe->src_ring->write_index = CE_RING_IDX_INCR(nentries_mask,
 						       write_index);
 
@@ -599,11 +597,11 @@  static void ath11k_ce_rx_pipe_cleanup(struct ath11k_ce_pipe *pipe)
 		return;
 
 	for (i = 0; i < ring->nentries; i++) {
-		skb = ring->per_transfer_context[i];
+		skb = ring->skb[i];
 		if (!skb)
 			continue;
 
-		ring->per_transfer_context[i] = NULL;
+		ring->skb[i] = NULL;
 		dma_unmap_single(ab->dev, ATH11K_SKB_RXCB(skb)->paddr,
 				 skb->len + skb_tailroom(skb), DMA_FROM_DEVICE);
 		dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h
index 5cc3fea55e0f..40926d06463e 100644
--- a/drivers/net/wireless/ath/ath11k/ce.h
+++ b/drivers/net/wireless/ath/ath11k/ce.h
@@ -139,7 +139,7 @@  struct ath11k_ce_ring {
 	u32 hal_ring_id;
 
 	/* keep last */
-	struct sk_buff *per_transfer_context[0];
+	struct sk_buff *skb[0];
 };
 
 struct ath11k_ce_pipe {