* [PATCH 1/1] EDAC, mellanox: Remove redundant error printing in bluefield_edac_mc_probe()
@ 2021-05-11 12:18 Zhen Lei
2021-05-31 15:05 ` Borislav Petkov
0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2021-05-11 12:18 UTC (permalink / raw)
To: Shravan Kumar Ramani, Borislav Petkov, Mauro Carvalho Chehab,
Tony Luck, James Morse, Robert Richter, linux-edac
Cc: Zhen Lei
When devm_ioremap_resource() fails, a clear enough error message will be
printed by its subfunction __devm_ioremap_resource(). The error
information contains the device name, failure cause, and possibly resource
information.
Therefore, remove the error printing here to simplify code and reduce the
binary size.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/edac/bluefield_edac.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/edac/bluefield_edac.c b/drivers/edac/bluefield_edac.c
index e4736eb37bfb33d..962d9f889923820 100644
--- a/drivers/edac/bluefield_edac.c
+++ b/drivers/edac/bluefield_edac.c
@@ -283,7 +283,6 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
priv->dimm_per_mc = dimm_count;
priv->emi_base = devm_ioremap_resource(dev, emi_res);
if (IS_ERR(priv->emi_base)) {
- dev_err(dev, "failed to map EMI IO resource\n");
ret = PTR_ERR(priv->emi_base);
goto err;
}
--
2.26.0.106.g9fadedd
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] EDAC, mellanox: Remove redundant error printing in bluefield_edac_mc_probe()
2021-05-11 12:18 [PATCH 1/1] EDAC, mellanox: Remove redundant error printing in bluefield_edac_mc_probe() Zhen Lei
@ 2021-05-31 15:05 ` Borislav Petkov
2021-06-01 1:15 ` Leizhen (ThunderTown)
0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2021-05-31 15:05 UTC (permalink / raw)
To: Zhen Lei
Cc: Shravan Kumar Ramani, Mauro Carvalho Chehab, Tony Luck,
James Morse, Robert Richter, linux-edac
On Tue, May 11, 2021 at 08:18:56PM +0800, Zhen Lei wrote:
> When devm_ioremap_resource() fails, a clear enough error message will be
> printed by its subfunction __devm_ioremap_resource().
In every possible failure case or is there a case where an error won't
be printed and keeping the dev_err() in the driver doesn't hurt at all?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] EDAC, mellanox: Remove redundant error printing in bluefield_edac_mc_probe()
2021-05-31 15:05 ` Borislav Petkov
@ 2021-06-01 1:15 ` Leizhen (ThunderTown)
0 siblings, 0 replies; 3+ messages in thread
From: Leizhen (ThunderTown) @ 2021-06-01 1:15 UTC (permalink / raw)
To: Borislav Petkov
Cc: Shravan Kumar Ramani, Mauro Carvalho Chehab, Tony Luck,
James Morse, Robert Richter, linux-edac
On 2021/5/31 23:05, Borislav Petkov wrote:
> On Tue, May 11, 2021 at 08:18:56PM +0800, Zhen Lei wrote:
>> When devm_ioremap_resource() fails, a clear enough error message will be
>> printed by its subfunction __devm_ioremap_resource().
>
> In every possible failure case or is there a case where an error won't
> be printed and keeping the dev_err() in the driver doesn't hurt at all?
I had sent a patch for the missing case in __devm_ioremap_resource(), but
it seems I was wrong. Please refer to:
https://lkml.org/lkml/2021/5/17/95
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-01 1:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 12:18 [PATCH 1/1] EDAC, mellanox: Remove redundant error printing in bluefield_edac_mc_probe() Zhen Lei
2021-05-31 15:05 ` Borislav Petkov
2021-06-01 1:15 ` Leizhen (ThunderTown)
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.