Commit 92d72f1b authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

net: aquantia: fix unintention integer overflow on left shift

Shifting the integer value 1 is evaluated using 32-bit
arithmetic and then used in an expression that expects a 64-bit
value, so there is potentially an integer overflow. Fix this
by using the BIT_ULL macro to perform the shift and avoid the
overflow.

Addresses-Coverity: ("Unintentional integer overflow")
Fixes: 04a18399 ("net: aquantia: implement data PTP datapath")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarIgor Russkikh <irusskikh@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 69977901
......@@ -713,7 +713,7 @@ static int aq_ptp_poll(struct napi_struct *napi, int budget)
if (work_done < budget) {
napi_complete_done(napi, work_done);
aq_nic->aq_hw_ops->hw_irq_enable(aq_nic->aq_hw,
1 << aq_ptp->ptp_ring_param.vec_idx);
BIT_ULL(aq_ptp->ptp_ring_param.vec_idx));
}
err_exit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment