From: Tobias Klauser Date: Tue, 17 Nov 2015 09:40:21 +0000 (+0100) Subject: packet: Use PAGE_ALIGNED macro X-Git-Tag: v4.4-rc2~28^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90836b67e2171f48be696bdd3c4006d1e6f031fc;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.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 533981d..1cf928f 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 -