* [PATCH v2] edac: remove redundant error print in xgene_edac_probe
@ 2021-01-12 10:35 menglong8.dong
2021-01-12 11:40 ` Robert Richter
2021-01-19 9:32 ` Borislav Petkov
0 siblings, 2 replies; 3+ messages in thread
From: menglong8.dong @ 2021-01-12 10:35 UTC (permalink / raw)
To: rric
Cc: khuong, bp, mchehab, tony.luck, james.morse, linux-edac,
linux-kernel, Menglong Dong
From: Menglong Dong <dong.menglong@zte.com.cn>
Coccinelle reports a redundant error print in xgene_edac_probe.
As 'platform_get_irq' already prints the error message, error
print here is redundant.
Fix it by using 'platform_get_irq_optional' in place of
'platform_get_irq', as Robert suggested.
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
---
v2:
- use 'platform_get_irq_optional' instead of 'platform_get_irq'
---
drivers/edac/xgene_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index 1d2c27a00a4a..2ccd1db5e98f 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1916,7 +1916,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
int i;
for (i = 0; i < 3; i++) {
- irq = platform_get_irq(pdev, i);
+ irq = platform_get_irq_optional(pdev, i);
if (irq < 0) {
dev_err(&pdev->dev, "No IRQ resource\n");
rc = -EINVAL;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] edac: remove redundant error print in xgene_edac_probe
2021-01-12 10:35 [PATCH v2] edac: remove redundant error print in xgene_edac_probe menglong8.dong
@ 2021-01-12 11:40 ` Robert Richter
2021-01-19 9:32 ` Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: Robert Richter @ 2021-01-12 11:40 UTC (permalink / raw)
To: menglong8.dong
Cc: khuong, bp, mchehab, tony.luck, james.morse, linux-edac,
linux-kernel, Menglong Dong
On 12.01.21 02:35:40, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
>
> Coccinelle reports a redundant error print in xgene_edac_probe.
> As 'platform_get_irq' already prints the error message, error
> print here is redundant.
>
> Fix it by using 'platform_get_irq_optional' in place of
> 'platform_get_irq', as Robert suggested.
>
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> ---
> v2:
> - use 'platform_get_irq_optional' instead of 'platform_get_irq'
> ---
Reviewed-by: Robert Richter <rric@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] edac: remove redundant error print in xgene_edac_probe
2021-01-12 10:35 [PATCH v2] edac: remove redundant error print in xgene_edac_probe menglong8.dong
2021-01-12 11:40 ` Robert Richter
@ 2021-01-19 9:32 ` Borislav Petkov
1 sibling, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2021-01-19 9:32 UTC (permalink / raw)
To: menglong8.dong
Cc: rric, khuong, mchehab, tony.luck, james.morse, linux-edac,
linux-kernel, Menglong Dong
On Tue, Jan 12, 2021 at 02:35:40AM -0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
>
> Coccinelle reports a redundant error print in xgene_edac_probe.
> As 'platform_get_irq' already prints the error message, error
> print here is redundant.
>
> Fix it by using 'platform_get_irq_optional' in place of
> 'platform_get_irq', as Robert suggested.
>
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> ---
> v2:
> - use 'platform_get_irq_optional' instead of 'platform_get_irq'
> ---
> drivers/edac/xgene_edac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
> index 1d2c27a00a4a..2ccd1db5e98f 100644
> --- a/drivers/edac/xgene_edac.c
> +++ b/drivers/edac/xgene_edac.c
> @@ -1916,7 +1916,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
> int i;
>
> for (i = 0; i < 3; i++) {
> - irq = platform_get_irq(pdev, i);
> + irq = platform_get_irq_optional(pdev, i);
> if (irq < 0) {
> dev_err(&pdev->dev, "No IRQ resource\n");
> rc = -EINVAL;
> --
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-19 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 10:35 [PATCH v2] edac: remove redundant error print in xgene_edac_probe menglong8.dong
2021-01-12 11:40 ` Robert Richter
2021-01-19 9:32 ` Borislav Petkov
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).