projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4194b49
)
packet: Use PAGE_ALIGNED macro
author
Tobias Klauser
<tklauser@distanz.ch>
Tue, 17 Nov 2015 09:40:21 +0000
(10:40 +0100)
committer
David S. Miller
<davem@davemloft.net>
Tue, 17 Nov 2015 20:25:44 +0000
(15:25 -0500)
Use PAGE_ALIGNED(...) instead of open-coding it.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c
patch
|
blob
|
history
diff --git
a/net/packet/af_packet.c
b/net/packet/af_packet.c
index 533981d49290d471a89483b90ac89a7404a42e6e..1cf928fb573e6769a4070327baa74adb300cde7e 100644
(file)
--- a/
net/packet/af_packet.c
+++ b/
net/packet/af_packet.c
@@
-4109,7
+4109,7
@@
static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
err = -EINVAL;
if (unlikely((int)req->tp_block_size <= 0))
goto out;
- if (unlikely(
req->tp_block_size & (PAGE_SIZE - 1
)))
+ if (unlikely(
!PAGE_ALIGNED(req->tp_block_size
)))
goto out;
if (po->tp_version >= TPACKET_V3 &&
(int)(req->tp_block_size -