[PATCH 03/11] wcn36xx: Rename wcn36xx_error

Eugene Krasnikov k.eugene.e at gmail.com
Thu Aug 22 04:45:56 EDT 2013


Shorten wcn36xx_error to wcn36xx_err.

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 dxe.c     | 10 +++++-----
 main.c    | 36 ++++++++++++++++++------------------
 smd.c     |  8 ++++----
 txrx.c    |  2 +-
 wcn36xx.h |  2 +-
 5 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/dxe.c b/dxe.c
index 140d70b..db1f413 100644
--- a/dxe.c
+++ b/dxe.c
@@ -147,7 +147,7 @@ int wcn36xx_dxe_alloc_ctl_blks(struct wcn36xx *wcn)
 	return 0;
 
 out_err:
-	wcn36xx_error("Failed to allocate DXE control blocks\n");
+	wcn36xx_err("Failed to allocate DXE control blocks\n");
 	wcn36xx_dxe_free_ctl_blks(wcn);
 	return -ENOMEM;
 }
@@ -430,14 +430,14 @@ static int wcn36xx_dxe_request_irqs(struct wcn36xx *wcn)
 	ret = request_irq(wcn->tx_irq, wcn36xx_irq_tx_complete,
 			  IRQF_TRIGGER_HIGH, "wcn36xx_tx", wcn);
 	if (ret) {
-		wcn36xx_error("failed to alloc tx irq\n");
+		wcn36xx_err("failed to alloc tx irq\n");
 		goto out_err;
 	}
 
 	ret = request_irq(wcn->rx_irq, wcn36xx_irq_rx_ready, IRQF_TRIGGER_HIGH,
 			  "wcn36xx_rx", wcn);
 	if (ret) {
-		wcn36xx_error("failed to alloc rx irq\n");
+		wcn36xx_err("failed to alloc rx irq\n");
 		goto out_txirq;
 	}
 
@@ -556,7 +556,7 @@ int wcn36xx_dxe_allocate_mem_pools(struct wcn36xx *wcn)
 
 out_err:
 	wcn36xx_dxe_free_mem_pools(wcn);
-	wcn36xx_error("Failed to allocate BD mempool\n");
+	wcn36xx_err("Failed to allocate BD mempool\n");
 	return -ENOMEM;
 }
 
