lkml.org 
[lkml]   [2015]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fbdev: savage: remove unused variable
On 06/01/15 15:12, Sudip Mukherjee wrote:
> vga_in8() was storing the return value in tmp, but that return value
> was never used again. so it should be safe to remove those variables.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>
> just one doubt:
> vga_in8() is calling savage_in8() which is a readb().
> so in effect we are reading one byte from
> (par->mmio.vbase + 0x8000 + 0x3da) and then discarding that value.
> so if we are discarding that value then why we are reading it?

Sometimes reading a HW register without actually using the returned
value has some effect. I don't know if there's a reason for that in this
case, though, as I'm not familiar with the HW.

In any case, it's safer to keep the read there as you did.

Queued for 3.20.

Tomi


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-01-13 12:41    [W:0.646 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site