From: Dave Jiang <dave.jiang@intel.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>,
Brett Creeley <brett.creeley@amd.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Saeed Mahameed <saeedm@nvidia.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
"open list:FWCTL PDS DRIVER" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pds_fwctl: Remove the use of dev_err_probe()
Date: Wed, 20 Aug 2025 08:03:24 -0700 [thread overview]
Message-ID: <7350db53-d5e6-4b3e-8686-3749353725a0@intel.com> (raw)
In-Reply-To: <20250820124011.474224-1-liaoyuanhong@vivo.com>
On 8/20/25 5:40 AM, Liao Yuanhong wrote:
> Logging messages that show some type of "out of memory" error are generally
> unnecessary as there is a generic message and a stack dump done by the
> memory subsystem. These messages generally increase kernel size without
> much added value[1].
>
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
> remove the useless call to dev_err_probe(), and just return the value
> instead.
>
> [1]: https://lore.kernel.org/lkml/1402419340.30479.18.camel@joe-AO725/
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/fwctl/pds/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c
> index 9b9d1f6b5556..8dd659aee256 100644
> --- a/drivers/fwctl/pds/main.c
> +++ b/drivers/fwctl/pds/main.c
> @@ -481,7 +481,7 @@ static int pdsfc_probe(struct auxiliary_device *adev,
> pdsfc = fwctl_alloc_device(&padev->vf_pdev->dev, &pdsfc_ops,
> struct pdsfc_dev, fwctl);
> if (!pdsfc)
> - return dev_err_probe(dev, -ENOMEM, "Failed to allocate fwctl device struct\n");
> + return -ENOMEM;
> pdsfc->padev = padev;
>
> err = pdsfc_identify(pdsfc);
next prev parent reply other threads:[~2025-08-20 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 12:40 [PATCH] pds_fwctl: Remove the use of dev_err_probe() Liao Yuanhong
2025-08-20 13:48 ` Jonathan Cameron
2025-08-20 15:03 ` Dave Jiang [this message]
2025-08-20 16:27 ` Brett Creeley
2025-08-22 13:15 ` Jason Gunthorpe
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=7350db53-d5e6-4b3e-8686-3749353725a0@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=brett.creeley@amd.com \
--cc=jgg@ziepe.ca \
--cc=liaoyuanhong@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=saeedm@nvidia.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