From: Tobias Klauser Date: Tue, 17 Nov 2015 09:40:21 +0000 (+0100) Subject: packet: Use PAGE_ALIGNED macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=90836b67e2171f48be696bdd3c4006d1e6f031fc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 -