From: Mihai Sain <mihai.sain@microchip.com>
To: <ajay.kathat@microchip.com>, <claudiu.beznea@tuxon.dev>
Cc: <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Mihai Sain" <mihai.sain@microchip.com>
Subject: [PATCH 6/6] wifi: wilc1000: Use device-specific logging
Date: Mon, 23 Nov 2026 15:41:20 +0200 [thread overview]
Message-ID: <20261123134120.32638-7-mihai.sain@microchip.com> (raw)
In-Reply-To: <20261123134120.32638-1-mihai.sain@microchip.com>
Replace pr_err(), pr_warn() and pr_debug() with their
device-specific counterparts dev_err(), dev_warn() and
dev_dbg().
This ensures that log messages are associated with the
corresponding device, making debugging easier, especially
when multiple devices are present.
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
.../net/wireless/microchip/wilc1000/wlan.c | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 55a77a2e3288..2aece4ec1a33 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -575,7 +575,7 @@ static int chip_allow_sleep_wilc1000(struct wilc *wilc)
break;
}
if (!trials)
- pr_warn("FW not responding\n");
+ dev_warn(wilc->dev, "FW not responding\n");
/* Clear bit 1 */
ret = hif_func->hif_read_reg(wilc, wakeup_reg, ®);
@@ -676,7 +676,8 @@ static int chip_wakeup_wilc1000(struct wilc *wilc)
ret = hif_func->hif_read_reg(wilc, clk_status_reg,
&clk_status_val);
if (ret) {
- pr_err("Bus error %d %x\n", ret, clk_status_val);
+ dev_err(wilc->dev, "Bus error %d %x\n", ret,
+ clk_status_val);
return ret;
}
if (clk_status_val & clk_status_bit)
@@ -685,7 +686,7 @@ static int chip_wakeup_wilc1000(struct wilc *wilc)
trials++;
}
if (trials >= WAKE_UP_TRIAL_RETRY) {
- pr_err("Failed to wake-up the chip\n");
+ dev_err(wilc->dev, "Failed to wake-up the chip\n");
return -ETIMEDOUT;
}
/* Sometimes spi fail to read clock regs after reading
@@ -1270,7 +1271,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
return -EIO;
offset = 0;
- pr_debug("%s: Downloading firmware size = %d\n", __func__, buffer_size);
+ dev_dbg(wilc->dev, "%s: Downloading firmware size = %d\n", __func__,
+ buffer_size);
ret = acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
if (ret)
@@ -1281,7 +1283,7 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®);
if (reg & BIT(10))
- pr_err("%s: Failed to reset\n", __func__);
+ dev_err(wilc->dev, "%s: Failed to reset\n", __func__);
ret = release_bus(wilc, WILC_BUS_RELEASE_ONLY);
if (ret)
@@ -1313,10 +1315,10 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
ret = rv;
if (ret) {
- pr_err("%s Bus error\n", __func__);
+ dev_err(wilc->dev, "%s Bus error\n", __func__);
goto fail;
}
- pr_debug("%s Offset = %d\n", __func__, offset);
+ dev_dbg(wilc->dev, "%s Offset = %d\n", __func__, offset);
} while (offset < buffer_size);
fail:
@@ -1711,14 +1713,14 @@ int wilc_load_mac_from_nv(struct wilc *wl)
WILC_NVMEM_BANK_BASE + bank_offset,
®1);
if (ret) {
- pr_err("Can not read address %d lower part", i);
+ dev_err(wl->dev, "Can not read address %d lower part", i);
break;
}
ret = wl->hif_func->hif_read_reg(wl,
WILC_NVMEM_BANK_BASE + bank_offset + 4,
®2);
if (ret) {
- pr_err("Can not read address %d upper part", i);
+ dev_err(wl->dev, "Can not read address %d upper part", i);
break;
}
--
2.56.1
prev parent reply other threads:[~2026-11-23 13:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 13:41 [PATCH 0/6] wifi: wilc1000: Improve error logging Mihai Sain
2026-11-23 13:41 ` [PATCH 1/6] wifi: wilc1000: Use netdev_err() for WoWLAN trigger errors Mihai Sain
2026-11-23 13:41 ` [PATCH 2/6] wifi: wilc1000: Use wiphy_err() for interface limit error Mihai Sain
2026-11-23 13:41 ` [PATCH 3/6] wifi: wilc1000: Use device-specific logging for interrupt errors Mihai Sain
2026-11-23 13:41 ` [PATCH 4/6] wifi: wilc1000: Use device-specific error logging Mihai Sain
2026-11-23 13:41 ` [PATCH 5/6] wifi: wilc1000: Use device-specific error logging for MAC address retrieval failure Mihai Sain
2026-11-23 13:41 ` Mihai Sain [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=20261123134120.32638-7-mihai.sain@microchip.com \
--to=mihai.sain@microchip.com \
--cc=ajay.kathat@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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