netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level
@ 2024-10-16 20:29 Heiner Kallweit
  2024-10-17 15:54 ` Simon Horman
  2024-10-20 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2024-10-16 20:29 UTC (permalink / raw)
  To: Realtek linux nic maintainers, Jakub Kicinski, Paolo Abeni,
	David Miller, Eric Dumazet
  Cc: netdev@vger.kernel.org

In case of a problem with firmware loading we inform at the driver level,
in addition the firmware load code itself issues warnings. Therefore
switch to firmware_request_nowarn() to avoid duplicated error messages.
In addition switch to warn level because the firmware is optional and
typically just fixes compatibility issues.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_firmware.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_firmware.c b/drivers/net/ethernet/realtek/r8169_firmware.c
index ed6e721b1..bf055078a 100644
--- a/drivers/net/ethernet/realtek/r8169_firmware.c
+++ b/drivers/net/ethernet/realtek/r8169_firmware.c
@@ -215,7 +215,7 @@ int rtl_fw_request_firmware(struct rtl_fw *rtl_fw)
 {
 	int rc;
 
-	rc = request_firmware(&rtl_fw->fw, rtl_fw->fw_name, rtl_fw->dev);
+	rc = firmware_request_nowarn(&rtl_fw->fw, rtl_fw->fw_name, rtl_fw->dev);
 	if (rc < 0)
 		goto out;
 
@@ -227,7 +227,7 @@ int rtl_fw_request_firmware(struct rtl_fw *rtl_fw)
 
 	return 0;
 out:
-	dev_err(rtl_fw->dev, "Unable to load firmware %s (%d)\n",
-		rtl_fw->fw_name, rc);
+	dev_warn(rtl_fw->dev, "Unable to load firmware %s (%d)\n",
+		 rtl_fw->fw_name, rc);
 	return rc;
 }
-- 
2.47.0


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

* Re: [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level
  2024-10-16 20:29 [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level Heiner Kallweit
@ 2024-10-17 15:54 ` Simon Horman
  2024-10-20 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-10-17 15:54 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Realtek linux nic maintainers, Jakub Kicinski, Paolo Abeni,
	David Miller, Eric Dumazet, netdev@vger.kernel.org

On Wed, Oct 16, 2024 at 10:29:39PM +0200, Heiner Kallweit wrote:
> In case of a problem with firmware loading we inform at the driver level,
> in addition the firmware load code itself issues warnings. Therefore
> switch to firmware_request_nowarn() to avoid duplicated error messages.
> In addition switch to warn level because the firmware is optional and
> typically just fixes compatibility issues.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Thanks,

I agree that this is an appropriate use of firmware_request_nowarn()
which allows for uniform logging of error conditions by
rtl_fw_request_firmware().

I also agree that warnings are sufficient.

Reviewed-by: Simon Horman <horms@kernel.org>

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

* Re: [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level
  2024-10-16 20:29 [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level Heiner Kallweit
  2024-10-17 15:54 ` Simon Horman
@ 2024-10-20 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-20 16:10 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: nic_swsd, kuba, pabeni, davem, edumazet, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:

On Wed, 16 Oct 2024 22:29:39 +0200 you wrote:
> In case of a problem with firmware loading we inform at the driver level,
> in addition the firmware load code itself issues warnings. Therefore
> switch to firmware_request_nowarn() to avoid duplicated error messages.
> In addition switch to warn level because the firmware is optional and
> typically just fixes compatibility issues.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level
    https://git.kernel.org/netdev/net-next/c/1c105bacb160

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-10-20 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 20:29 [PATCH net-next] r8169: avoid duplicated messages if loading firmware fails and switch to warn level Heiner Kallweit
2024-10-17 15:54 ` Simon Horman
2024-10-20 16:10 ` patchwork-bot+netdevbpf

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).