From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
UNGLinuxDriver@microchip.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: felix: suppress -EPROBE_DEFER errors
Date: Thu, 07 Apr 2022 16:04:20 +0200 [thread overview]
Message-ID: <cd433399998c2f58884f08b4fc0fd66a@walle.cc> (raw)
In-Reply-To: <20220407135613.rlblrckb2h633bps@skbuf>
Am 2022-04-07 15:56, schrieb Vladimir Oltean:
> On Thu, Apr 07, 2022 at 03:06:25PM +0200, Michael Walle wrote:
>> Due to missing prerequisites the probe of the felix switch might be
>> deferred:
>> [ 4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch:
>> -517
>>
>> It's not an error. Use dev_err_probe() to demote the error to a debug
>> message. While at it, replace all the dev_err()'s in the probe with
>> dev_err_probe().
>>
>> Signed-off-by: Michael Walle <michael@walle.cc>
>> ---
>
> Please limit the dev_err_probe() to dsa_register_switch(). The resource
> that is missing is the DSA master, see of_find_net_device_by_node().
> The others cannot possibly return -EPROBE_DEFER.
This was my rationale (from the function doc):
* Note that it is deemed acceptable to use this function for error
* prints during probe even if the @err is known to never be
-EPROBE_DEFER.
* The benefit compared to a normal dev_err() is the standardized format
* of the error code and the fact that the error code is returned.
In any case I don't have a strong opinion.
>>
>> Should this be a patch with a Fixes tag?
>
> Whichever way you wish, no preference.
I'll limit it to just the one dev_err() and add a Fixes,
there might be scripts out there who greps dmesg for errors.
-michael
next prev parent reply other threads:[~2022-04-07 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 13:06 Michael Walle
2022-04-07 13:56 ` Vladimir Oltean
2022-04-07 14:04 ` Michael Walle [this message]
2022-04-07 14:12 ` Vladimir Oltean
2022-04-07 14:25 ` Michael Walle
2022-04-07 14:58 ` Michael Walle
2022-04-08 2:56 ` Jakub Kicinski
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=cd433399998c2f58884f08b4fc0fd66a@walle.cc \
--to=michael@walle.cc \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®