Re: [PATCH 5/5] staging/xgifb: Remove duplicated code in loops.

2013-02-18 Thread Dan Carpenter
On Fri, Feb 15, 2013 at 08:37:13PM +0100, Peter Huewe wrote: > - for (i = 0; i < 256; i++) { > - outb((unsigned char) DAC_TEST_PARMS[0], (pVBInfo->P3c8 + 1)); > - outb((unsigned char) DAC_TEST_PARMS[1], (pVBInfo->P3c8 + 1)); > - outb((unsigned char) DAC_TEST_

[PATCH 5/5] staging/xgifb: Remove duplicated code in loops.

2013-02-15 Thread Peter Huewe
Instead of calling the same function three times in a loop, multiply the loop counter by three. And since the value in DAC_TEST_PARMS is always the same we can use the value directly. Signed-off-by: Peter Huewe --- drivers/staging/xgifb/vb_setmode.c | 11 +++ 1 files changed, 3 inserti