Skip to contentSkip to conversation

ath10k: cosmetic cleanup to sdio files

PATCH In review Kalle Valo 1 participant 4 messages Oct 24, 2019 – Nov 25, 2019 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

PATCH 1/2 ath10k: cosmetic cleanup to sdio files

Do some cosmetic cleanup while reviewing the files. No functional changes.

---
 drivers/net/wireless/ath/ath10k/sdio.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath10k/sdio.c +9 -12
index c34637881219..ef16b45c18da 100644
@@ -541,10 +541,8 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
 	int pkt_cnt = 0;
 
 	if (n_lookaheads > ATH10K_SDIO_MAX_RX_MSGS) {
-		ath10k_warn(ar,
-			    "the total number of pkgs to be fetched (%u) exceeds maximum %u\n",
-			    n_lookaheads,
-			    ATH10K_SDIO_MAX_RX_MSGS);
+		ath10k_warn(ar, "the total number of pkgs to be fetched (%u) exceeds maximum %u\n",
+			    n_lookaheads, ATH10K_SDIO_MAX_RX_MSGS);
 		ret = -ENOMEM;
 		goto err;
 	}
@@ -553,10 +551,8 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
 		htc_hdr = (struct ath10k_htc_hdr *)&lookaheads[i];
 		last_in_bundle = false;
 
-		if (le16_to_cpu(htc_hdr->len) >
-		    ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH) {
-			ath10k_warn(ar,
-				    "payload length %d exceeds max htc length: %zu\n",
+		if (le16_to_cpu(htc_hdr->len) > ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH) {
+			ath10k_warn(ar, "payload length %d exceeds max htc length: %zu\n",
 				    le16_to_cpu(htc_hdr->len),
 				    ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH);
 			ret = -ENOMEM;
@@ -567,8 +563,7 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
 		full_len = ath10k_sdio_calc_txrx_padded_len(ar_sdio, act_len);
 
 		if (full_len > ATH10K_SDIO_MAX_BUFFER_SIZE) {
-			ath10k_warn(ar,
-				    "rx buffer requested with invalid htc_hdr length (%d, 0x%x): %d\n",
+			ath10k_warn(ar, "rx buffer requested with invalid htc_hdr length (%d, 0x%x): %d\n",
 				    htc_hdr->eid, htc_hdr->flags,
 				    le16_to_cpu(htc_hdr->len));
 			ret = -EINVAL;
@@ -590,12 +585,14 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
 							    &bndl_cnt);
 
 			if (ret) {
-				ath10k_warn(ar, "alloc_bundle error %d\n", ret);
+				ath10k_warn(ar, "failed to allocate a bundle: %d\n",
+					    ret);
 				goto err;
 			}
 
 			pkt_cnt += bndl_cnt;
-			/*Next buffer will be the last in the bundle */
+
+			/* next buffer will be the last in the bundle */
 			last_in_bundle = true;
 		}
 
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/2 ath10k: sdio: remove struct ath10k_sdio_rx_data::status

It seems to be unused.

---
 drivers/net/wireless/ath/ath10k/sdio.c | 2 --
 drivers/net/wireless/ath/ath10k/sdio.h | 1 -
 2 files changed, 3 deletions(-)
drivers/net/wireless/ath/ath10k/sdio.c +0 -2
index ef16b45c18da..ceeee465a73a 100644
@@ -649,7 +649,6 @@ static int ath10k_sdio_mbox_rx_fetch(struct ath10k *ar)
 
 	htc_hdr = (struct ath10k_htc_hdr *)skb->data;
 	pkt->act_len = le16_to_cpu(htc_hdr->len) + sizeof(*htc_hdr);
-	pkt->status = ret;
 	skb_put(skb, pkt->act_len);
 
 	return ret;
@@ -687,7 +686,6 @@ static int ath10k_sdio_mbox_rx_fetch_bundle(struct ath10k *ar)
 		pkt->act_len = le16_to_cpu(htc_hdr->len) + sizeof(*htc_hdr);
 
 		skb_put_data(pkt->skb, htc_hdr, pkt->act_len);
-		pkt->status = 0;
 		pkt_offset += pkt->alloc_len;
 	}
 
drivers/net/wireless/ath/ath10k/sdio.h +0 -1
index 9acaf0229cf2..33195f49acab 100644
@@ -126,7 +126,6 @@ struct ath10k_sdio_rx_data {
 	bool part_of_bundle;
 	bool last_in_bundle;
 	bool trailer_only;
-	int status;
 };
 
 struct ath10k_sdio_irq_proc_regs {
Signature · 7 lines
2.7.4


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
author
#2 lore raw
In reply to Kalle Valo
Quoted 3 lines · Kalle Valo

Do some cosmetic cleanup while reviewing the files. No functional changes.

2 patches applied to ath-next branch of ath.git, thanks.

efd2f4c5016b ath10k: sdio: cosmetic cleanup
2246c2156590 ath10k: sdio: remove struct ath10k_sdio_rx_data::status

Signature · 3 lines
https://patchwork.kernel.org/patch/11208761/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author
#3 lore raw
In reply to Kalle Valo
Quoted 3 lines · Kalle Valo

Do some cosmetic cleanup while reviewing the files. No functional changes.

2 patches applied to ath-next branch of ath.git, thanks.

efd2f4c5016b ath10k: sdio: cosmetic cleanup
2246c2156590 ath10k: sdio: remove struct ath10k_sdio_rx_data::status

Signature · 9 lines
https://patchwork.kernel.org/patch/11208761/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k