mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Emilio López" <emilio@elopez.com.ar>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Emilio López" <emilio@elopez.com.ar>
Subject: [PATCH v2 4/4] net: ethernet: korina: initialize variables directly
Date: Fri, 17 May 2013 17:42:56 -0300	[thread overview]
Message-ID: <1368823376-13104-4-git-send-email-emilio@elopez.com.ar> (raw)
In-Reply-To: <1368823376-13104-1-git-send-email-emilio@elopez.com.ar>

Clean up the code a bit to initialize the variables directly when
defining them.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
---

Please note that this patch is untested.

Changes from v1:
  - {0} -> { 0 } as suggested by David Miller

 drivers/net/ethernet/korina.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index 5409fe8..3756d95 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -495,12 +495,9 @@ static void korina_multicast_list(struct net_device *dev)
 
 	/* Build the hash table */
 	if (netdev_mc_count(dev) > 4) {
-		u16 hash_table[4];
+		u16 hash_table[4] = { 0 };
 		u32 crc;
 
-		for (i = 0; i < 4; i++)
-			hash_table[i] = 0;
-
 		netdev_for_each_mc_addr(ha, dev) {
 			crc = ether_crc_le(6, ha->addr);
 			crc >>= 26;
-- 
1.8.2.3


  parent reply	other threads:[~2013-05-17 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 15:07 [PATCH 1/4] net: ethernet: sun: " Emilio López
2013-05-17 15:07 ` [PATCH 2/4] net: ethernet: apple: " Emilio López
2013-05-17 20:23   ` David Miller
2013-05-17 15:07 ` [PATCH 3/4] net: ethernet: davicom: dm9000: " Emilio López
2013-05-17 15:07 ` [PATCH 4/4] net: ethernet: korina: " Emilio López
2013-05-17 20:23 ` [PATCH 1/4] net: ethernet: sun: " David Miller
2013-05-17 20:42 ` [PATCH v2 " Emilio López
2013-05-17 20:42   ` [PATCH v2 2/4] net: ethernet: apple: " Emilio López
2013-05-17 20:59     ` David Miller
2013-05-17 20:42   ` [PATCH v2 3/4] net: ethernet: davicom: dm9000: " Emilio López
2013-05-17 20:59     ` David Miller
2013-05-17 20:42   ` Emilio López [this message]
2013-05-17 20:59     ` [PATCH v2 4/4] net: ethernet: korina: " David Miller
2013-05-17 20:59   ` [PATCH v2 1/4] net: ethernet: sun: " David Miller

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=1368823376-13104-4-git-send-email-emilio@elopez.com.ar \
    --to=emilio@elopez.com.ar \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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

all inboxes | Powered by JetHome®