RE: [PATCH rtw-next v4] wifi: rtl8xxxu: Use local 'dev' variable for dev_warn()

Ping-Ke Shih <[email protected]>
Newsgroups org.kernel.vger.linux-wireless,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
rafad900 <[email protected]> wrote:

> @@ -2241,7 +2242,7 @@ int rtl8xxxu_init_phy_regs(struct rtl8xxxu_priv *priv,
> 
>                 ret = rtl8xxxu_write32(priv, reg, val);
>                 if (ret != sizeof(val)) {
> -                       dev_warn(&priv->udev->dev,
> +                       dev_warn(dev,
>                                  "Failed to initialize PHY\n");

Strighten

>                         return -EAGAIN;
>                 }

[...]

> @@ -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);
> +       struct device *dev = &priv->udev->dev;

Don't put declaration in the middle.

>         INIT_LIST_HEAD(&local);
> 
>         spin_lock_irqsave(&priv->rx_urb_lock, flags);

[...]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.