linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: "Roland Vossen" <rvossen@broadcom.com>,
	devel@linuxdriverproject.org, linux-wireless@vger.kernel.org,
	"Brett Rudley" <brudley@broadcom.com>,
	"Henry Ptasinski" <henryp@broadcom.com>
Subject: [PATCH 10/61] staging: brcm80211: replaced WL_ERROR in rest of softmac.
Date: Tue, 3 May 2011 11:35:10 +0200	[thread overview]
Message-ID: <1304415361-7813-11-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1304415361-7813-1-git-send-email-arend@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

Code cleanup. Replaced proprietary function by wiphy_err(). Removed
WL_ERROR() on spots where struct wlc was not available and message
was redundant.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/wl_dbg.h       |    2 -
 drivers/staging/brcm80211/brcmsmac/wlc_alloc.c    |    2 -
 drivers/staging/brcm80211/brcmsmac/wlc_channel.c  |   29 ++++++++-------------
 drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c |    5 ++-
 drivers/staging/brcm80211/brcmsmac/wlc_stf.c      |   12 ++++++---
 5 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wl_dbg.h b/drivers/staging/brcm80211/brcmsmac/wl_dbg.h
index 8705b40..bdc0f85 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_dbg.h
+++ b/drivers/staging/brcm80211/brcmsmac/wl_dbg.h
@@ -28,7 +28,6 @@ do {						\
 
 #ifdef BCMDBG
 
-#define	WL_ERROR(fmt, args...)	WL_PRINT(WL_ERROR_VAL, fmt, ##args)
 #define	WL_TRACE(fmt, args...)	WL_PRINT(WL_TRACE_VAL, fmt, ##args)
 #define WL_AMPDU(fmt, args...)	WL_PRINT(WL_AMPDU_VAL, fmt, ##args)
 #define WL_FFPLD(fmt, args...)	WL_PRINT(WL_FFPLD_VAL, fmt, ##args)
@@ -76,7 +75,6 @@ do {						\
 
 #else				/* BCMDBG */
 
-#define	WL_ERROR(fmt, args...)		no_printk(fmt, ##args)
 #define	WL_TRACE(fmt, args...)		no_printk(fmt, ##args)
 #define WL_AMPDU(fmt, args...)		no_printk(fmt, ##args)
 #define WL_FFPLD(fmt, args...)		no_printk(fmt, ##args)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
index e928fa1..d93bd6a 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
@@ -48,8 +48,6 @@ void *wlc_calloc(uint unit, uint size)
 	void *item;
 
 	item = kzalloc(size, GFP_ATOMIC);
-	if (item == NULL)
-		WL_ERROR("wl%d: %s: out of memory\n", unit, __func__);
 	return item;
 }
 
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c
index e31b9b1..6f5e103 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c
@@ -594,8 +594,6 @@ struct chan20_info chan20_info[] = {
 static const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
 {
 	if (locale_idx >= ARRAY_SIZE(g_locale_2g_table)) {
-		WL_ERROR("%s: locale 2g index size out of range %d\n",
-			 __func__, locale_idx);
 		ASSERT(locale_idx < ARRAY_SIZE(g_locale_2g_table));
 		return NULL;
 	}
@@ -605,8 +603,6 @@ static const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
 static const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
 {
 	if (locale_idx >= ARRAY_SIZE(g_locale_5g_table)) {
-		WL_ERROR("%s: locale 5g index size out of range %d\n",
-			 __func__, locale_idx);
 		ASSERT(locale_idx < ARRAY_SIZE(g_locale_5g_table));
 		return NULL;
 	}
@@ -616,8 +612,6 @@ static const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
 const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
 {
 	if (locale_idx >= ARRAY_SIZE(g_mimo_2g_table)) {
-		WL_ERROR("%s: mimo 2g index size out of range %d\n",
-			 __func__, locale_idx);
 		return NULL;
 	}
 	return g_mimo_2g_table[locale_idx];
@@ -626,8 +620,6 @@ const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
 const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx)
 {
 	if (locale_idx >= ARRAY_SIZE(g_mimo_5g_table)) {
-		WL_ERROR("%s: mimo 5g index size out of range %d\n",
-			 __func__, locale_idx);
 		return NULL;
 	}
 	return g_mimo_5g_table[locale_idx];
@@ -645,7 +637,8 @@ wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
 
 	wlc_cm = kzalloc(sizeof(wlc_cm_info_t), GFP_ATOMIC);
 	if (wlc_cm == NULL) {
-		WL_ERROR("wl%d: %s: out of memory", pub->unit, __func__);
+		wiphy_err(wlc->wiphy, "wl%d: %s: out of memory", pub->unit,
+			  __func__);
 		return NULL;
 	}
 	wlc_cm->pub = pub;
@@ -814,8 +807,8 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
 
 	/* check for currently supported ccode size */
 	if (strlen(ccode) > (WLC_CNTRY_BUF_SZ - 1)) {
-		WL_ERROR("wl%d: %s: ccode \"%s\" too long for match\n",
-			 wlc->pub->unit, __func__, ccode);
+		wiphy_err(wlc->wiphy, "wl%d: %s: ccode \"%s\" too long for "
+			  "match\n", wlc->pub->unit, __func__, ccode);
 		return NULL;
 	}
 
@@ -830,7 +823,7 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
 	if (!strcmp(srom_ccode, ccode)) {
 		*mapped_regrev = srom_regrev;
 		mapped = 0;
-		WL_ERROR("srom_code == ccode %s\n", __func__);
+		wiphy_err(wlc->wiphy, "srom_code == ccode %s\n", __func__);
 		ASSERT(0);
 	} else {
 		mapped =
@@ -882,7 +875,6 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode,
 		}
 	}
 
-	WL_ERROR("%s: Returning NULL\n", __func__);
 	ASSERT(0);
 	return NULL;
 }
@@ -961,9 +953,10 @@ static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
 	if (chan == INVCHANNEL) {
 		/* country/locale with no valid channels, set the radio disable bit */
 		mboolset(wlc->pub->radio_disabled, WL_RADIO_COUNTRY_DISABLE);
-		WL_ERROR("wl%d: %s: no valid channel for \"%s\" nbands %d bandlocked %d\n",
-			 wlc->pub->unit, __func__,
-			 wlc_cm->country_abbrev, NBANDS(wlc), wlc->bandlocked);
+		wiphy_err(wlc->wiphy, "wl%d: %s: no valid channel for \"%s\" "
+			  "nbands %d bandlocked %d\n", wlc->pub->unit,
+			  __func__, wlc_cm->country_abbrev, NBANDS(wlc),
+			  wlc->bandlocked);
 	} else
 	    if (mboolisset(wlc->pub->radio_disabled,
 		WL_RADIO_COUNTRY_DISABLE)) {
@@ -1514,8 +1507,8 @@ wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
 
 	/* check the chanspec */
 	if (wf_chspec_malformed(chspec)) {
-		WL_ERROR("wl%d: malformed chanspec 0x%x\n",
-			 wlc->pub->unit, chspec);
+		wiphy_err(wlc->wiphy, "wl%d: malformed chanspec 0x%x\n",
+			wlc->pub->unit, chspec);
 		ASSERT(0);
 		return false;
 	}
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c b/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c
index 96d3600..0c4780d 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c
@@ -68,8 +68,9 @@ wlc_phy_shim_info_t *wlc_phy_shim_attach(struct wlc_hw_info *wlc_hw,
 
 	physhim = kzalloc(sizeof(wlc_phy_shim_info_t), GFP_ATOMIC);
 	if (!physhim) {
-		WL_ERROR("wl%d: wlc_phy_shim_attach: out of mem\n",
-			 wlc_hw->unit);
+		wiphy_err(wlc_hw->wlc->wiphy,
+			  "wl%d: wlc_phy_shim_attach: out of mem\n",
+			  wlc_hw->unit);
 		return NULL;
 	}
 	physhim->wlc_hw = wlc_hw;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c
index 799b9ae..24b04da 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c
@@ -275,15 +275,19 @@ int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force)
 				if (RSPEC_STF(wlc->bandstate[i]->rspec_override)
 				    != PHY_TXC1_MODE_SISO) {
 					wlc->bandstate[i]->rspec_override = 0;
-					WL_ERROR("%s(): temp sense override non-SISO rspec_override\n",
-						 __func__);
+					wiphy_err(wlc->wiphy, "%s(): temp "
+						  "sense override non-SISO "
+						  "rspec_override\n",
+						  __func__);
 				}
 				if (RSPEC_STF
 				    (wlc->bandstate[i]->mrspec_override) !=
 				    PHY_TXC1_MODE_SISO) {
 					wlc->bandstate[i]->mrspec_override = 0;
-					WL_ERROR("%s(): temp sense override non-SISO mrspec_override\n",
-						 __func__);
+					wiphy_err(wlc->wiphy, "%s(): temp "
+						  "sense override non-SISO "
+						  "mrspec_override\n",
+						  __func__);
 				}
 			}
 	}
-- 
1.7.4.1



  parent reply	other threads:[~2011-05-03  9:36 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03  9:35 [PATCH 00/61] staging: brcm80211: resubmit after flush of patch queue Arend van Spriel
2011-05-03  9:35 ` [PATCH 01/61] staging: brcm80211: fixed error in non-DHD_DEBUG fullmac build Arend van Spriel
2011-05-03  9:35 ` [PATCH 02/61] staging: brcm80211: made error codes in bcmutils.h positive Arend van Spriel
2011-05-03  9:35 ` [PATCH 03/61] staging: brcm80211: bugfix for fullmac return codes Arend van Spriel
2011-05-03  9:35 ` [PATCH 04/61] staging: brcm80211: removed WL_NONE Arend van Spriel
2011-05-03  9:35 ` [PATCH 05/61] staging: brcm80211: making wiphy object accessible from wlc and phy Arend van Spriel
2011-05-03  9:35 ` [PATCH 06/61] staging: brcm80211: replaced WL_ERROR in two files Arend van Spriel
2011-05-03  9:35 ` [PATCH 07/61] staging: brcm80211: replaced WL_ERROR in wlc_ampdu.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 08/61] staging: brcm80211: replaced WL_ERROR in wlc_bmac.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 09/61] staging: brcm80211: replaced WL_ERROR in wlc_main.c Arend van Spriel
2011-05-03  9:35 ` Arend van Spriel [this message]
2011-05-03  9:35 ` [PATCH 11/61] staging: brcm80211: remove unnecessary if statements from bss_info_changed Arend van Spriel
2011-05-03  9:35 ` [PATCH 12/61] staging: brcm80211: remove wl_ops_set_rts_threshold Arend van Spriel
2011-05-03  9:35 ` [PATCH 13/61] staging: brcm80211: rename rate related definitions Arend van Spriel
2011-05-03  9:35 ` [PATCH 14/61] staging: brcm80211: honour basic rate configuration from mac80211 Arend van Spriel
2011-05-03  9:35 ` [PATCH 15/61] staging: brcm80211: removed ASSERTs from wlc_main.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 16/61] staging: brcm80211: removed ASSERTs from wlc_ampdu.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 17/61] staging: brcm80211: removed ASSERTs from wlc_bmac.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 18/61] staging: brcm80211: removed error string function Arend van Spriel
2011-05-03  9:35 ` [PATCH 19/61] staging: brcm80211: replace error codes part 1 Arend van Spriel
2011-05-03  9:35 ` [PATCH 20/61] staging: brcm80211: replace error codes part 2 Arend van Spriel
2011-05-03  9:35 ` [PATCH 21/61] staging: brcm80211: made fullmac error codes more consistent Arend van Spriel
2011-05-03  9:35 ` [PATCH 22/61] staging: brcm80211: removed ASSERTs from util dir, part 1 Arend van Spriel
2011-05-03  9:35 ` [PATCH 23/61] staging: brcm80211: removed ASSERTs from util dir, part 2 Arend van Spriel
2011-05-03  9:35 ` [PATCH 24/61] staging: brcm80211: delete ASSERTs in 4 files in brcmsmac dir Arend van Spriel
2011-05-03  9:35 ` [PATCH 25/61] staging: brcm80211: removed all ASSERTs from wl_mac80211.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 26/61] staging: brcm80211: removed all ASSERTs from wlc_ampdu.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 27/61] staging: brcm80211: removed remaining ASSERTs from phy Arend van Spriel
2011-05-03  9:35 ` [PATCH 28/61] staging: brcm80211: implement flush driver callback for mac80211 Arend van Spriel
2011-05-03  9:35 ` [PATCH 29/61] staging: brcm80211: rename active_queue identifier Arend van Spriel
2011-05-03  9:35 ` [PATCH 30/61] staging: brcm80211: remove queue info parameter from wlc_send_q Arend van Spriel
2011-05-03  9:35 ` [PATCH 31/61] staging: brcm80211: provide TSF value in receive status Arend van Spriel
2011-05-03  9:35 ` [PATCH 32/61] staging: brcm80211: remove tsf retrieval from wlc_bmac.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 33/61] staging: brcm80211: remove retrieval function for tsf in wlc_main.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 34/61] Revert "staging: brcm80211: separate hndpmu functionality for brcmsmac driver" Arend van Spriel
2011-05-03  9:35 ` [PATCH 35/61] staging: brcm80211: remove unused functions from hndpmu.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 36/61] staging: brcm80211: remove use of si_* functions from wlc_phy_lcn.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 37/61] staging: brcm80211: separate hndpmu functionality for brcmsmac driver Arend van Spriel
2011-05-03  9:35 ` [PATCH 38/61] staging: brcm80211: remove dependency between aiutils and siutils sources Arend van Spriel
2011-05-03  9:35 ` [PATCH 39/61] staging: brcm80211: fix checkpatch warnings in si_pmu_spuravoid_pllupdate Arend van Spriel
2011-05-03  9:35 ` [PATCH 40/61] staging: brcm80211: remove zero initialization of static in si_pmu_ilp_clock Arend van Spriel
2011-05-03  9:35 ` [PATCH 41/61] staging: brcm80211: fix checkpatch warning in si_pmu_res_init Arend van Spriel
2011-05-03  9:35 ` [PATCH 42/61] staging: brcm80211: fix checkpatch issues in si_pmu_measure_alpclk Arend van Spriel
2011-05-03  9:35 ` [PATCH 43/61] staging: brcm80211: fix checkpatch warning in si_pmu_otp_power Arend van Spriel
2011-05-03  9:35 ` [PATCH 44/61] staging: brcm80211: cleanup definitions in aiutils header file Arend van Spriel
2011-05-03  9:35 ` [PATCH 45/61] staging: brcm80211: cleanup code in source file aiutils.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 46/61] staging: brcm80211: move aiutils source files to brcmsmac folder Arend van Spriel
2011-05-03  9:35 ` [PATCH 47/61] staging: brcm80211: remove check on interconnect type in ai_setcore Arend van Spriel
2011-05-03  9:35 ` [PATCH 48/61] staging: brcm80211: use local variable for socitype during ai_scan Arend van Spriel
2011-05-03  9:35 ` [PATCH 49/61] staging: brcm80211: remove socitype member for struct si_pub definition Arend van Spriel
2011-05-03  9:35 ` [PATCH 50/61] staging: brcm80211: removed ASSERTs from aiutils.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 51/61] staging: brcm80211: removed ASSERTs from wlc_pmu.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 52/61] staging: brcm80211: moved ASSERT logic to fullmac driver Arend van Spriel
2011-05-03  9:35 ` [PATCH 53/61] staging: brcm80211: replace hndcrc16 with crc-ccitt function Arend van Spriel
2011-05-03  9:35 ` [PATCH 54/61] staging: brcm80211: remove unused hndcrc32 function Arend van Spriel
2011-05-03  9:35 ` [PATCH 55/61] staging: brcm80211: remove CRC_INNER_LOOP macro Arend van Spriel
2011-05-03  9:35 ` [PATCH 56/61] staging: brcm80211: move qmath sources to phy directory Arend van Spriel
2011-05-03  9:35 ` [PATCH 57/61] staging: brcm80211: remove unused functions from wlc_phy_qmath.c Arend van Spriel
2011-05-03  9:35 ` [PATCH 58/61] staging: brcm80211: replaced WL_TRACE by BCMMSG Arend van Spriel
2011-05-03  9:35 ` [PATCH 59/61] staging: brcm80211: replaced WL_AMPDU_* with BCMMSG Arend van Spriel
2011-05-03  9:36 ` [PATCH 60/61] staging: brcm80211: got rid of WL_FFPLD message log macro Arend van Spriel
2011-05-03  9:36 ` [PATCH 61/61] staging: brcm80211: removed function wlc_calloc() Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304415361-7813-11-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=henryp@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).