From: Jakub Kicinski <kuba@kernel.org>
To: David Thompson <davthompson@nvidia.com>
Cc: <bryan.whitehead@microchip.com>, <UNGLinuxDriver@microchip.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: lan743x: avoid netdev-based logging before netdev registration
Date: Tue, 19 May 2026 18:41:15 -0700 [thread overview]
Message-ID: <20260519184115.3c70f2ac@kernel.org> (raw)
In-Reply-To: <20260515215229.3881949-1-davthompson@nvidia.com>
On Fri, 15 May 2026 21:52:29 +0000 David Thompson wrote:
> This patch updates the lan743x driver to prevent the use of netdev-based
> logging APIs (such as netdev_dbg) before the network device has been
> successfully registered. Using netdev-based logging prior to registration
> results in log messages referencing "(unnamed net_device) (uninitialized)",
> which can be confusing and less informative.
>
> The driver must use netif_msg_x APIs and device-based logging (e.g. dev_dbg)
> until netdev registration is complete. This ensures log entries are
> associated with the correct device context and improves log clarity. After
> registration, netdev-based logging APIs can be used safely.
>
> Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Not a fix
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> ---
> drivers/net/ethernet/microchip/lan743x_main.c | 72 ++++++++++++-------
> 1 file changed, 45 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> index f3332417162e..53492573f08d 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -108,9 +108,10 @@ static int lan743x_pci_init(struct lan743x_adapter *adapter,
> if (ret)
> goto return_error;
>
> - netif_info(adapter, probe, adapter->netdev,
> - "PCI: Vendor ID = 0x%04X, Device ID = 0x%04X\n",
> - pdev->vendor, pdev->device);
> + if (netif_msg_probe(adapter))
please drop these checks. They are always true.
And the message categorization is not encouraged.
--
pw-bot: cr
next prev parent reply other threads:[~2026-05-20 1:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 21:52 [PATCH net] net: lan743x: avoid netdev-based logging before netdev registration David Thompson
2026-05-20 1:41 ` Jakub Kicinski [this message]
2026-05-20 19:59 ` David Thompson
2026-05-27 17:27 ` David Thompson
2026-05-27 21:56 ` Jakub Kicinski
2026-05-28 14:36 ` David Thompson
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=20260519184115.3c70f2ac@kernel.org \
--to=kuba@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.