public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos.mage@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Marcos Paulo de Souza <marcos.mage@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Greg Kroah-Hartman <gregkh@susse.de>,
	Forest Bond <forest@alittletooquiet.net>,
	devel@driverdev.osuosl.org
Subject: [PATCH 1/5] staging: vt6656: datarate.c: Use memset instead a for loop
Date: Thu,  1 Dec 2011 23:58:35 +0000	[thread overview]
Message-ID: <1322783915-19570-1-git-send-email-marcos.mage@gmail.com> (raw)

As Dan Carpenteder suggested, this makes the atribution more simple.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@susse.de>
Cc: Forest Bond <forest@alittletooquiet.net>
Cc: devel@driverdev.osuosl.org
---
 drivers/staging/vt6656/datarate.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c
index 5c2719f..58ca0d4 100644
--- a/drivers/staging/vt6656/datarate.c
+++ b/drivers/staging/vt6656/datarate.c
@@ -69,13 +69,8 @@ void s_vResetCounter(PKnownNodeDB psNodeDBTable);
 
 void s_vResetCounter(PKnownNodeDB psNodeDBTable)
 {
-    BYTE            ii;
-
-    // clear statistic counter for auto_rate
-    for (ii = 0; ii <= MAX_RATE; ii++) {
-        psNodeDBTable->uTxOk[ii] = 0;
-        psNodeDBTable->uTxFail[ii] = 0;
-    }
+	memset(psNodeDBTable->uTxOk, 0, sizeof(psNodeDBTable->uTxOk));
+	memset(psNodeDBTable->uTxFail, 0, sizeof(psNodeDBTable->uTxFail));
 }
 
 /*---------------------  Export Variables  --------------------------*/
-- 
1.7.4.4


             reply	other threads:[~2011-12-02  1:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 23:58 Marcos Paulo de Souza [this message]
2011-12-02 20:50 ` [PATCH 1/5] staging: vt6656: datarate.c: Use memset instead a for loop Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322783915-19570-1-git-send-email-marcos.mage@gmail.com \
    --to=marcos.mage@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@susse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox