mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Use uint32_t for LBC block size.
LBC block size can only be up to 4GB. The existing code already clamps it, but mixes unsigned long and uint32_t. This works on 32-bit targets, but not 64-bit, so isn't completely correct. This fixes the type confusion.
This commit is contained in:
parent
9ed9d9bc3c
commit
295be3307c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293041
@ -126,11 +126,11 @@ lbc_address_mask(uint32_t size)
|
||||
{
|
||||
int n = 15;
|
||||
|
||||
if (size == ~0UL)
|
||||
if (size == ~0)
|
||||
return (0);
|
||||
|
||||
while (n < 32) {
|
||||
if (size == (1UL << n))
|
||||
if (size == (1U << n))
|
||||
break;
|
||||
n++;
|
||||
}
|
||||
@ -267,7 +267,7 @@ lbc_banks_map(struct lbc_softc *sc)
|
||||
static int
|
||||
lbc_banks_enable(struct lbc_softc *sc)
|
||||
{
|
||||
u_long size;
|
||||
uint32_t size;
|
||||
uint32_t regval;
|
||||
int error, i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user