From: Waqar Hameed <waqar.hameed@axis.com>
To: Wei Fang <wei.fang@nxp.com>
Cc: "kernel@axis.com" <kernel@axis.com>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v2] net: enetc: Remove error print for devm_add_action_or_reset()
Date: Tue, 5 Aug 2025 12:41:28 +0200 [thread overview]
Message-ID: <pndikj2kq3r.a.out@axis.com> (raw)
In-Reply-To: <PAXPR04MB85106B490CE2569F661F5F538822A@PAXPR04MB8510.eurprd04.prod.outlook.com> (Wei Fang's message of "Tue, 5 Aug 2025 09:41:34 +0000")
On Tue, Aug 05, 2025 at 09:41 +0000 Wei Fang <wei.fang@nxp.com> wrote:
>> When `devm_add_action_or_reset()` fails, it is due to a failed memory
>> allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
>> anything when error is `-ENOMEM`. Therefore, remove the useless call to
>> `dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
>> return the value instead.
>>
>> Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
>> ---
>> Changes in v2:
>>
>> * Split the patch to one seperate patch for each sub-system.
>>
>> Link to v1:
>> https://lore.kern/
>> el.org%2Fall%2Fpnd7c0s6ji2.fsf%40axis.com%2F&data=05%7C02%7Cwei.fang%
>> 40nxp.com%7C5c6c1234f2944165bdbe08ddd4032c43%7C686ea1d3bc2b4c6fa9
>> 2cd99c5c301635%7C0%7C0%7C638899832279054100%7CUnknown%7CTWFpb
>> GZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIs
>> IkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=7ejNp6ZnP7B9o
>> gBefpQdq1%2BGCH9vqHogvsU%2FcJZbWzo%3D&reserved=0
>>
>> drivers/net/ethernet/freescale/enetc/enetc4_pf.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
>> b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
>> index b3dc1afeefd1..38fb81db48c2 100644
>> --- a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
>> +++ b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
>> @@ -1016,8 +1016,7 @@ static int enetc4_pf_probe(struct pci_dev *pdev,
>>
>> err = devm_add_action_or_reset(dev, enetc4_pci_remove, pdev);
>> if (err)
>> - return dev_err_probe(dev, err,
>> - "Add enetc4_pci_remove() action failed\n");
>> + return err;
>>
>> /* si is the private data. */
>> si = pci_get_drvdata(pdev);
>>
>> base-commit: 260f6f4fda93c8485c8037865c941b42b9cba5d2
>> --
>> 2.39.5
>
> HI Waqar,
>
> The net-next tree is closed until Aug 11th, please resend this patch when it
> is open. :)
Oh ok, I'll resend it next week then. Thanks for the information!
prev parent reply other threads:[~2025-08-05 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 9:33 Waqar Hameed
2025-08-05 9:41 ` Wei Fang
2025-08-05 10:41 ` Waqar Hameed [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=pndikj2kq3r.a.out@axis.com \
--to=waqar.hameed@axis.com \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kernel@axis.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@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®