From: Phillip Potter <phil@philpotter.co.uk>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, straube.linux@gmail.com,
martin@kaiser.cx, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/7] staging: r8188eu: convert DBG_88E calls in core/rtw_xmit.c
Date: Mon, 10 Jan 2022 09:00:15 +0000 [thread overview]
Message-ID: <20220110090020.6800-3-phil@philpotter.co.uk> (raw)
In-Reply-To: <20220110090020.6800-1-phil@philpotter.co.uk>
Convert the DBG_88E macro calls in core/rtw_xmit.c to use pr_debug
or netdev_dbg appropriately, as their information may be useful to
observers, and this gets the driver closer to the point of being
able to remove DBG_88E itself. Also remove some commented out
DBG_88E calls altogether.
Some calls are at points in the call chain where use of dev_dbg or
netdev_dbg isn't possible due to lack of device pointer, so plain
pr_debug is appropriate here.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
---
drivers/staging/r8188eu/core/rtw_xmit.c | 30 ++++++++++++-------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 8503059edc46..334644e46000 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -372,7 +372,7 @@ u8 qos_acm(u8 acm_mask, u8 priority)
change_priority = 5;
break;
default:
- DBG_88E("qos_acm(): invalid pattrib->priority: %d!!!\n", priority);
+ pr_debug("invalid pattrib->priority: %d!!!\n", priority);
break;
}
@@ -489,7 +489,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
if (psta) {
pattrib->mac_id = psta->mac_id;
- /* DBG_88E("%s ==> mac_id(%d)\n", __func__, pattrib->mac_id); */
pattrib->psta = psta;
} else {
/* if we cannot get psta => drop the pkt */
@@ -895,7 +894,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
return _FAIL;
if (!pxmitframe->buf_addr) {
- DBG_88E("==> %s buf_addr == NULL\n", __func__);
+ netdev_dbg(padapter->pnetdev, "buf_addr == NULL\n");
return _FAIL;
}
@@ -906,7 +905,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
mem_start = pbuf_start + hw_hdr_offset;
if (rtw_make_wlanhdr(padapter, mem_start, pattrib) == _FAIL) {
- DBG_88E("rtw_xmitframe_coalesce: rtw_make_wlanhdr fail; drop pkt\n");
+ netdev_dbg(padapter->pnetdev,
+ "rtw_make_wlanhdr fail; drop pkt\n");
res = _FAIL;
goto exit;
}
@@ -1003,7 +1003,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
}
if (xmitframe_addmic(padapter, pxmitframe) == _FAIL) {
- DBG_88E("xmitframe_addmic(padapter, pxmitframe) == _FAIL\n");
+ netdev_dbg(padapter->pnetdev,
+ "xmitframe_addmic(padapter, pxmitframe) == _FAIL\n");
res = _FAIL;
goto exit;
}
@@ -1134,7 +1135,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
/* pxmitbuf->ext_tag = true; */
if (pxmitbuf->sctx) {
- DBG_88E("%s pxmitbuf->sctx is not NULL\n", __func__);
+ pr_debug("pxmitbuf->sctx is not NULL\n");
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
}
}
@@ -1171,8 +1172,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
unsigned long flags;
- /* DBG_88E("+rtw_alloc_xmitbuf\n"); */
-
spin_lock_irqsave(&pfree_xmitbuf_queue->lock, flags);
if (list_empty(&pfree_xmitbuf_queue->queue)) {
@@ -1191,7 +1190,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
pxmitpriv->free_xmitbuf_cnt--;
pxmitbuf->priv_data = NULL;
if (pxmitbuf->sctx) {
- DBG_88E("%s pxmitbuf->sctx is not NULL\n", __func__);
+ pr_debug("pxmitbuf->sctx is not NULL\n");
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
}
}
@@ -1209,7 +1208,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
return _FAIL;
if (pxmitbuf->sctx) {
- DBG_88E("%s pxmitbuf->sctx is not NULL\n", __func__);
+ pr_debug("pxmitbuf->sctx is not NULL\n");
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_FREE);
}
@@ -1479,7 +1478,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
if (!psta) {
res = _FAIL;
- DBG_88E("rtw_xmit_classifier: psta == NULL\n");
+ netdev_dbg(padapter->pnetdev, "psta == NULL\n");
goto exit;
}
@@ -1725,7 +1724,8 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
pxmitframe = rtw_alloc_xmitframe(pxmitpriv);
if (!pxmitframe) {
- DBG_88E("DBG_TX_DROP_FRAME %s no more pxmitframe\n", __func__);
+ netdev_dbg(padapter->pnetdev,
+ "DBG_TX_DROP_FRAME no more pxmitframe\n");
return -1;
}
@@ -2150,7 +2150,7 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
if (!wait_for_completion_timeout(&sctx->done, expire)) {
/* timeout, do something?? */
status = RTW_SCTX_DONE_TIMEOUT;
- DBG_88E("%s timeout\n", __func__);
+ pr_debug("timeout\n");
} else {
status = sctx->status;
}
@@ -2180,7 +2180,7 @@ void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
{
if (*sctx) {
if (rtw_sctx_chk_waring_status(status))
- DBG_88E("%s status:%d\n", __func__, status);
+ pr_debug("status:%d\n", status);
(*sctx)->status = status;
complete(&((*sctx)->done));
*sctx = NULL;
@@ -2205,5 +2205,5 @@ void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status)
if (pxmitpriv->ack_tx)
rtw_sctx_done_err(&pack_tx_ops, status);
else
- DBG_88E("%s ack_tx not set\n", __func__);
+ pr_debug("ack_tx not set\n");
}
--
2.33.1
next prev parent reply other threads:[~2022-01-10 9:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 9:00 [PATCH v2 0/7] staging: r8188eu: further per-file DBG_88E cleanups Phillip Potter
2022-01-10 9:00 ` [PATCH v2 1/7] staging: r8188eu: convert DBG_88E calls in core/rtw_ieee80211.c Phillip Potter
2022-01-10 9:00 ` Phillip Potter [this message]
2022-01-10 9:00 ` [PATCH v2 3/7] staging: r8188eu: convert DBG_88E calls in core/rtw_iol.c Phillip Potter
2022-01-10 9:00 ` [PATCH v2 4/7] staging: r8188eu: convert DBG_88E calls in core/rtw_mlme.c Phillip Potter
2022-01-10 9:00 ` [PATCH v2 5/7] staging: r8188eu: convert DBG_88E calls in core/rtw_ioctl_set.c Phillip Potter
2022-01-10 9:00 ` [PATCH v2 6/7] staging: r8188eu: convert DBG_88E calls in core/rtw_mlme_ext.c Phillip Potter
2022-01-10 9:00 ` [PATCH v2 7/7] staging: r8188eu: convert DBG_88E calls in core/rtw_sta_mgt.c Phillip Potter
2022-01-10 21:05 ` Pavel Skripkin
2022-01-14 0:32 ` Phillip Potter
2022-01-14 20:15 ` Pavel Skripkin
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=20220110090020.6800-3-phil@philpotter.co.uk \
--to=phil@philpotter.co.uk \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=straube.linux@gmail.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).