Browse Source

qcacld-3.0: Replace fallthrough comment with attribute

-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.
modify the DMA direction parameter from
PCI_DMA_FROMDEVICE to DMA_FROM_DEVICE.
Added missing break statement.

Change-Id: I1a226b1c2ce92c7290a094b33a81968d27ff74b3
CRs-Fixed: 3505237
Azmath Mohammed 1 năm trước cách đây
mục cha
commit
e9ecff38ae
2 tập tin đã thay đổi với 18 bổ sung15 xóa
  1. 11 9
      core/dp/htt/htt_t2h.c
  2. 7 6
      core/dp/txrx/ol_rx_defrag.c

+ 11 - 9
core/dp/htt/htt_t2h.c

@@ -18,9 +18,10 @@
  */
 
 /**
- * @file htt_t2h.c
- * @brief Provide functions to process target->host HTT messages.
- * @details
+ *  DOC: htt_t2h.c
+ *
+ *  brief Provide functions to process target->host HTT messages.
+ *  details
  *  This file contains functions related to target->host HTT messages.
  *  There are two categories of functions:
  *  1.  A function that receives a HTT message from HTC, and dispatches it
@@ -685,10 +686,10 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
 				(*(msg_word + 1));
 
 			peer = ol_txrx_peer_find_by_id(pdev->txrx_pdev,
-				 peer_id);
+						       peer_id);
 			if (!peer) {
 				qdf_print("invalid peer id %d", peer_id);
-				qdf_assert(0);
+					  qdf_assert(0);
 				break;
 			}
 			vdev = peer->vdev;
@@ -705,10 +706,11 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
 		default:
 		{
 			qdf_print("unhandled error type %d",
-			    HTT_RX_OFLD_PKT_ERR_MSG_SUB_TYPE_GET(*msg_word));
-		break;
+			  HTT_RX_OFLD_PKT_ERR_MSG_SUB_TYPE_GET(*msg_word));
+			break;
 		}
 		}
+		break;
 	}
 #ifdef WLAN_CFR_ENABLE
 	case HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND:
@@ -738,7 +740,7 @@ static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
 #define HTT_TX_COMPL_HEAD_SZ			4
 #define HTT_TX_COMPL_BYTES_PER_MSDU_ID		2
 
-/**
+/*
  * Generic Target to host Msg/event  handler  for low priority messages
  * Low priority message are handler in a different handler called from
  * this function . So that the most likely success path like Rx and
@@ -1093,7 +1095,7 @@ void htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
 					(QDF_NBUF_CB_PADDR(_buf)),	\
 					(skb_end_pointer(_buf) -	\
 					(_buf)->data),			\
-					PCI_DMA_FROMDEVICE);		\
+					DMA_FROM_DEVICE);		\
 	} while (0)
 
 /**

+ 7 - 6
core/dp/txrx/ol_rx_defrag.c

@@ -673,9 +673,9 @@ void ol_rx_defrag_waitlist_flush(struct ol_txrx_pdev_t *pdev)
 
 /**
  * ol_rx_frag_gcmp_decap() - Remove GCMP header from fragment
- * @pdev - data path pdev handle
- * @nbuf - network buffer
- * @hdrlen - MAC header len
+ * @pdev : data path pdev handle
+ * @nbuf : network buffer
+ * @hdrlen : MAC header len
  *
  * Return: OL_RX_DEFRAG_OK on success else failure code
  */
@@ -713,9 +713,9 @@ ol_rx_frag_gcmp_decap(ol_txrx_pdev_handle pdev,
 
 /**
  * ol_rx_frag_gcmp_demic() - Remove MIC info from GCMP fragment
- * @pdev - data path pdev handle
- * @nbuf - network buffer
- * @hdrlen - MAC header len
+ * @pdev : data path pdev handle
+ * @nbuf : network buffer
+ * @hdrlen : MAC header len
  *
  * Return: OL_RX_DEFRAG_OK on success else failure code
  */
@@ -814,6 +814,7 @@ ol_rx_defrag(ol_txrx_pdev_handle pdev,
 	switch (peer->security[index].sec_type) {
 	case htt_sec_type_tkip:
 		tkip_demic = 1;
+		fallthrough;
 	/* fall-through to rest of tkip ops */
 	case htt_sec_type_tkip_nomic:
 		while (cur) {