lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 28 Jan 2015 23:56:41 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Aaro Koskinen <aaro.koskinen@....fi>
Cc:	Arnaud Patard <arnaud.patard@...-net.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Vitor Braga <vitorpybraga@...il.com>,
	Monam Agarwal <monamagarwal123@...il.com>,
	Lubomir Rintel <lkundrak@...sk>,
	Thomas Gummerer <t.gummerer@...il.com>,
	Brian Vandre <bvandre@...il.com>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: xgifb: XGI_main_26: Change variables that is
 never used

2015-01-28 23:43 GMT+01:00 Aaro Koskinen <aaro.koskinen@....fi>:
> Hi,
>
> On Wed, Jan 28, 2015 at 10:38:07PM +0100, Rickard Strandqvist wrote:
>> Variable ar assigned a value that is never used.
>> Instead use the struct variable of the same name.
>>
>> This was found using a static code analysis program called cppcheck
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
>> ---
>>  drivers/staging/xgifb/XGI_main_26.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
>> index 709d49e..ecfdf34 100644
>> --- a/drivers/staging/xgifb/XGI_main_26.c
>> +++ b/drivers/staging/xgifb/XGI_main_26.c
>> @@ -1233,7 +1233,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
>>       unsigned int vtotal = 0;
>>       unsigned int drate = 0, hrate = 0;
>>       int found_mode = 0;
>> -     int refresh_rate, search_idx;
>> +     int search_idx;
>>
>>       if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_NONINTERLACED) {
>>               vtotal = var->upper_margin + var->yres + var->lower_margin
>> @@ -1271,7 +1271,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
>>
>>       /* Calculation wrong for 1024x600 - force it to 60Hz */
>>       if ((var->xres == 1024) && (var->yres == 600))
>> -             refresh_rate = 60;
>> +             xgifb_info->refresh_rate = 60;
>
> You are changing behaviour here. Did you test it, is it fixing something?
> Otherwise you could just delete the whole if block...
>
> A.


Hi

Yes, thats why there is another commit message.

But no, but when I check the code so it looked very much like a code miss.
And that you wanted to put refresh_rate = 60, which looks to be a default value.

Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