[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1406023583-25851-1-git-send-email-tklauser@distanz.ch>
Date: Tue, 22 Jul 2014 12:06:23 +0200
From: Tobias Klauser <tklauser@...tanz.ch>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: [PATCH net-next] net: skbuff: Use ALIGN macro instead of open coding it
Use ALIGN from linux/kernel.h to define SKB_DATA_ALIGN instead of open
coding it.
Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
---
include/linux/skbuff.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 3694303..b613557 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -112,8 +112,7 @@
#define CHECKSUM_COMPLETE 2
#define CHECKSUM_PARTIAL 3
-#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \
- ~(SMP_CACHE_BYTES - 1))
+#define SKB_DATA_ALIGN(X) ALIGN(X, SMP_CACHE_BYTES)
#define SKB_WITH_OVERHEAD(X) \
((X) - SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
#define SKB_MAX_ORDER(X, ORDER) \
--
2.0.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists