From: David Miller <davem@davemloft.net>
To: fthain@telegraphics.com.au
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 3/9] net/mac89x0: Fix and modernize log messages
Date: Thu, 05 Oct 2017 21:08:42 -0700 (PDT) [thread overview]
Message-ID: <20171005.210842.1348457661309929796.davem@davemloft.net> (raw)
In-Reply-To: <e9fb341944d187cabf1ccef78cfdc9de64e3f158.1507211120.git.fthain@telegraphics.com.au>
From: Finn Thain <fthain@telegraphics.com.au>
Date: Thu, 5 Oct 2017 21:11:05 -0400 (EDT)
> Fix misplaced newlines in conditional log messages.
Please don't do this, the way the author formatted the strings
was intentional, they intended to print out:
NAME: cs89%c0%s rev %c found at %#8lx IRQ %d ADDR %pM
But now you are splitting it into multiple lines. Also, you're
printing the IRQ information after register_netdev() which is
bad. As soon as register_netdev() is called, the driver's
->open() routine can be invoked, and during which time some
log messages could be emitted during that operation.
And that would cut the probe messages up.
I know how you got to this state, you saw a reference to dev->name
before it had a real value. You just removed the "eth%d" string
entirely. And since you removed the dev->name reference, you had
no reason to move log messages after register_netdev() at all.
Anyways, you can also see the intention of the author here becuase
they have _explicit_ leading newlines in the error path messages that
come after the inital probe printk.
The real way to fix the early dev->name reference is to replace it
with a dev_info() call and have it use the struct device name rather
than the netdev device one.
Again, I think you really shouldn't be making these small weird
changes to these old drivers.
next prev parent reply other threads:[~2017-10-06 4:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 1:11 [PATCH net v2 0/9] Fixes, cleanup and modernization for some legacy ethernet NIC drivers Finn Thain
2017-10-06 1:11 ` [PATCH net v2 1/9] net/smc9194: Remove bogus CONFIG_MAC reference Finn Thain
2017-10-06 1:11 ` [PATCH net v2 3/9] net/mac89x0: Fix and modernize log messages Finn Thain
2017-10-06 4:08 ` David Miller [this message]
2017-10-06 11:06 ` Finn Thain
2017-10-06 1:11 ` [PATCH net v2 6/9] net/sonic: Cleanup " Finn Thain
2017-10-06 1:11 ` [PATCH net v2 2/9] net/mac89x0: Remove dead or unreachable code Finn Thain
2017-10-06 1:11 ` [PATCH net v2 4/9] net/mac89x0: Replace custom debug logging with netif_* calls Finn Thain
2017-10-06 1:11 ` [PATCH net v2 5/9] net/macmace: Fix and cleanup log messages Finn Thain
2017-10-06 1:11 ` [PATCH net v2 9/9] net/mac8390: Fix " Finn Thain
2017-10-06 1:11 ` [PATCH net v2 8/9] net/8390: Fix redundant code Finn Thain
2017-10-06 1:11 ` [PATCH net v2 7/9] net/sonic: Replace custom debug logging with netif_* calls Finn Thain
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=20171005.210842.1348457661309929796.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=fthain@telegraphics.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).