All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Potter <phil@philpotter.co.uk>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, dan.carpenter@oracle.com,
	linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: [PATCH 07/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ieee80211.c
Date: Tue, 15 Jun 2021 01:14:46 +0100	[thread overview]
Message-ID: <20210615001507.1171-8-phil@philpotter.co.uk> (raw)
In-Reply-To: <20210615001507.1171-1-phil@philpotter.co.uk>

Remove all DBG_88E calls from core/rtw_ieee80211.c as this macro is
unnecessary, and many of these calls are dubious in terms of necessity.
Removing all calls will ultimately allow the removal of the macro
itself.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
 .../staging/rtl8188eu/core/rtw_ieee80211.c    | 38 +++----------------
 1 file changed, 5 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index e88ebe8891fc..7a0544cba4bf 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -686,13 +686,8 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 	 * OUI of the vendor. The following byte is used a vendor specific
 	 * sub-type.
 	 */
-	if (elen < 4) {
-		if (show_errors) {
-			DBG_88E("short vendor specific information element ignored (len=%lu)\n",
-				(unsigned long)elen);
-		}
+	if (elen < 4)
 		return -1;
-	}
 
 	oui = RTW_GET_BE24(pos);
 	switch (oui) {
@@ -711,11 +706,9 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->wpa_ie_len = elen;
 			break;
 		case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
-			if (elen < 5) {
-				DBG_88E("short WME information element ignored (len=%lu)\n",
-					(unsigned long)elen);
+			if (elen < 5)
 				return -1;
-			}
+
 			switch (pos[4]) {
 			case WME_OUI_SUBTYPE_INFORMATION_ELEMENT:
 			case WME_OUI_SUBTYPE_PARAMETER_ELEMENT:
@@ -727,8 +720,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 				elems->wme_tspec_len = elen;
 				break;
 			default:
-				DBG_88E("unknown WME information element ignored (subtype=%d len=%lu)\n",
-					pos[4], (unsigned long)elen);
 				return -1;
 			}
 			break;
@@ -738,8 +729,6 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->wps_ie_len = elen;
 			break;
 		default:
-			DBG_88E("Unknown Microsoft information element ignored (type=%d len=%lu)\n",
-				pos[3], (unsigned long)elen);
 			return -1;
 		}
 		break;
@@ -751,14 +740,10 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
 			elems->vendor_ht_cap_len = elen;
 			break;
 		default:
-			DBG_88E("Unknown Broadcom information element ignored (type=%d len=%lu)\n",
-				pos[3], (unsigned long)elen);
 			return -1;
 		}
 		break;
 	default:
-		DBG_88E("unknown vendor specific information element ignored (vendor OUI %3phC len=%lu)\n",
-			pos, (unsigned long)elen);
 		return -1;
 	}
 	return 0;
@@ -789,13 +774,8 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
 		elen = *pos++;
 		left -= 2;
 
-		if (elen > left) {
-			if (show_errors) {
-				DBG_88E("IEEE 802.11 element parse failed (id=%d elen=%d left=%lu)\n",
-					id, elen, (unsigned long)left);
-			}
+		if (elen > left)
 			return ParseFailed;
-		}
 
 		switch (id) {
 		case WLAN_EID_SSID:
@@ -876,10 +856,6 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
 			break;
 		default:
 			unknown++;
-			if (!show_errors)
-				break;
-			DBG_88E("IEEE 802.11 element parse ignored unknown element (id=%d elen=%d)\n",
-				id, elen);
 			break;
 		}
 		left -= elen;
@@ -905,12 +881,8 @@ void rtw_macaddr_cfg(u8 *mac_addr)
 		ether_addr_copy(mac, mac_addr);
 	}
 
-	if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
+	if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac))
 		eth_random_addr(mac_addr);
-		DBG_88E("MAC Address from efuse error, assign random one !!!\n");
-	}
-
-	DBG_88E("%s MAC Address  = %pM\n", __func__, mac_addr);
 }
 
 static int rtw_get_cipher_info(struct wlan_network *pnetwork)
