Thread (5 messages) 5 messages, 3 authors, 2011-05-10

Re: [PATCH] net/bonding: adjust codingstyle for bond_3ad files

From: Joe Perches <joe@perches.com>
Date: 2011-05-10 00:15:28
Also in: kernel-janitors

On Mon, 2011-05-09 at 21:08 -0300, Rafael Aquini wrote:
quoted hunk ↗ jump to hunk
 drivers/net/bonding/bond_3ad.c |  886 +++++++++++++++++++++++-----------------
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
@@ -411,36 +407,37 @@ static inline void __initialize_port_locks(struct port *port)
  */
 static u16 __ad_timer_to_ticks(u16 timer_type, u16 par)
 {
-	u16 retval = 0; /* to silence the compiler */
+	u16 uninitialized_var(retval);
uninitialized_var isn't necessary.  Every case will set retval.
 	switch (timer_type) {
[]
+	default:
+		/* Exception: unexpected timer_type received */
+		pr_debug("Unexpected AD timer_type: %d\n", timer_type);
+		retval = 0;
+		break;
 	}
 	return retval;
 }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help