Преглед изворни кода

qcacld-3.0: Replace typedef hdd_roc_req_t

The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_roc_req_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: I0d59d9f18248c94b2a27f3de4bd5dd4c0c7c840b
CRs-Fixed: 2119534
Jeff Johnson пре 7 година
родитељ
комит
52b5060b90
3 измењених фајлова са 7 додато и 7 уклоњено
  1. 2 2
      core/hdd/inc/wlan_hdd_main.h
  2. 1 1
      core/hdd/src/wlan_hdd_main.c
  3. 4 4
      core/hdd/src/wlan_hdd_p2p.c

+ 2 - 2
core/hdd/inc/wlan_hdd_main.h

@@ -587,11 +587,11 @@ struct hdd_remain_on_chan_ctx {
 };
 
 /* RoC Request entry */
-typedef struct hdd_roc_req {
+struct hdd_roc_req {
 	qdf_list_node_t node;   /* MUST be first element */
 	struct hdd_adapter *pAdapter;
 	struct hdd_remain_on_chan_ctx *pRemainChanCtx;
-} hdd_roc_req_t;
+};
 
 /**
  * struct hdd_scan_req - Scan Request entry

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -5793,7 +5793,7 @@ static int hdd_roc_context_init(struct hdd_context *hdd_ctx)
  */
 static void hdd_destroy_roc_req_q(struct hdd_context *hdd_ctx)
 {
-	hdd_roc_req_t *hdd_roc_req;
+	struct hdd_roc_req *hdd_roc_req;
 	QDF_STATUS status;
 
 	qdf_spin_lock(&hdd_ctx->hdd_roc_req_q_lock);

+ 4 - 4
core/hdd/src/wlan_hdd_p2p.c

@@ -757,7 +757,7 @@ static int wlan_hdd_roc_request_enqueue(struct hdd_adapter *adapter,
 			struct hdd_remain_on_chan_ctx *remain_chan_ctx)
 {
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	hdd_roc_req_t *hdd_roc_req;
+	struct hdd_roc_req *hdd_roc_req;
 	QDF_STATUS status;
 
 	/*
@@ -832,7 +832,7 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work)
 {
 	QDF_STATUS status;
 	int ret = 0;
-	hdd_roc_req_t *hdd_roc_req;
+	struct hdd_roc_req *hdd_roc_req;
 	struct hdd_context *hdd_ctx =
 			container_of(work, struct hdd_context, roc_req_work.work);
 
@@ -1210,7 +1210,7 @@ __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
 	int qdf_status;
 	unsigned long rc;
 	qdf_list_node_t *tmp, *q;
-	hdd_roc_req_t *curr_roc_req;
+	struct hdd_roc_req *curr_roc_req;
 	uint32_t roc_scan_id;
 	ENTER();
 
@@ -1229,7 +1229,7 @@ __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
 		return status;
 	qdf_spin_lock(&hdd_ctx->hdd_roc_req_q_lock);
 	list_for_each_safe(tmp, q, &hdd_ctx->hdd_roc_req_q.anchor) {
-		curr_roc_req = list_entry(tmp, hdd_roc_req_t, node);
+		curr_roc_req = list_entry(tmp, struct hdd_roc_req, node);
 		if ((uintptr_t) curr_roc_req->pRemainChanCtx == cookie) {
 			qdf_status = qdf_list_remove_node(&hdd_ctx->hdd_roc_req_q,
 						      (qdf_list_node_t *)