From: Ping-Ke Shih <pkshih@realtek.com>
To: rafad900 <rafad900@gmail.com>,
"Jes.Sorensen@gmail.com" <Jes.Sorensen@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next v5] wifi: rtl8xxxu: Use local 'dev' variable for dev_warn()
Date: Wed, 19 Aug 2026 00:22:41 +0000 [thread overview]
Message-ID: <51b1f52648c948a5b960d3e3196fa845@realtek.com> (raw)
In-Reply-To: <20260818193402.2109269-1-rafad900@gmail.com>
rafad900 <rafad900@gmail.com> wrote:
> @@ -3173,7 +3175,7 @@ static int rtl8xxxu_iqk_path_b(struct rtl8xxxu_priv *priv)
> (((reg_ecc & 0x03ff0000) >> 16) != 0x36))
> result |= 0x02;
> else
> - dev_warn(&priv->udev->dev, "%s: Path B RX IQK failed!\n",
> + dev_warn(dev, "%s: Path B RX IQK failed!\n",
> __func__);
Straighten ?
Please check this kind of pattern across whole patch before sending out.
> out:
> return result;
> @@ -5862,6 +5864,7 @@ static void rtl8xxxu_queue_rx_urb(struct rtl8xxxu_priv *priv,
> static void rtl8xxxu_rx_urb_work(struct work_struct *work)
> {
> struct rtl8xxxu_priv *priv;
> + struct device *dev;
In reverse X'mas tree order.
> struct rtl8xxxu_rx_urb *rx_urb, *tmp;
> struct list_head local;
> struct sk_buff *skb;
> @@ -5869,6 +5872,7 @@ static void rtl8xxxu_rx_urb_work(struct work_struct *work)
> int ret;
>
> priv = container_of(work, struct rtl8xxxu_priv, rx_urb_wq);
> + dev = &priv->udev->dev;
> INIT_LIST_HEAD(&local);
>
> spin_lock_irqsave(&priv->rx_urb_lock, flags);
> @@ -5894,8 +5898,7 @@ static void rtl8xxxu_rx_urb_work(struct work_struct *work)
> rtl8xxxu_queue_rx_urb(priv, rx_urb);
> break;
> default:
Only here use local 'dev'. Why not assign the value here?
But for this case, it seems no gain. Just keep it as was?
> - dev_warn(&priv->udev->dev,
> - "failed to requeue urb with error %i\n", ret);
> + dev_warn(dev, "failed to requeue urb with error %i\n", ret);
> skb = (struct sk_buff *)rx_urb->urb.context;
> dev_kfree_skb(skb);
> usb_free_urb(&rx_urb->urb);
> --
> 2.43.0
>
prev parent reply other threads:[~2026-08-19 0:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 19:34 [PATCH rtw-next v5] wifi: rtl8xxxu: Use local 'dev' variable for dev_warn() rafad900
2026-08-19 0:22 ` Ping-Ke Shih [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=51b1f52648c948a5b960d3e3196fa845@realtek.com \
--to=pkshih@realtek.com \
--cc=Jes.Sorensen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rafad900@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).