diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-01-01 15:36:56 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-01-01 15:36:56 +0000 |
commit | b7090dfbe9ee709789b24aecc6da9ab8c67e9886 (patch) | |
tree | 175bbcda2dd59c7247330fda7fe8e33f9cecba13 /sys | |
parent | 78ef3d15998f2266e455b08a1b01fb9ff8926511 (diff) | |
download | FreeBSD-src-b7090dfbe9ee709789b24aecc6da9ab8c67e9886.zip FreeBSD-src-b7090dfbe9ee709789b24aecc6da9ab8c67e9886.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/mpc85xx/lbc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/powerpc/mpc85xx/lbc.c b/sys/powerpc/mpc85xx/lbc.c index 62b56c3..8bb92b2 100644 --- a/sys/powerpc/mpc85xx/lbc.c +++ b/sys/powerpc/mpc85xx/lbc.c @@ -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; |