mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] net: ethernet: sun: initialize variables directly
@ 2013-05-17 15:07 Emilio López
  2013-05-17 15:07 ` [PATCH 2/4] net: ethernet: apple: " Emilio López
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Emilio López @ 2013-05-17 15:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Emilio López

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.

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

diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c
index 0549759..aabb40a 100644
--- a/drivers/net/ethernet/sun/sunbmac.c
+++ b/drivers/net/ethernet/sun/sunbmac.c
@@ -1017,10 +1017,7 @@ static void bigmac_set_multicast(struct net_device *dev)
 		tmp |= BIGMAC_RXCFG_PMISC;
 		sbus_writel(tmp, bregs + BMAC_RXCFG);
 	} else {
-		u16 hash_table[4];
-
-		for (i = 0; i < 4; i++)
-			hash_table[i] = 0;
+		u16 hash_table[4] = {0};
 
 		netdev_for_each_mc_addr(ha, dev) {
 			crc = ether_crc_le(6, ha->addr);
-- 
1.8.2.3


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-05-17 20:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 15:07 [PATCH 1/4] net: ethernet: sun: initialize variables directly 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   ` [PATCH v2 4/4] net: ethernet: korina: " Emilio López
2013-05-17 20:59     ` David Miller
2013-05-17 20:59   ` [PATCH v2 1/4] net: ethernet: sun: " David Miller

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®