From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 5/6] staging: r8188eu: remove DBG_88E prints from rtw_android.c
Date: Tue, 3 Aug 2021 22:15:10 +0200 [thread overview]
Message-ID: <20210803201511.29000-5-martin@kaiser.cx> (raw)
In-Reply-To: <20210803201511.29000-1-martin@kaiser.cx>
We should use the standard mechanism for debug prints. Remove the prints
that use driver-specific macros.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/os_dep/rtw_android.c | 21 ++++----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/rtw_android.c b/drivers/staging/r8188eu/os_dep/rtw_android.c
index 2b9e719e2a51..c5cd621eebd9 100644
--- a/drivers/staging/r8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/r8188eu/os_dep/rtw_android.c
@@ -159,7 +159,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
}
command = kmalloc(priv_cmd.total_len, GFP_KERNEL);
if (!command) {
- DBG_88E("%s: failed to allocate memory\n", __func__);
ret = -ENOMEM;
goto exit;
}
@@ -168,7 +167,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
#else
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
#endif
- DBG_88E("%s: failed to access memory\n", __func__);
ret = -EFAULT;
goto exit;
}
@@ -177,8 +175,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
ret = -EFAULT;
goto exit;
}
- DBG_88E("%s: Android private cmd \"%s\" on %s\n",
- __func__, command, ifr->ifr_name);
cmd_num = rtw_android_cmdstr_to_num(command);
switch (cmd_num) {
case ANDROID_WIFI_CMD_START:
@@ -187,8 +183,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto response;
}
if (!g_wifi_on) {
- DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
- __func__, command, ifr->ifr_name);
ret = 0;
goto exit;
}
@@ -252,7 +246,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
case ANDROID_WIFI_CMD_P2P_SET_PS:
break;
default:
- DBG_88E("Unknown PRIVATE command %s - ignored\n", command);
snprintf(command, 3, "OK");
bytes_written = strlen("OK");
}
@@ -261,20 +254,14 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
if (bytes_written >= 0) {
if ((bytes_written == 0) && (priv_cmd.total_len > 0))
command[0] = '\0';
- if (bytes_written >= priv_cmd.total_len) {
- DBG_88E("%s: bytes_written = %d\n", __func__,
- bytes_written);
+ if (bytes_written >= priv_cmd.total_len)
bytes_written = priv_cmd.total_len;
- } else {
+ else
bytes_written++;
- }
+
priv_cmd.used_len = bytes_written;
- if (copy_to_user((char __user *)priv_cmd.buf, command,
- bytes_written)) {
- DBG_88E("%s: failed to copy data to user buffer\n",
- __func__);
+ if (copy_to_user((char __user *)priv_cmd.buf, command, bytes_written))
ret = -EFAULT;
- }
} else {
ret = bytes_written;
}
--
2.20.1
next prev parent reply other threads:[~2021-08-03 20:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 20:15 [PATCH 1/6] staging: r8188eu: remove RT_TRACE and DBG_88E prints from mlme_linux.c Martin Kaiser
2021-08-03 20:15 ` [PATCH 2/6] staging: r8188eu: remove RT_TRACE and DBG_88E prints from os_intfs.c Martin Kaiser
2021-08-03 20:15 ` [PATCH 3/6] staging: r8188eu: remove RT_TRACE and DBG_88E prints from osdep_service.c Martin Kaiser
2021-08-03 20:15 ` [PATCH 4/6] staging: r8188eu: remove RT_TRACE prints from recv_linux.c Martin Kaiser
2021-08-03 20:15 ` Martin Kaiser [this message]
2021-08-03 20:15 ` [PATCH 6/6] staging: r8188eu: remove RT_TRACE and DBG_88E prints from xmit_linux.c Martin Kaiser
2021-08-05 11:02 ` Greg Kroah-Hartman
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=20210803201511.29000-5-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/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).