@@ -627,7 +627,7 @@ int wcn36xx_dxe_tx_frame(struct wcn36xx *wcn,
 	ctl->skb = skb;
 	desc = ctl->desc;
 	if (ctl->bd_cpu_addr) {
-		wcn36xx_error("bd_cpu_addr cannot be NULL for skb DXE\n");
+		wcn36xx_err("bd_cpu_addr cannot be NULL for skb DXE\n");
 		return -EINVAL;
 	}
 
diff --git a/main.c b/main.c
index 35e3b01..8601e02 100644
--- a/main.c
+++ b/main.c
@@ -200,47 +200,47 @@ static int wcn36xx_start(struct ieee80211_hw *hw)
 	/* SMD initialization */
 	ret = wcn36xx_smd_open(wcn);
 	if (ret) {
-		wcn36xx_error("Failed to open smd channel: %d\n", ret);
+		wcn36xx_err("Failed to open smd channel: %d\n", ret);
 		goto out_err;
 	}
 
 	/* Allocate memory pools for Mgmt BD headers and Data BD headers */
 	ret = wcn36xx_dxe_allocate_mem_pools(wcn);
 	if (ret) {
-		wcn36xx_error("Failed to alloc DXE mempool: %d\n", ret);
+		wcn36xx_err("Failed to alloc DXE mempool: %d\n", ret);
 		goto out_smd_close;
 	}
 
 	ret = wcn36xx_dxe_alloc_ctl_blks(wcn);
 	if (ret) {
-		wcn36xx_error("Failed to alloc DXE ctl blocks: %d\n", ret);
+		wcn36xx_err("Failed to alloc DXE ctl blocks: %d\n", ret);
 		goto out_free_dxe_pool;
 	}
 
 	/* Maximum SMD message size is 4k */
 	wcn->smd_buf = kmalloc(WCN36XX_SMD_BUF_SIZE, GFP_KERNEL);
 	if (!wcn->smd_buf) {
-		wcn36xx_error("Failed to allocate smd buf\n");
+		wcn36xx_err("Failed to allocate smd buf\n");
 		ret = -ENOMEM;
 		goto out_free_dxe_ctl;
 	}
 
 	ret = wcn36xx_smd_load_nv(wcn);
 	if (ret) {
-		wcn36xx_error("Failed to push NV to chip\n");
+		wcn36xx_err("Failed to push NV to chip\n");
 		goto out_free_smd_buf;
 	}
 
 	ret = wcn36xx_smd_start(wcn);
 	if (ret) {
-		wcn36xx_error("Failed to start chip\n");
+		wcn36xx_err("Failed to start chip\n");
 		goto out_free_smd_buf;
 	}
 
 	/* DMA channel initialization */
 	ret = wcn36xx_dxe_init(wcn);
 	if (ret) {
-		wcn36xx_error("DXE init failed\n");
+		wcn36xx_err("DXE init failed\n");
 		goto out_smd_stop;
 	}
 
@@ -353,7 +353,7 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		wcn->encrypt_type = WCN36XX_HAL_ED_TKIP;
 		break;
 	default:
-		wcn36xx_error("Unsupported key type 0x%x\n",
+		wcn36xx_err("Unsupported key type 0x%x\n",
 			      key_conf->cipher);
 		ret = -EOPNOTSUPP;
 		goto out;
@@ -416,7 +416,7 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		}
 		break;
 	default:
-		wcn36xx_error("Unsupported key cmd 0x%x\n", cmd);
+		wcn36xx_err("Unsupported key cmd 0x%x\n", cmd);
 		ret = -EOPNOTSUPP;
 		goto out;
 		break;
@@ -548,7 +548,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
 			rcu_read_lock();
 			sta = ieee80211_find_sta(vif, bss_conf->bssid);
 			if (!sta) {
-				wcn36xx_error("sta %pM is not found\n",
+				wcn36xx_err("sta %pM is not found\n",
 					      bss_conf->bssid);
 				rcu_read_unlock();
 				goto out;
@@ -583,7 +583,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
 		wcn36xx_dbg(WCN36XX_DBG_MAC, "mac bss changed ap probe resp\n");
 		skb = ieee80211_proberesp_get(hw, vif);
 		if (!skb) {
-			wcn36xx_error("failed to alloc probereq skb\n");
+			wcn36xx_err("failed to alloc probereq skb\n");
 			goto out;
 		}
 
@@ -603,7 +603,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
 			skb = ieee80211_beacon_get_tim(hw, vif, &tim_off,
 						       &tim_len);
 			if (!skb) {
-				wcn36xx_error("failed to alloc beacon skb\n");
+				wcn36xx_err("failed to alloc beacon skb\n");
 				goto out;
 			}
 			wcn36xx_smd_send_beacon(wcn, skb, tim_off, 0);
@@ -797,7 +797,7 @@ static int wcn36xx_ampdu_action(struct ieee80211_hw *hw,
 	case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
 		break;
 	default:
-		wcn36xx_error("Unknown AMPDU action\n");
+		wcn36xx_err("Unknown AMPDU action\n");
 	}
 
 	return 0;
@@ -886,7 +886,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
 	res = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
 					   "wcnss_wlantx_irq");
 	if (!res) {
-		wcn36xx_error("failed to get tx_irq\n");
+		wcn36xx_err("failed to get tx_irq\n");
 		return -ENOENT;
 	}
 	wcn->tx_irq = res->start;
@@ -895,7 +895,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
 	res = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
 					   "wcnss_wlanrx_irq");
 	if (!res) {
-		wcn36xx_error("failed to get rx_irq\n");
+		wcn36xx_err("failed to get rx_irq\n");
 		return -ENOENT;
 	}
 	wcn->rx_irq = res->start;
@@ -904,12 +904,12 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
 						 "wcnss_mmio");
 	if (!res) {
-		wcn36xx_error("failed to get mmio\n");
+		wcn36xx_err("failed to get mmio\n");
 		return -ENOENT;
 	}
 	wcn->mmio = ioremap(res->start, resource_size(res));
 	if (!wcn->mmio) {
-		wcn36xx_error("failed to map io memory\n");
+		wcn36xx_err("failed to map io memory\n");
 		return -ENOMEM;
 	}
 	return 0;
