[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130218111824.GE6802@mwanda>
Date: Mon, 18 Feb 2013 14:18:24 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Peter Huewe <peterhuewe@....de>
Cc: Arnaud Patard <arnaud.patard@...-net.org>,
devel@...verdev.osuosl.org, Aaro Koskinen <aaro.koskinen@....fi>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [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
--
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