* [PATCH] neighbor: use ALIGN() macro
@ 2006-08-10 18:34 Stephen Hemminger
2006-08-11 6:03 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2006-08-10 18:34 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Rather than opencoding the mask, it looks better to use ALIGN()
macro from kernel.h.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
--- net-2.6.19.orig/include/net/neighbour.h
+++ net-2.6.19/include/net/neighbour.h
@@ -101,7 +101,7 @@ struct neighbour
__u8 dead;
atomic_t probes;
rwlock_t lock;
- unsigned char ha[(MAX_ADDR_LEN+sizeof(unsigned long)-1)&~(sizeof(unsigned long)-1)];
+ unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))];
struct hh_cache *hh;
atomic_t refcnt;
int (*output)(struct sk_buff *skb);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] neighbor: use ALIGN() macro
2006-08-10 18:34 [PATCH] neighbor: use ALIGN() macro Stephen Hemminger
@ 2006-08-11 6:03 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-08-11 6:03 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@osdl.org>
Date: Thu, 10 Aug 2006 11:34:03 -0700
> Rather than opencoding the mask, it looks better to use ALIGN()
> macro from kernel.h.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-11 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10 18:34 [PATCH] neighbor: use ALIGN() macro Stephen Hemminger
2006-08-11 6:03 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).