@@ -940,7 +940,7 @@ static int wcn36xx_probe(struct platform_device *pdev)
 
 	hw = ieee80211_alloc_hw(sizeof(struct wcn36xx), &wcn36xx_ops);
 	if (!hw) {
-		wcn36xx_error("failed to alloc hw\n");
+		wcn36xx_err("failed to alloc hw\n");
 		ret = -ENOMEM;
 		goto out_err;
 	}
diff --git a/smd.c b/smd.c
index 8947d7e..882bd25 100644
--- a/smd.c
+++ b/smd.c
@@ -27,7 +27,7 @@ static int put_cfg_tlv_u32(struct wcn36xx *wcn, size_t *len, u32 id, u32 value)
 	u32 *val;
 
 	if (*len + sizeof(*entry) + sizeof(u32) >= WCN36XX_SMD_BUF_SIZE) {
-		wcn36xx_error("Not enough room for TLV entry\n");
+		wcn36xx_err("Not enough room for TLV entry\n");
 		return -ENOMEM;
 	}
 
@@ -222,7 +222,7 @@ int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
 
 	ret = request_firmware(&nv, WLAN_NV_FILE, wcn->dev);
 	if (ret) {
-		wcn36xx_error("Failed to load nv file %s: %d\n",
+		wcn36xx_err("Failed to load nv file %s: %d\n",
 			      WLAN_NV_FILE, ret);
 		goto out_free_nv;
 	}
@@ -1005,7 +1005,7 @@ int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct sk_buff *skb_beacon,
 		memcpy(&(msg_body.beacon[4]), skb_beacon->data,
 		       skb_beacon->len);
 	} else {
-		wcn36xx_error("Beacon is to big: beacon size=%d\n",
+		wcn36xx_err("Beacon is to big: beacon size=%d\n",
 			      msg_body.beacon_length);
 		return -ENOMEM;
 	}
@@ -1516,7 +1516,7 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len)
 		wcn36xx_smd_delete_sta_context_ind(wcn, buf, len);
 		break;
 	default:
-		wcn36xx_error("SMD_EVENT (%d) not supported\n",
+		wcn36xx_err("SMD_EVENT (%d) not supported\n",
 			      msg_header->msg_type);
 	}
 }
diff --git a/txrx.c b/txrx.c
index 8a6285e..ecfdacb 100644
--- a/txrx.c
+++ b/txrx.c
@@ -194,7 +194,7 @@ int wcn36xx_start_tx(struct wcn36xx *wcn,
 		 * wierd. TODO: Recover from this situation
 		 */
 
-		wcn36xx_error("bd address may not be NULL for BD DXE\n");
+		wcn36xx_err("bd address may not be NULL for BD DXE\n");
 		return -EINVAL;
 	}
 
diff --git a/wcn36xx.h b/wcn36xx.h
index 6504d57..f1b58b4 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -53,7 +53,7 @@ enum wcn36xx_debug_mask {
 	WCN36XX_DBG_ANY		= 0xffffffff,
 };
 
-#define wcn36xx_error(fmt, arg...)				\
+#define wcn36xx_err(fmt, arg...)				\
 	printk(KERN_ERR pr_fmt("ERROR " fmt), ##arg);
 
 #define wcn36xx_warn(fmt, arg...)				\
-- 
1.8.2.2




More information about the wcn36xx mailing list