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

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

 



On Mon, 2011-05-09 at 21:08 -0300, Rafael Aquini wrote:
>  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;
>  }


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux