[openib-general] [PATCH repost] ipoib: cosmetics
Michael S. Tsirkin
mst at mellanox.co.il
Mon Jan 9 06:56:43 PST 2006
Roland, I think we discussed this patch once, I think you agreed it
makes the code more readable.
---
Cosmetic change in ipoib: make alignment explicit.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-2.6.14/drivers/infiniband/ulp/ipoib/ipoib.h
===================================================================
--- linux-2.6.14.orig/drivers/infiniband/ulp/ipoib/ipoib.h 2005-12-16 02:15:55.000000000 +0200
+++ linux-2.6.14/drivers/infiniband/ulp/ipoib/ipoib.h 2005-12-16 02:39:42.000000000 +0200
@@ -219,8 +219,8 @@ struct ipoib_neigh {
static inline struct ipoib_neigh **to_ipoib_neigh(struct neighbour *neigh)
{
- return (struct ipoib_neigh **) (neigh->ha + 24 -
- (offsetof(struct neighbour, ha) & 4));
+ return (void*)neigh + ALIGN(offsetof(struct neighbour, ha) +
+ INFINIBAND_ALEN, sizeof(void *));
}
extern struct workqueue_struct *ipoib_workqueue;
--
MST
More information about the general
mailing list