* [PATCH] video: fbdev: imxfb: Fix an error message
@ 2021-05-06 18:57 Christophe JAILLET
2021-05-07 5:05 ` Uwe Kleine-König
0 siblings, 1 reply; 5+ messages in thread
From: Christophe JAILLET @ 2021-05-06 18:57 UTC (permalink / raw)
To: s.hauer, kernel, shawnguo, festevam, linux-imx, j.beisert, krzysztof.h1
Cc: linux-fbdev, linux-arm-kernel, dri-devel, linux-kernel,
kernel-janitors, Christophe JAILLET
'ret' is known to be 0 here.
No error code is available, so just remove it from the error message.
Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index 7f8debd2da06..ad598257ab38 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)
info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
&fbi->map_dma, GFP_KERNEL);
if (!info->screen_buffer) {
- dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
+ dev_err(&pdev->dev, "Failed to allocate video RAM\n");
ret = -ENOMEM;
goto failed_map;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: imxfb: Fix an error message
2021-05-06 18:57 [PATCH] video: fbdev: imxfb: Fix an error message Christophe JAILLET
@ 2021-05-07 5:05 ` Uwe Kleine-König
2021-05-07 7:11 ` Christophe JAILLET
2021-05-07 16:34 ` Daniel Vetter
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2021-05-07 5:05 UTC (permalink / raw)
To: Christophe JAILLET
Cc: s.hauer, kernel, shawnguo, festevam, linux-imx, j.beisert,
krzysztof.h1, linux-fbdev, kernel-janitors, linux-kernel,
dri-devel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]
Hello Christophe,
On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
> 'ret' is known to be 0 here.
> No error code is available, so just remove it from the error message.
>
> Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/video/fbdev/imxfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index 7f8debd2da06..ad598257ab38 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)
> info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
> &fbi->map_dma, GFP_KERNEL);
> if (!info->screen_buffer) {
> - dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
> + dev_err(&pdev->dev, "Failed to allocate video RAM\n");
> ret = -ENOMEM;
> goto failed_map;
> }
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Are you using this driver, or did you find that problem using some
static checker?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: imxfb: Fix an error message
2021-05-07 5:05 ` Uwe Kleine-König
@ 2021-05-07 7:11 ` Christophe JAILLET
2021-05-07 8:20 ` Uwe Kleine-König
2021-05-07 16:34 ` Daniel Vetter
1 sibling, 1 reply; 5+ messages in thread
From: Christophe JAILLET @ 2021-05-07 7:11 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: s.hauer, kernel, shawnguo, festevam, linux-imx, j.beisert,
krzysztof.h1, linux-fbdev, kernel-janitors, linux-kernel,
dri-devel, linux-arm-kernel
Le 07/05/2021 à 07:05, Uwe Kleine-König a écrit :
> Hello Christophe,
>
> On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
>> 'ret' is known to be 0 here.
>> No error code is available, so just remove it from the error message.
>>
>> Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> drivers/video/fbdev/imxfb.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
>> index 7f8debd2da06..ad598257ab38 100644
>> --- a/drivers/video/fbdev/imxfb.c
>> +++ b/drivers/video/fbdev/imxfb.c
>> @@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)
>> info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
>> &fbi->map_dma, GFP_KERNEL);
>> if (!info->screen_buffer) {
>> - dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
>> + dev_err(&pdev->dev, "Failed to allocate video RAM\n");
>> ret = -ENOMEM;
>> goto failed_map;
>> }
>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Are you using this driver, or did you find that problem using some
> static checker?
>
No, I'm not using this driver AFAIK.
It has been spotted by coccinelle with a hand-made script which tries to
find places where error code is used before being initialized.
The script in it-self is not really interesting. It is easy to write and
my own version trigger way to much false positives.
CJ
> Best regards
> Uwe
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: imxfb: Fix an error message
2021-05-07 7:11 ` Christophe JAILLET
@ 2021-05-07 8:20 ` Uwe Kleine-König
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2021-05-07 8:20 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-fbdev, shawnguo, s.hauer, kernel-janitors, dri-devel,
linux-kernel, j.beisert, linux-imx, kernel, festevam,
linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]
Hello Christophe,
[dropping krzysztof.h1@poczta.fm from recipents, the address doesn't
seem to exist]
On Fri, May 07, 2021 at 09:11:19AM +0200, Christophe JAILLET wrote:
> Le 07/05/2021 à 07:05, Uwe Kleine-König a écrit :
> > On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
> > > 'ret' is known to be 0 here.
> > > No error code is available, so just remove it from the error message.
> > >
> > > Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > > ---
> > > drivers/video/fbdev/imxfb.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> > > index 7f8debd2da06..ad598257ab38 100644
> > > --- a/drivers/video/fbdev/imxfb.c
> > > +++ b/drivers/video/fbdev/imxfb.c
> > > @@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)
> > > info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
> > > &fbi->map_dma, GFP_KERNEL);
> > > if (!info->screen_buffer) {
> > > - dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
> > > + dev_err(&pdev->dev, "Failed to allocate video RAM\n");
> > > ret = -ENOMEM;
> > > goto failed_map;
> > > }
> >
> > Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >
> > Are you using this driver, or did you find that problem using some
> > static checker?
>
> No, I'm not using this driver AFAIK.
OK, thanks. (We're working on a DRM driver for this hardware. So you
could have been an interested tester.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: imxfb: Fix an error message
2021-05-07 5:05 ` Uwe Kleine-König
2021-05-07 7:11 ` Christophe JAILLET
@ 2021-05-07 16:34 ` Daniel Vetter
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2021-05-07 16:34 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Christophe JAILLET, linux-fbdev, shawnguo, s.hauer,
kernel-janitors, krzysztof.h1, dri-devel, linux-kernel,
j.beisert, linux-imx, kernel, linux-arm-kernel
On Fri, May 07, 2021 at 07:05:03AM +0200, Uwe Kleine-König wrote:
> Hello Christophe,
>
> On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote:
> > 'ret' is known to be 0 here.
> > No error code is available, so just remove it from the error message.
> >
> > Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > drivers/video/fbdev/imxfb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> > index 7f8debd2da06..ad598257ab38 100644
> > --- a/drivers/video/fbdev/imxfb.c
> > +++ b/drivers/video/fbdev/imxfb.c
> > @@ -992,7 +992,7 @@ static int imxfb_probe(struct platform_device *pdev)
> > info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
> > &fbi->map_dma, GFP_KERNEL);
> > if (!info->screen_buffer) {
> > - dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
> > + dev_err(&pdev->dev, "Failed to allocate video RAM\n");
> > ret = -ENOMEM;
> > goto failed_map;
> > }
>
> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thanks for patch& review, queued for 5.14 in drm-misc-next.
-Daniel
>
> Are you using this driver, or did you find that problem using some
> static checker?
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-07 16:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 18:57 [PATCH] video: fbdev: imxfb: Fix an error message Christophe JAILLET
2021-05-07 5:05 ` Uwe Kleine-König
2021-05-07 7:11 ` Christophe JAILLET
2021-05-07 8:20 ` Uwe Kleine-König
2021-05-07 16:34 ` Daniel Vetter
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).