Message ID | 1447753221-11998-1-git-send-email-tklauser@distanz.ch |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Tobias Klauser <tklauser@distanz.ch> Date: Tue, 17 Nov 2015 10:40:21 +0100 > Use PAGE_ALIGNED(...) instead of open-coding it. > > Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index af399ca..8f70523 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -4107,7 +4107,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 -
Use PAGE_ALIGNED(...) instead of open-coding it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> --- net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)