From: Noah Techoueyres <noahtechoueyres@gmail.com>
To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev
Cc: dan.carpenter@linaro.org, nikolayof23@gmail.com,
linux-kernel@vger.kernel.org,
Noah Techoueyres <noahtechoueyres@gmail.com>
Subject: [PATCH v3 2/2] staging: rtl8723bs: resolve 100-column limit with intermediate pointer
Date: Tue, 12 May 2026 11:57:12 -0400 [thread overview]
Message-ID: <20260512155712.6998-2-noahtechoueyres@gmail.com> (raw)
In-Reply-To: <20260512155712.6998-1-noahtechoueyres@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 26 ++++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 067b54c6111e..abf2a9d01706 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1105,25 +1105,25 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter *padapter)
static void collect_traffic_statistics(struct adapter *padapter)
{
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
+ struct rtw_traffic_statistics *stat = &pdvobjpriv->traffic_stat;
/* Tx */
- pdvobjpriv->traffic_stat.tx_bytes = padapter->xmitpriv.tx_bytes;
- pdvobjpriv->traffic_stat.tx_pkts = padapter->xmitpriv.tx_pkts;
- pdvobjpriv->traffic_stat.tx_drop = padapter->xmitpriv.tx_drop;
+ stat->tx_bytes = padapter->xmitpriv.tx_bytes;
+ stat->tx_pkts = padapter->xmitpriv.tx_pkts;
+ stat->tx_drop = padapter->xmitpriv.tx_drop;
/* Rx */
- pdvobjpriv->traffic_stat.rx_bytes = padapter->recvpriv.rx_bytes;
- pdvobjpriv->traffic_stat.rx_pkts = padapter->recvpriv.rx_pkts;
- pdvobjpriv->traffic_stat.rx_drop = padapter->recvpriv.rx_drop;
+ stat->rx_bytes = padapter->recvpriv.rx_bytes;
+ stat->rx_pkts = padapter->recvpriv.rx_pkts;
+ stat->rx_drop = padapter->recvpriv.rx_drop;
/* Calculate throughput in last interval */
- pdvobjpriv->traffic_stat.cur_tx_bytes = pdvobjpriv->traffic_stat.tx_bytes - pdvobjpriv->traffic_stat.last_tx_bytes;
- pdvobjpriv->traffic_stat.cur_rx_bytes = pdvobjpriv->traffic_stat.rx_bytes - pdvobjpriv->traffic_stat.last_rx_bytes;
- pdvobjpriv->traffic_stat.last_tx_bytes = pdvobjpriv->traffic_stat.tx_bytes;
- pdvobjpriv->traffic_stat.last_rx_bytes = pdvobjpriv->traffic_stat.rx_bytes;
-
- pdvobjpriv->traffic_stat.cur_tx_tp = (u32)(pdvobjpriv->traffic_stat.cur_tx_bytes * 8 / 2 / 1024 / 1024);
- pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8 / 2 / 1024 / 1024);
+ stat->cur_tx_bytes = stat->tx_bytes - stat->last_tx_bytes;
+ stat->cur_rx_bytes = stat->rx_bytes - stat->last_rx_bytes;
+ stat->last_tx_bytes = stat->tx_bytes;
+ stat->last_rx_bytes = stat->rx_bytes;
+ stat->cur_tx_tp = (u32)(stat->cur_tx_bytes * 8 / 2 / 1024 / 1024);
+ stat->cur_rx_tp = (u32)(stat->cur_rx_bytes * 8 / 2 / 1024 / 1024);
}
bool traffic_status_watchdog(struct adapter *padapter, bool from_timer)
--
2.53.0
prev parent reply other threads:[~2026-05-12 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 15:57 [PATCH v3 1/2] staging: rtl8723bs: fix block comment formatting Noah Techoueyres
2026-05-12 15:57 ` Noah Techoueyres [this message]
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=20260512155712.6998-2-noahtechoueyres@gmail.com \
--to=noahtechoueyres@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nikolayof23@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