linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Rickard Strandqvist <rickard.strandqvist@sonymobile.com>,
	Jingoo Han <jg1.han@samsung.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"Chen, Gong" <gong.chen@linux.intel.com>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sis: init.c:  Cleaning up variable that is never used
Date: Sat, 05 Jul 2014 19:23:18 +0000	[thread overview]
Message-ID: <20140705192317.GD25934@mwanda> (raw)
In-Reply-To: <1404564507-21718-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

On Sat, Jul 05, 2014 at 02:48:27PM +0200, Rickard Strandqvist wrote:
> From: Rickard Strandqvist <rickard.strandqvist@sonymobile.com>

These for lines are for when you are sending on someone else's behalf.

> 
> 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/sis/init.c |   21 +++++----------------
>  1 file changed, 5 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
> index bd40f5e..3ba446c 100644
> --- a/drivers/video/fbdev/sis/init.c
> +++ b/drivers/video/fbdev/sis/init.c
> @@ -2649,7 +2649,7 @@ static void
>  SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
>  		unsigned short ModeIdIndex, unsigned short RRTI)
>  {
> -   unsigned short data, infoflag = 0, modeflag, resindex;
> +   unsigned short data, infoflag = 0, modeflag;
>  #ifdef CONFIG_FB_SIS_315
>     unsigned char  *ROMAddr  = SiS_Pr->VirtualRomBase;
>     unsigned short data2, data3;
> @@ -2660,7 +2660,7 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
>     if(SiS_Pr->UseCustomMode) {
>        infoflag = SiS_Pr->CInfoFlag;
>     } else {
> -      resindex = SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);
> +      SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex);

Remove this whole line.

regards,
dan carpenter


  reply	other threads:[~2014-07-05 19:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 21:15 [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Rickard Strandqvist
2014-07-05 12:48 ` [PATCH] video: fbdev: sis: init.c: Cleaning up variable that is never used Rickard Strandqvist
2014-07-05 19:23   ` Dan Carpenter [this message]
2014-07-05 19:44     ` Geert Uytterhoeven
2014-07-05 20:04       ` Dan Carpenter
2014-07-05 20:12         ` Dan Carpenter
2014-07-07  7:57 ` [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Dan Carpenter
2014-07-07  9:23   ` Noralf Tronnes
2014-07-07 20:36     ` Rickard Strandqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140705192317.GD25934@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gong.chen@linux.intel.com \
    --cc=jg1.han@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=rickard.strandqvist@sonymobile.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).