Re: [PATCH 4/4] net: bonding: add slave device addresses in mode alb

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen Hemminger
Date: Monday, April 13, 2009 - 7:56 am

On Mon, 13 Apr 2009 10:46:15 +0200
Jiri Pirko <jpirko@redhat.com> wrote:


static inline bool should_copy_dev_addrs(const struct bonding *bond)
{
	return (bond->params.mode == BOND_MODE_ALB);
}

Three things are wrong with your style here:
   1. Needless use of tri-graph operator, just return the result
   2. Use const for test_foo() type functions
   3. Use bool to make it clearer what the result is.


The notifier (dev_mac_address_changed) should be part of dev_addr_add

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] bonding: allow bond in mode balance-alb to wor ..., Stephen Hemminger, (Fri Mar 13, 10:39 pm)
Re: [PATCH] bonding: allow bond in mode balance-alb to wor ..., Stephen Hemminger, (Sun Mar 15, 4:12 pm)
[PATCH 1/4] net: introduce dev_mac_address_changed, Jiri Pirko, (Mon Apr 13, 1:38 am)
Re: [PATCH 2/4] net: introduce a list of device addresses ..., Stephen Hemminger, (Mon Apr 13, 7:49 am)
Re: [PATCH 3/4] net: bridge: use device address list inste ..., Stephen Hemminger, (Mon Apr 13, 7:54 am)
Re: [PATCH 4/4] net: bonding: add slave device addresses i ..., Stephen Hemminger, (Mon Apr 13, 7:56 am)
Re: [PATCH 1/4] net: introduce dev_mac_address_changed, Stephen Hemminger, (Mon Apr 13, 7:58 am)
Re: [PATCH 1/3] net: introduce a list of device addresses ..., Stephen Hemminger, (Fri Apr 17, 8:33 am)
Re: [Bonding-devel] [PATCH 1/3] net: introduce a list of d ..., Stephen Hemminger, (Thu Apr 23, 8:58 am)
Re: [PATCH net-next] net: bridge: use device address list ..., Stephen Hemminger, (Wed May 6, 12:26 pm)