All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: rtl8xxxu: Adjust logging pattern
@ 2026-08-16 18:08 rafad900
  2026-08-17  3:16 ` Ping-Ke Shih
  0 siblings, 1 reply; 2+ messages in thread
From: rafad900 @ 2026-08-16 18:08 UTC (permalink / raw)
  To: Jes.Sorensen, linux-kernel, linux-wireless; +Cc: rafad900

To ensure consistent patterns, the device struct was
defined and used when dev_warn() is called within
rtl8188eu_rx_iqk_path_a().
This follows the logging pattern used by all the
other functions defined in the file.

Signed-off-by: rafad900 <rafad900@gmail.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
index fea5aec9ced9..4a64633b2da3 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
@@ -643,6 +643,7 @@ static int rtl8188eu_iqk_path_a(struct rtl8xxxu_priv *priv)
 
 static int rtl8188eu_rx_iqk_path_a(struct rtl8xxxu_priv *priv)
 {
+	struct device *dev = &priv->udev->dev;
 	u32 reg_ea4, reg_eac, reg_e94, reg_e9c, val32;
 	int result = 0;
 
@@ -740,7 +741,7 @@ static int rtl8188eu_rx_iqk_path_a(struct rtl8xxxu_priv *priv)
 	    ((reg_eac & 0x03ff0000) != 0x00360000))
 		result |= 0x02;
 	else
-		dev_warn(&priv->udev->dev, "%s: Path A RX IQK failed!\n",
+		dev_warn(dev, "%s: Path A RX IQK failed!\n",
 			 __func__);
 
 out:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] wifi: rtl8xxxu: Adjust logging pattern
  2026-08-16 18:08 [PATCH] wifi: rtl8xxxu: Adjust logging pattern rafad900
@ 2026-08-17  3:16 ` Ping-Ke Shih
  0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2026-08-17  3:16 UTC (permalink / raw)
  To: rafad900, Jes.Sorensen@gmail.com, linux-kernel@vger.kernel.org,
	linux-wireless@vger.kernel.org

rafad900 <rafad900@gmail.com> wrote:
> To ensure consistent patterns, the device struct was
> defined and used when dev_warn() is called within
> rtl8188eu_rx_iqk_path_a().
> This follows the logging pattern used by all the
> other functions defined in the file.
> 
> Signed-off-by: rafad900 <rafad900@gmail.com>

Please use your real name. 

The subject can explicitly point out that you are adjusting to use a
local 'dev' variable for dev_warn(). 

> ---
>  drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> index fea5aec9ced9..4a64633b2da3 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> @@ -643,6 +643,7 @@ static int rtl8188eu_iqk_path_a(struct rtl8xxxu_priv *priv)
> 
>  static int rtl8188eu_rx_iqk_path_a(struct rtl8xxxu_priv *priv)
>  {
> +       struct device *dev = &priv->udev->dev;
>         u32 reg_ea4, reg_eac, reg_e94, reg_e9c, val32;
>         int result = 0;
> 
> @@ -740,7 +741,7 @@ static int rtl8188eu_rx_iqk_path_a(struct rtl8xxxu_priv *priv)
>             ((reg_eac & 0x03ff0000) != 0x00360000))
>                 result |= 0x02;
>         else
> -               dev_warn(&priv->udev->dev, "%s: Path A RX IQK failed!\n",
> +               dev_warn(dev, "%s: Path A RX IQK failed!\n",

The counts of individual use case are:

$ git grep "dev_warn(&priv->udev->dev" drivers/net/wireless/realtek/rtl8xxxu/ | wc -l
19
$ git grep "dev_warn(dev" drivers/net/wireless/realtek/rtl8xxxu/ | wc -l
35

If it is worth to do, please convert all of them.

>                          __func__);
> 
>  out:
> --
> 2.43.0
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-17  3:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16 18:08 [PATCH] wifi: rtl8xxxu: Adjust logging pattern rafad900
2026-08-17  3:16 ` Ping-Ke Shih

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.