From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 01/14 v2] mac802154: basic ieee802.15.4 device structures
Date: Mon, 26 Dec 2011 15:07:20 -0500 (EST) [thread overview]
Message-ID: <20111226.150720.932661578734898837.davem@davemloft.net> (raw)
In-Reply-To: <1324918953-14813-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Alexander Smirnov <alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Mon, 26 Dec 2011 20:02:33 +0300
> +enum ieee802154_hw_addr_filt_flags {
> + IEEE802515_SADDR_CHANGED = 1 << 0,
> + IEEE802515_IEEEADDR_CHANGED = 1 << 1,
> + IEEE802515_PANID_CHANGED = 1 << 2,
> + IEEE802515_PANC_CHANGED = 1 << 3,
> +};
These enumeration definitions for flags are undesriable for several
reasons.
First you do not even indicate what datastructure member these flags
are used in. And because you use an enumeration you can't just indicate
this by using "enum ieee802154_hw_addr_filt_flags" as the type in the
datastructure.
Forget all the enum crap, at the datastructure where the flags are defined
do something like:
u32 flags;
#define IEEE802154_AFILT_SADDR_CHANGED 0x00000001
#define IEEE802154_AFILT_IEEEADDR_CHANGED 0x00000002
#define IEEE802154_AFILT_PANID_CHANGED 0x00000004
#define IEEE802154_AFILT_PANC_CHANGED 0x00000008
There is then no confusion whatsoever where these flag bits are meant
to be applied and used, and the spurious data type definition is eliminated.
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
next prev parent reply other threads:[~2011-12-26 20:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-26 16:01 [PATCH series v2] IEEE 802.15.4 MAC layer basic implementation Alexander Smirnov
[not found] ` <CAJmB2rBMVvw_TV-mT2-jT7=H0adfMWaYFC0Q908pc_ND+PLD_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-26 17:02 ` [PATCH 01/14 v2] mac802154: basic ieee802.15.4 device structures Alexander Smirnov
[not found] ` <1324918953-14813-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-26 20:07 ` David Miller [this message]
2011-12-26 17:04 ` [PATCH 02/14 v2] mac802154: allocation of ieee802154 device Alexander Smirnov
[not found] ` <1324919047-14851-1-git-send-email-alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-26 20:09 ` David Miller
2011-12-28 7:19 ` Alexander Smirnov
2011-12-28 7:31 ` David Miller
2012-01-05 14:11 ` Alexander Smirnov
2011-12-26 17:04 ` [PATCH 03/14 v2] mac802154: RX data path Alexander Smirnov
2011-12-26 17:10 ` [PATCH 09/14 v2] ieee802154: remove ieee802154 policy from globals Alexander Smirnov
2011-12-26 17:12 ` [PATCH 13/14 v2] drivers/ieee802154: IEEE 802.15.4 loopback driver Alexander Smirnov
2011-12-26 17:13 ` [PATCH 14/14 v2] Documentation/networking/ieee802154: update MAC chapter Alexander Smirnov
2011-12-26 17:05 ` [PATCH 04/14 v2] mac802154: TX data path Alexander Smirnov
2011-12-26 17:06 ` [PATCH 05/14 v2] mac802154: define reduced mlme operations Alexander Smirnov
2011-12-26 17:07 ` [PATCH 06/14 v2] mac802154: slave interfaces definition Alexander Smirnov
2011-12-26 17:09 ` [PATCH 07/14 v2] mac802154: reduced mlme operations Alexander Smirnov
2011-12-26 17:09 ` [PATCH 08/14 v2] mac802154: basic mib support Alexander Smirnov
2011-12-26 17:11 ` [PATCH 10/14 v2] ieee802154: interface type to be added Alexander Smirnov
2011-12-26 17:11 ` [PATCH 11/14 v2] mac802154: slaves manipulation routine Alexander Smirnov
2011-12-26 17:12 ` [PATCH 12/14 v2] mac802154: monitor device support Alexander Smirnov
2011-12-26 17:57 ` [PATCH series v2] IEEE 802.15.4 MAC layer basic implementation Nicolas de Pesloüan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111226.150720.932661578734898837.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox