* [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used
@ 2014-07-05 12:51 Rickard Strandqvist
2014-07-06 19:01 ` Rickard Strandqvist
2014-07-21 21:25 ` Pavel Machek
0 siblings, 2 replies; 5+ messages in thread
From: Rickard Strandqvist @ 2014-07-05 12:51 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Rickard Strandqvist, Wang YanQing,
Jingoo Han, Evgeniy Polyakov, Joe Perches, Sachin Kamat,
David Fries, linux-fbdev, linux-kernel
From: Rickard Strandqvist <rickard.strandqvist@sonymobile.com>
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/uvesafb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 509d452..50086b9 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -555,12 +555,12 @@ static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
struct uvesafb_par *par)
{
- int i, err;
+ int i;
uvesafb_reset(task);
task->t.regs.eax = 0x4f0a;
task->t.regs.ebx = 0x0;
- err = uvesafb_exec(task);
+ uvesafb_exec(task);
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
par->pmi_setpal = par->ypan = 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used
2014-07-05 12:51 [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used Rickard Strandqvist
@ 2014-07-06 19:01 ` Rickard Strandqvist
2014-07-21 21:25 ` Pavel Machek
1 sibling, 0 replies; 5+ messages in thread
From: Rickard Strandqvist @ 2014-07-06 19:01 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Wang YanQing, Jingoo Han, Evgeniy Polyakov,
Joe Perches, Sachin Kamat, linux-fbdev, linux-kernel
Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/uvesafb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
index 509d452..50086b9 100644
--- a/drivers/video/fbdev/uvesafb.c
+++ b/drivers/video/fbdev/uvesafb.c
@@ -555,12 +555,12 @@ static int uvesafb_vbe_getmodes(struct uvesafb_ktask *task,
static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task,
struct uvesafb_par *par)
{
- int i, err;
+ int i;
uvesafb_reset(task);
task->t.regs.eax = 0x4f0a;
task->t.regs.ebx = 0x0;
- err = uvesafb_exec(task);
+ uvesafb_exec(task);
if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) {
par->pmi_setpal = par->ypan = 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used
2014-07-05 12:51 [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used Rickard Strandqvist
2014-07-06 19:01 ` Rickard Strandqvist
@ 2014-07-21 21:25 ` Pavel Machek
[not found] ` <CAFo99gYhrNR68mdJY=fn1x-+4U=6gdv=C4-Xn-w-YJAPSa5bBQ@mail.gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2014-07-21 21:25 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
Rickard Strandqvist, Wang YanQing, Jingoo Han, Evgeniy Polyakov,
Joe Perches, Sachin Kamat, David Fries, linux-fbdev, linux-kernel
On Sat 2014-07-05 14:51:22, Rickard Strandqvist wrote:
> From: Rickard Strandqvist <rickard.strandqvist@sonymobile.com>
>
> Variable ar assigned a value that is never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
Are you sure this is right fix?
Should we be returning the error when there's error?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-23 20:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05 12:51 [PATCH] video: fbdev: uvesafb.c: Cleaning up variable that is never used Rickard Strandqvist
2014-07-06 19:01 ` Rickard Strandqvist
2014-07-21 21:25 ` Pavel Machek
[not found] ` <CAFo99gYhrNR68mdJY=fn1x-+4U=6gdv=C4-Xn-w-YJAPSa5bBQ@mail.gmail.com>
2014-07-22 9:27 ` Pavel Machek
2014-07-23 20:37 ` 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).