net: skbuff: Use ALIGN macro instead of open coding it
authorTobias Klauser <tklauser@distanz.ch>
Tue, 22 Jul 2014 10:06:23 +0000 (12:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jul 2014 20:39:42 +0000 (13:39 -0700)
Use ALIGN from linux/kernel.h to define SKB_DATA_ALIGN instead of open
coding it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h

index 369430340ed9ef6869406e30f54206f5c9c6f50a..b613557132b90154d2a1dd7971b0fcf60d3d1aaa 100644 (file)
 #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) \