Re: [Linux-zigbee-devel] [PATCH 11/14] mac802154: slaves manipulation routine

2011-12-19 Thread Joe Perches
On Mon, 2011-12-19 at 14:43 -0500, David Miller wrote: > From: Alexander Smirnov > > + if ((--priv->hw->open_count) == 0) > This is more canonical as "if (!--priv->hw->open_count)". Shrug. I think this is more readable and intelligible with the == 0. A test of a non-bool or non-ptr to a spec

Re: [Linux-zigbee-devel] [PATCH 11/14] mac802154: slaves manipulation routine

2011-12-19 Thread David Miller
From: Alexander Smirnov Date: Mon, 19 Dec 2011 19:33:51 +0300 > +struct ieee802154_dev *ieee802154_alloc_device(size_t priv_size, > + struct ieee802154_ops *ops); Line up the arguments properly. > + if (priv->hw->open_count++ == 0) { > + res = priv->h

[Linux-zigbee-devel] [PATCH 11/14] mac802154: slaves manipulation routine

2011-12-19 Thread Alexander Smirnov
From: Alexander Smirnov This patch adds interface for registration and removing slaves in the system. Signed-off-by: Alexander Smirnov --- include/net/mac802154.h|4 + net/mac802154/ieee802154_dev.c | 140 +++- net/mac802154/mac802154.h |