Subject: Re: [PATCH 2/5] net: add IEEE 802.15.4 partial implementation

From: Ben Hutchings <[email-masked]>
Date: Sat, 30 May 2009 17:32:16 +0100

On Thu, 2009-05-28 at 12:48 +0400, Dmitry Eremin-Solenikov wrote:
> On Thu, May 28, 2009 at 04:08:51AM +0100, Ben Hutchings wrote:
> > On Tue, 2009-05-26 at 15:23 +0400, Dmitry Eremin-Solenikov wrote:
> > [...]
> > > diff --git a/include/net/ieee802154/af_ieee802154.h b/include/net/ieee802154/af_ieee802154.h
> > > new file mode 100644
> > > index 0000000..6eb7f51
> > > --- /dev/null
> > > +++ b/include/net/ieee802154/af_ieee802154.h
> > [...]
> > > +#ifdef __KERNEL__
> > > +#include <linux/skbuff.h>
> > > +#include <linux/netdevice.h>
> > 
> > The struct declarations would be sufficient.
> 
> Do you mean just:
> struct sk_buff;
> struct net_device;

Right.

[...]
> > 
> > [...]
> > > +#define IEEE802154_FETCH_U64(skb, var)			\
> > > +	do {						\
> > > +		if (skb->len < IEEE802154_ADDR_LEN)	\
> > 
> > I see what you did there...
> 
> ???
[...]

This macro works with u64 values, not specifically addresses, which
happen to be 8 bytes long too.  I infer that someone search-and-replaced
instances of the literal 8 with IEEE802154_ADDR_LEN and wrongly replaced
this instance.

Ben.

-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky