Re: [PATCH 3/4] staging: vt6656: datarate.c: Remove unneeded comments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 Dec 2011, Dan Carpenter wrote:

On Thu, Dec 01, 2011 at 12:31:57AM +0000, Marcos Paulo de Souza wrote:
-    // clear statistic counter for auto_rate
-    for (ii = 0; ii <= MAX_RATE; ii++) {
-        psNodeDBTable->uTxOk[ii] = 0;
-        psNodeDBTable->uTxFail[ii] = 0;
-    }
+	/* clear statistic counter for auto_rate */
+	for (ii = 0; ii <= MAX_RATE; ii++)
+		psNodeDBTable->uTxOk[ii] = psNodeDBTable->uTxFail[ii] = 0;
 }


Don't do that...  Better to have the assignments on separate lines.

If you wanted, you could use memset and get rid of the loop.

void s_vResetCounter(PKnownNodeDB psNodeDBTable)
{
	memset(psNodeDBTable->uTxOk, 0, sizeof(psNodeDBTable->uTxOk));
	memset(psNodeDBTable->uTxFail, 0, sizeof(psNodeDBTable->uTxFail));
}
OK, I will send this patch again.

Thanks for your suggestion.
regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux