lkml.org 
[lkml]   [2013]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] staging/xgifb: Remove duplicated code in loops.
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_PARMS[2], (pVBInfo->P3c8 + 1));
> + for (i = 0; i < 256 * 3; i++) {
> + outb(0x0F, (pVBInfo->P3c8 + 1)); /* DAC_TEST_PARMS */

The original code looks buggy, but it's been that way from the
initial commit so I have no idea what was intended. Perhaps the
"+ 1" was supposed to be a "+ i". There is no way to know really.

regards,
dan carpenter


\
 
 \ /
  Last update: 2013-02-18 13:01    [W:0.102 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site