From: Tobias Klauser Date: Tue, 17 Nov 2015 09:40:21 +0000 (+0100) Subject: packet: Use PAGE_ALIGNED macro X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=90836b67e2171f48be696bdd3c4006d1e6f031fc;p=openwrt%2Fstaging%2Fblogic.git packet: Use PAGE_ALIGNED macro Use PAGE_ALIGNED(...) instead of open-coding it. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller --- 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 -