Skip to content

Commit

Permalink
net: skbuff: Use ALIGN macro instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Jul 22, 2014
1 parent 526cbef commit 0bec8c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 0bec8c8

Please sign in to comment.