* [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter
@ 2014-07-05 13:08 Rickard Strandqvist
2014-07-06 17:25 ` Rickard Strandqvist
0 siblings, 1 reply; 4+ messages in thread
From: Rickard Strandqvist @ 2014-07-05 13:08 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Rickard Strandqvist, Jingoo Han,
Daniel Vetter, Laurent Pinchart, Rob Clark, David Ung,
linux-fbdev, linux-kernel
From: Rickard Strandqvist <rickard.strandqvist@sonymobile.com>
Removal of assignment of function parameter, that has no effect outside the function
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/core/fbmon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 5b0e313..71ec1ab 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1481,7 +1481,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
}
void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
- specs = NULL;
}
void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter
2014-07-05 13:08 [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter Rickard Strandqvist
@ 2014-07-06 17:25 ` Rickard Strandqvist
2014-07-07 20:43 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Rickard Strandqvist @ 2014-07-06 17:25 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Jingoo Han, Daniel Vetter, Laurent Pinchart,
Rob Clark, David Ung, linux-fbdev, linux-kernel
Remove assignment of function parameter, that has no effect outside the function
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/core/fbmon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 5b0e313..71ec1ab 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1481,7 +1481,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
}
void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
- specs = NULL;
}
void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
{
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter
2014-07-06 17:25 ` Rickard Strandqvist
@ 2014-07-07 20:43 ` Geert Uytterhoeven
2014-07-07 20:52 ` Rickard Strandqvist
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-07-07 20:43 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Laurent Pinchart, Rob Clark, David Ung,
Linux Fbdev development list, linux-kernel@vger.kernel.org
On Sun, Jul 6, 2014 at 7:25 PM, Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se> wrote:
> Remove assignment of function parameter, that has no effect outside the function
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/video/fbdev/core/fbmon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
> index 5b0e313..71ec1ab 100644
> --- a/drivers/video/fbdev/core/fbmon.c
> +++ b/drivers/video/fbdev/core/fbmon.c
> @@ -1481,7 +1481,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
> }
> void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
> - specs = NULL;
I guess the intention was:
memset(specs, 0, sizeof(struct fb_monspecs));
> }
> void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> {
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter
2014-07-07 20:43 ` Geert Uytterhoeven
@ 2014-07-07 20:52 ` Rickard Strandqvist
0 siblings, 0 replies; 4+ messages in thread
From: Rickard Strandqvist @ 2014-07-07 20:52 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Laurent Pinchart, Rob Clark, David Ung,
Linux Fbdev development list, linux-kernel@vger.kernel.org
2014-07-07 22:43 GMT+02:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> On Sun, Jul 6, 2014 at 7:25 PM, Rickard Strandqvist
> <rickard_strandqvist@spectrumdigital.se> wrote:
>> Remove assignment of function parameter, that has no effect outside the function
>>
>> This was found using a static code analysis program called cppcheck
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>> ---
>> drivers/video/fbdev/core/fbmon.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
>> index 5b0e313..71ec1ab 100644
>> --- a/drivers/video/fbdev/core/fbmon.c
>> +++ b/drivers/video/fbdev/core/fbmon.c
>> @@ -1481,7 +1481,6 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var)
>> }
>> void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>> {
>> - specs = NULL;
>
> I guess the intention was:
>
> memset(specs, 0, sizeof(struct fb_monspecs));
Hi Geert!
Yeah, maybe. Just looks to be a little too elementary mistake..?
But do you want me to change it to that?
With a:
if(specs)
memset()
maybe..?
Kind regards
Rickard Strandqvist
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-07 20:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05 13:08 [PATCH] video: fbdev: core: fbmon.c: Cleaning up useless assignment of function parameter Rickard Strandqvist
2014-07-06 17:25 ` Rickard Strandqvist
2014-07-07 20:43 ` Geert Uytterhoeven
2014-07-07 20:52 ` Rickard Strandqvist
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).