浏览代码

qcacld-3.0: Fix -Wmissing-prototypes in HTT

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in core/dp/htt.

Change-Id: I189ca782bdcae7d8d3a6f54acd1baf15f3f300f6
CRs-Fixed: 1091016
Jeff Johnson 8 年之前
父节点
当前提交
0e60ce5615
共有 5 个文件被更改,包括 62 次插入55 次删除
  1. 1 1
      core/dp/htt/htt.c
  2. 8 8
      core/dp/htt/htt_fw_stats.c
  3. 42 36
      core/dp/htt/htt_rx.c
  4. 2 2
      core/dp/htt/htt_t2h.c
  5. 9 8
      core/dp/htt/htt_tx.c

+ 1 - 1
core/dp/htt/htt.c

@@ -53,7 +53,7 @@ QDF_STATUS(*htt_h2t_rx_ring_cfg_msg)(struct htt_pdev_t *pdev);
 QDF_STATUS(*htt_h2t_rx_ring_rfs_cfg_msg)(struct htt_pdev_t *pdev);
 
 #ifdef IPA_OFFLOAD
-A_STATUS htt_ipa_config(htt_pdev_handle pdev, A_STATUS status)
+static A_STATUS htt_ipa_config(htt_pdev_handle pdev, A_STATUS status)
 {
 	if ((A_OK == status) &&
 	    ol_cfg_ipa_uc_offload_enabled(pdev->ctrl_pdev))

+ 8 - 8
core/dp/htt/htt_fw_stats.c

@@ -765,8 +765,8 @@ static inline uint8_t htt_msg_read8(uint8_t *p8)
 #endif
 }
 
-void htt_make_u8_list_str(uint32_t *aligned_data,
-			  char *buffer, int space, int max_elems)
+static void htt_make_u8_list_str(uint32_t *aligned_data,
+				 char *buffer, int space, int max_elems)
 {
 	uint8_t *p8 = (uint8_t *) aligned_data;
 	char *buf_p = buffer;
@@ -794,8 +794,8 @@ void htt_make_u8_list_str(uint32_t *aligned_data,
 
 }
 
-void htt_make_u16_list_str(uint32_t *aligned_data,
-			   char *buffer, int space, int max_elems)
+static void htt_make_u16_list_str(uint32_t *aligned_data,
+				  char *buffer, int space, int max_elems)
 {
 	uint16_t *p16 = (uint16_t *) aligned_data;
 	char *buf_p = buffer;
@@ -822,7 +822,7 @@ void htt_make_u16_list_str(uint32_t *aligned_data,
 		*(buf_p - 1) = '\0';    /* erase the final comma */
 }
 
-void
+static void
 htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr,
 			  struct ol_fw_tx_dbg_ppdu_base *record,
 			  int length, int concise)
@@ -980,7 +980,7 @@ htt_t2h_tx_ppdu_log_print(struct ol_fw_tx_dbg_ppdu_msg_hdr *hdr,
 	}
 }
 
