netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH,RFC] [NET] ALIGN
@ 2004-02-09  4:45 YOSHIFUJI Hideaki / 吉藤英明
  2004-02-09 19:20 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-02-09  4:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, yoshfuji

D: Use ALIGN() where appricable.

BTW, 
 1. do we really need this ALIGN?
 2. should 16 be BYTES_PER_WORD (in mm/slab.c)?

===== net/core/neighbour.c 1.24 vs edited =====
--- 1.24/net/core/neighbour.c	Tue Jan 20 14:31:23 2004
+++ edited/net/core/neighbour.c	Mon Feb  9 13:13:37 2004
@@ -1164,8 +1164,7 @@
 
 	if (!tbl->kmem_cachep)
 		tbl->kmem_cachep = kmem_cache_create(tbl->id,
-						     (tbl->entry_size +
-						      15) & ~15,
+						     ALIGN(tbl->entry_size, 16),
 						     0, SLAB_HWCACHE_ALIGN,
 						     NULL, NULL);
 	tbl->lock	       = RW_LOCK_UNLOCKED;

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-11 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-09  4:45 [PATCH,RFC] [NET] ALIGN YOSHIFUJI Hideaki / 吉藤英明
2004-02-09 19:20 ` David S. Miller
2004-02-10  4:05   ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-11 18:42     ` David S. 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).