Re: [PATCH 1/5] staging/xgifb: Replace XGI340_CR6B table with simpleif/else

From: Greg Kroah-Hartman
Date: Tue Feb 05 2013 - 14:16:17 EST


On Tue, Feb 05, 2013 at 12:29:43AM +0100, Peter Huewe wrote:
> The XGI340_CR6B lookup table consists of the entries
> {0xaa, 0xaa, 0xaa, 0xaa} for an index <= 2 and
> {0x00, 0x00, 0x00, 0x00} for all other indices.
>
> The only user XGINew_SetDRAMDefaultRegister340 loops over these 4 values
> of a line with a for loop and since all entries are the same for each line
> we can simply replace the whole lookup table with a simple if/else assignment.
>
> Tested-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
> Signed-off-by: Peter Huewe <peterhuewe@xxxxxx>
> ---
> drivers/staging/xgifb/vb_init.c | 2 +-
> drivers/staging/xgifb/vb_table.h | 11 -----------
> 2 files changed, 1 insertions(+), 12 deletions(-)

With this series applied, I now get the following warning when building:

driverrs/staging/xgifb/vb_init.c: In function âXGINew_SetDRAMDefaultRegister340â:
drivers/staging/xgifb/vb_init.c:433:43: warning: unused variable âiâ [-Wunused-variable]

Care to send a follow-on patch to fix this up?

thanks,

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