-void htt_t2h_stats_tidq_stats_print(
+static void htt_t2h_stats_tidq_stats_print(
 	struct wlan_dbg_tidq_stats *tidq_stats, int concise)
 {
 	qdf_print("TID QUEUE STATS:");
@@ -1045,7 +1045,7 @@ void htt_t2h_stats_tidq_stats_print(
 		tidq_stats->txq_st.tid_sw_qdepth[19]);
 }
 
-void htt_t2h_stats_tx_mu_stats_print(
+static void htt_t2h_stats_tx_mu_stats_print(
 	struct wlan_dbg_tx_mu_stats *tx_mu_stats, int concise)
 {
 	qdf_print("TX MU STATS:");
@@ -1089,7 +1089,7 @@ void htt_t2h_stats_tx_mu_stats_print(
 
 }
 
-void htt_t2h_stats_sifs_resp_stats_print(
+static void htt_t2h_stats_sifs_resp_stats_print(
 	struct wlan_dbg_sifs_resp_stats *sifs_stats, int concise)
 {
 	qdf_print("SIFS RESP STATS:");

+ 42 - 36
core/dp/htt/htt_rx.c

@@ -119,7 +119,7 @@
 /* De -initialization function of the rx buffer hash table. This function will
  *   free up the hash table which includes freeing all the pending rx buffers
  */
-void htt_rx_hash_deinit(struct htt_pdev_t *pdev)
+static void htt_rx_hash_deinit(struct htt_pdev_t *pdev)
 {
 
 	uint32_t i;
@@ -223,9 +223,8 @@ htt_rx_mpdu_desc_seq_num_hl(htt_pdev_handle pdev, void *mpdu_desc)
 		return (u_int16_t)(pdev->cur_seq_num_hl);
 	}
 }
-#endif
 
-void
+static void
 htt_rx_mpdu_desc_pn_hl(
 	htt_pdev_handle pdev,
 	void *mpdu_desc,
@@ -270,6 +269,7 @@ htt_rx_mpdu_desc_pn_hl(
 		qdf_assert(0);
 	}
 }
+#endif
 
 /**
  * htt_rx_mpdu_desc_tid_hl() - Returns the TID value from the Rx descriptor
@@ -406,7 +406,7 @@ static void htt_rx_ring_refill_retry(void *arg)
 }
 #endif
 
-void htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
+static void htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
 {
 	int idx;
 	QDF_STATUS status;
@@ -510,14 +510,14 @@ fail:
 	return;
 }
 
-unsigned htt_rx_ring_elems(struct htt_pdev_t *pdev)
+static inline unsigned htt_rx_ring_elems(struct htt_pdev_t *pdev)
 {
 	return
 		(*pdev->rx_ring.alloc_idx.vaddr -
 		 pdev->rx_ring.sw_rd_idx.msdu_payld) & pdev->rx_ring.size_mask;
 }
 
-unsigned int htt_rx_in_order_ring_elems(struct htt_pdev_t *pdev)
+static inline unsigned int htt_rx_in_order_ring_elems(struct htt_pdev_t *pdev)
 {
 	return
 		(*pdev->rx_ring.alloc_idx.vaddr -
@@ -609,7 +609,7 @@ void htt_rx_detach(struct htt_pdev_t *pdev)
  *
  * Return:        boolean -- true if retry is set, false otherwise
  */
-bool
+static bool
 htt_rx_mpdu_desc_retry_ll(htt_pdev_handle pdev, void *mpdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
@@ -621,7 +621,8 @@ htt_rx_mpdu_desc_retry_ll(htt_pdev_handle pdev, void *mpdu_desc)
 		RX_MPDU_START_0_RETRY_LSB);
 }
 
-uint16_t htt_rx_mpdu_desc_seq_num_ll(htt_pdev_handle pdev, void *mpdu_desc)
+static uint16_t htt_rx_mpdu_desc_seq_num_ll(htt_pdev_handle pdev,
+					    void *mpdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)mpdu_desc;
@@ -633,7 +634,7 @@ uint16_t htt_rx_mpdu_desc_seq_num_ll(htt_pdev_handle pdev, void *mpdu_desc)
 }
 
 /* FIX THIS: APPLIES TO LL ONLY */
-void
+static void
 htt_rx_mpdu_desc_pn_ll(htt_pdev_handle pdev,
 		       void *mpdu_desc, union htt_rx_pn_t *pn, int pn_len_bits)
 {
@@ -692,7 +693,7 @@ htt_rx_mpdu_desc_pn_ll(htt_pdev_handle pdev,
  *
  * Return:        Actual TID set in the packet header.
  */
-uint8_t
+static uint8_t
 htt_rx_mpdu_desc_tid_ll(htt_pdev_handle pdev, void *mpdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
@@ -719,7 +720,8 @@ char *htt_rx_mpdu_wifi_hdr_retrieve(htt_pdev_handle pdev, void *mpdu_desc)
 }
 
 /* FIX THIS: APPLIES TO LL ONLY */
-bool htt_rx_msdu_desc_completes_mpdu_ll(htt_pdev_handle pdev, void *msdu_desc)
+static bool htt_rx_msdu_desc_completes_mpdu_ll(htt_pdev_handle pdev,
+					       void *msdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)msdu_desc;
@@ -729,7 +731,8 @@ bool htt_rx_msdu_desc_completes_mpdu_ll(htt_pdev_handle pdev, void *msdu_desc)
 }
 
 /* FIX THIS: APPLIES TO LL ONLY */
-int htt_rx_msdu_has_wlan_mcast_flag_ll(htt_pdev_handle pdev, void *msdu_desc)
+static int htt_rx_msdu_has_wlan_mcast_flag_ll(htt_pdev_handle pdev,
+					      void *msdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)msdu_desc;
@@ -741,7 +744,7 @@ int htt_rx_msdu_has_wlan_mcast_flag_ll(htt_pdev_handle pdev, void *msdu_desc)
 }
 
 /* FIX THIS: APPLIES TO LL ONLY */
-bool htt_rx_msdu_is_wlan_mcast_ll(htt_pdev_handle pdev, void *msdu_desc)
+static bool htt_rx_msdu_is_wlan_mcast_ll(htt_pdev_handle pdev, void *msdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)msdu_desc;
@@ -752,7 +755,7 @@ bool htt_rx_msdu_is_wlan_mcast_ll(htt_pdev_handle pdev, void *msdu_desc)
 }
 
 /* FIX THIS: APPLIES TO LL ONLY */
-int htt_rx_msdu_is_frag_ll(htt_pdev_handle pdev, void *msdu_desc)
+static int htt_rx_msdu_is_frag_ll(htt_pdev_handle pdev, void *msdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)msdu_desc;
@@ -970,7 +973,7 @@ void htt_set_checksum_result_hl(qdf_nbuf_t msdu,
 #define MAX_DONE_BIT_CHECK_ITER 5
 #endif
 
-int
+static int
 htt_rx_amsdu_pop_ll(htt_pdev_handle pdev,
 		    qdf_nbuf_t rx_ind_msg,
 		    qdf_nbuf_t *head_msdu, qdf_nbuf_t *tail_msdu)
@@ -1334,7 +1337,7 @@ htt_rx_offload_msdu_pop_hl(htt_pdev_handle pdev,
 }
 #endif
 
-int
+static int
 htt_rx_offload_msdu_pop_ll(htt_pdev_handle pdev,
 			   qdf_nbuf_t offload_deliver_msg,
 			   int *vdev_id,
@@ -1450,6 +1453,7 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev,
  *
  * Return: 1 on success and 0 on failure.
  */
+static
 int htt_mon_rx_handle_amsdu_packet(qdf_nbuf_t msdu, htt_pdev_handle pdev,
 				   uint32_t **msg_word, uint32_t amsdu_len)
 {
@@ -1715,9 +1719,9 @@ static uint8_t htt_mon_rx_get_rtap_flags(struct htt_host_rx_desc_base *rx_desc)
  *
  * Return: None
  */
-void htt_rx_mon_get_rx_status(htt_pdev_handle pdev,
-			      struct htt_host_rx_desc_base *rx_desc,
-			      struct mon_rx_status *rx_status)
+static void htt_rx_mon_get_rx_status(htt_pdev_handle pdev,
+				     struct htt_host_rx_desc_base *rx_desc,
+				     struct mon_rx_status *rx_status)
 {
 	uint16_t channel_flags = 0;
 	struct mon_channel *ch_info = &pdev->mon_ch_info;
@@ -1756,10 +1760,10 @@ void htt_rx_mon_get_rx_status(htt_pdev_handle pdev,
  *
  * Return: 1 for success, 0 on failure.
  */
-int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
-					qdf_nbuf_t rx_ind_msg,
-					qdf_nbuf_t *head_msdu,
-					qdf_nbuf_t *tail_msdu)
+static int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
+					       qdf_nbuf_t rx_ind_msg,
+					       qdf_nbuf_t *head_msdu,
+					       qdf_nbuf_t *tail_msdu)
 {
 	qdf_nbuf_t msdu, next;
 	uint8_t *rx_ind_data;
@@ -1907,7 +1911,7 @@ uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg)
 }
 
 /* Return values: 1 - success, 0 - failure */
-int
+static int
 htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 				qdf_nbuf_t rx_ind_msg,
 				qdf_nbuf_t *head_msdu, qdf_nbuf_t *tail_msdu)
@@ -2098,7 +2102,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
 /* Util fake function that has same prototype as qdf_nbuf_clone that just
  * retures the same nbuf
  */
-qdf_nbuf_t htt_rx_qdf_noclone_buf(qdf_nbuf_t buf)
+static qdf_nbuf_t htt_rx_qdf_noclone_buf(qdf_nbuf_t buf)
 {
 	return buf;
 }
@@ -2523,6 +2527,7 @@ bool (*htt_rx_mpdu_is_encrypted)(htt_pdev_handle pdev, void *mpdu_desc);
 bool (*htt_rx_msdu_desc_key_id)(htt_pdev_handle pdev,
 				void *mpdu_desc, uint8_t *key_id);
 
+static
 void *htt_rx_mpdu_desc_list_next_ll(htt_pdev_handle pdev, qdf_nbuf_t rx_ind_msg)
 {
 	int idx = pdev->rx_ring.sw_rd_idx.msdu_desc;
@@ -2544,8 +2549,8 @@ bool (*htt_rx_msdu_center_freq)(
 	uint16_t *contig_chan2_center_freq_mhz,
 	uint8_t *phy_mode);
 
-void *htt_rx_in_ord_mpdu_desc_list_next_ll(htt_pdev_handle pdev,
-					   qdf_nbuf_t netbuf)
+static void *htt_rx_in_ord_mpdu_desc_list_next_ll(htt_pdev_handle pdev,
+						  qdf_nbuf_t netbuf)
 {
 	return (void *)htt_rx_desc(netbuf);
 }
@@ -2696,12 +2701,12 @@ htt_rx_msdu_desc_key_id_hl(htt_pdev_handle htt_pdev,
 
 #endif
 
-void *htt_rx_msdu_desc_retrieve_ll(htt_pdev_handle pdev, qdf_nbuf_t msdu)
+static void *htt_rx_msdu_desc_retrieve_ll(htt_pdev_handle pdev, qdf_nbuf_t msdu)
 {
 	return htt_rx_desc(msdu);
 }
 
-bool htt_rx_mpdu_is_encrypted_ll(htt_pdev_handle pdev, void *mpdu_desc)
+static bool htt_rx_mpdu_is_encrypted_ll(htt_pdev_handle pdev, void *mpdu_desc)
 {
 	struct htt_host_rx_desc_base *rx_desc =
 		(struct htt_host_rx_desc_base *)mpdu_desc;
@@ -2711,12 +2716,13 @@ bool htt_rx_mpdu_is_encrypted_ll(htt_pdev_handle pdev, void *mpdu_desc)
 		RX_MPDU_START_0_ENCRYPTED_LSB) ? true : false;
 }
 
+static
 bool htt_rx_msdu_chan_info_present_ll(htt_pdev_handle pdev, void *mpdu_desc)
 {
 	return false;
 }
 
-bool htt_rx_msdu_center_freq_ll(htt_pdev_handle pdev,
+static bool htt_rx_msdu_center_freq_ll(htt_pdev_handle pdev,
 	struct ol_txrx_peer_t *peer,
 	void *mpdu_desc,
 	uint16_t *primary_chan_center_freq_mhz,
@@ -2735,7 +2741,7 @@ bool htt_rx_msdu_center_freq_ll(htt_pdev_handle pdev,
 	return false;
 }
 
-bool
+static bool
 htt_rx_msdu_desc_key_id_ll(htt_pdev_handle pdev, void *mpdu_desc,
 			   uint8_t *key_id)
 {
@@ -2993,7 +2999,7 @@ qdf_nbuf_t htt_rx_hash_list_lookup(struct htt_pdev_t *pdev, uint32_t paddr)
 /* Initialization function of the rx buffer hash table. This function will
    allocate a hash table of a certain pre-determined size and initialize all
    the elements */
-int htt_rx_hash_init(struct htt_pdev_t *pdev)
+static int htt_rx_hash_init(struct htt_pdev_t *pdev)
 {
 	int i, j;
 	int rc = 0;
@@ -3274,7 +3280,7 @@ fail1:
  *
  * Return: 0 success
  */
-int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev,
+static int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev,
 			 unsigned int rx_ind_ring_elements)
 {
 	/* Allocate RX2 indication ring */
@@ -3320,7 +3326,7 @@ int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev,
 	return 0;
 }
 #else
-int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev,
+static int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev,
 			 unsigned int rx_ind_ring_elements)
 {
 	return 0;
@@ -3391,7 +3397,7 @@ int htt_rx_ipa_uc_attach(struct htt_pdev_t *pdev,
  *
  * Return: None
  */
-void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
+static void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
 {
 	if (pdev->ipa_uc_rx_rsc.rx2_ind_ring_base.vaddr) {
 		qdf_mem_free_consistent(
@@ -3417,7 +3423,7 @@ void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
 	}
 }
 #else
-void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
+static void htt_rx_ipa_uc_free_wdi2_rsc(struct htt_pdev_t *pdev)
 {
 	return;
 }

+ 2 - 2
core/dp/htt/htt_t2h.c

@@ -153,8 +153,8 @@ static uint8_t *htt_t2h_mac_addr_deswizzle(uint8_t *tgt_mac_addr,
 }
 
 /* Target to host Msg/event  handler  for low priority messages*/
-void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
-			    bool free_msg_buf)
+static void htt_t2h_lp_msg_handler(void *context, qdf_nbuf_t htt_t2h_msg,
+				   bool free_msg_buf)
 {
 	struct htt_pdev_t *pdev = (struct htt_pdev_t *)context;
 	uint32_t *msg_word;

+ 9 - 8
core/dp/htt/htt_tx.c

@@ -1058,10 +1058,11 @@ void htt_tx_desc_display(void *tx_desc)
  *
  * Return: 0 success
  */
-int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
-			 unsigned int uc_tx_buf_sz,
-			 unsigned int uc_tx_buf_cnt,
-			 unsigned int uc_tx_partition_base)
+
+static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
+					  unsigned int uc_tx_buf_sz,
+					  unsigned int uc_tx_buf_cnt,
+					  unsigned int uc_tx_partition_base)
 {
 	unsigned int tx_buffer_count;
 	void *buffer_vaddr;
@@ -1126,10 +1127,10 @@ int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
 	return tx_buffer_count;
 }
 #else
-int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
-			 unsigned int uc_tx_buf_sz,
-			 unsigned int uc_tx_buf_cnt,
-			 unsigned int uc_tx_partition_base)
+static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev,
+					  unsigned int uc_tx_buf_sz,
+					  unsigned int uc_tx_buf_cnt,
+					  unsigned int uc_tx_partition_base)
 {
 	unsigned int tx_buffer_count;
 	qdf_nbuf_t buffer_vaddr;