diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-11-17 12:40:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-17 23:25:44 +0300 |
commit | 90836b67e2171f48be696bdd3c4006d1e6f031fc (patch) | |
tree | c45734e0dc59eddf5db0931403eaf0b27aca0734 /net/packet | |
parent | 4194b4914a824c21bcad9305d6180825f4dc1f5e (diff) | |
download | linux-90836b67e2171f48be696bdd3c4006d1e6f031fc.tar.xz |
packet: Use PAGE_ALIGNED macro
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>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 533981d49290..1cf928fb573e 100644 --- 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 - |