-- 
2.30.2


  parent reply	other threads:[~2021-06-15  0:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  0:14 [PATCH 00/28] staging: rtl8188eu: remove DBG_88E callers and macro Phillip Potter
2021-06-15  0:14 ` [PATCH 01/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_efuse.c Phillip Potter
2021-06-15  0:14 ` [PATCH 02/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_xmit.c Phillip Potter
2021-06-15  0:14 ` [PATCH 03/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme_ext.c Phillip Potter
2021-06-15 10:32   ` Dan Carpenter
2021-06-15 21:15     ` Phillip Potter
2021-06-15  0:14 ` [PATCH 04/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_wlan_util.c Phillip Potter
2021-06-15  0:14 ` [PATCH 05/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ap.c Phillip Potter
2021-06-15  0:14 ` [PATCH 06/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_pwrctrl.c Phillip Potter
2021-06-15  0:14 ` Phillip Potter [this message]
2021-06-15  0:14 ` [PATCH 08/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_security.c Phillip Potter
2021-06-15  0:14 ` [PATCH 09/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_ioctl_set.c Phillip Potter
2021-06-15  0:14 ` [PATCH 10/28] staging: rtl8188eu: remove all DBG_88E calls from core/rtw_mlme.c Phillip Potter
2021-06-15  0:14 ` [PATCH 11/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/ioctl_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 12/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/usb_intf.c Phillip Potter
2021-06-15  0:14 ` [PATCH 13/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/os_intfs.c Phillip Potter
2021-06-15  0:14 ` [PATCH 14/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/mlme_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 15/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/xmit_linux.c Phillip Potter
2021-06-15  0:14 ` [PATCH 16/28] staging: rtl8188eu: remove all DBG_88E calls from os_dep/rtw_android.c Phillip Potter
2021-06-15  0:14 ` [PATCH 17/28] staging: rtl8188eu: remove all DBG_88E calls from hal/hal_intf.c Phillip Potter
2021-06-15  0:14 ` [PATCH 18/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_cmd.c Phillip Potter
2021-06-15  0:14 ` [PATCH 19/28] staging: rtl8188eu: remove all DBG_88E calls from hal/pwrseqcmd.c Phillip Potter
2021-06-15  0:14 ` [PATCH 20/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_hal_init.c Phillip Potter
2021-06-15  0:15 ` [PATCH 21/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188e_xmit.c Phillip Potter
2021-06-15  0:15 ` [PATCH 22/28] staging: rtl8188eu: remove all DBG_88E calls from hal/usb_halinit.c Phillip Potter
2021-06-15 12:41   ` Dan Carpenter
2021-06-15 21:08     ` Phillip Potter
2021-06-15  0:15 ` [PATCH 23/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_recv.c Phillip Potter
2021-06-15  0:15 ` [PATCH 24/28] staging: rtl8188eu: remove all DBG_88E calls from hal/rtl8188eu_xmit.c Phillip Potter
2021-06-15  0:15 ` [PATCH 25/28] staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_recv.c Phillip Potter
2021-06-15  0:15 ` [PATCH 26/28] staging: rtl8188eu: remove converted netdev_dbg calls from core/rtw_sta_mgt.c Phillip Potter
2021-06-15  0:15 ` [PATCH 27/28] staging: rtl8188eu: remove core/rtw_debug.c Phillip Potter
2021-06-15  0:15 ` [PATCH 28/28] staging: rtl8188eu: remove DBG_88E macro definition Phillip Potter
2021-06-15 11:57 ` [PATCH 00/28] staging: rtl8188eu: remove DBG_88E callers and macro Greg KH
2021-06-15 21:05   ` Phillip Potter
2021-06-15 12:51 ` Dan Carpenter
2021-06-15 21:10   ` Phillip Potter

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=20210615001507.1171-8-phil@philpotter.co.uk \
    --to=phil@philpotter.co.uk \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.