mirror of https://github.com/xemu-project/xemu.git
pnv/phb3: Convert 1u to 1ull
As reported by Coverity defect CID 1419397, the 'j' variable goes up to
63 and shouldn't be used to left shift a 32-bit integer.
The result of the operation goes to a 64-bit integer : use a 64-bit
constant.
Reported-by: Coverity CID 1419397 Bad bit shift operation
Fixes: 9ae1329ee2
"ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158153364010.3229002.8004283672455615950.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
19b5c4186e
commit
5a205fcf77
|
@ -220,7 +220,7 @@ static void phb3_msi_resend(ICSState *ics)
|
|||
if ((msi->rba[i] & (1ull << j)) == 0) {
|
||||
continue;
|
||||
}
|
||||
msi->rba[i] &= ~(1u << j);
|
||||
msi->rba[i] &= ~(1ull << j);
|
||||
phb3_msi_try_send(msi, i * 64 + j, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue