summaryrefslogtreecommitdiffstats
path: root/sys/boot/arm
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2013-11-30 22:17:27 +0000
committereadler <eadler@FreeBSD.org>2013-11-30 22:17:27 +0000
commit44c01df17391f4429ee371e8039ae4fd802c2a8e (patch)
tree050fb3b68519f6ef7d59051550fa29cdd79d6dac /sys/boot/arm
parent5bcb8c5f4293579e5f8aba6f33f85246b7b70e5d (diff)
downloadFreeBSD-src-44c01df17391f4429ee371e8039ae4fd802c2a8e.zip
FreeBSD-src-44c01df17391f4429ee371e8039ae4fd802c2a8e.tar.gz
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
Diffstat (limited to 'sys/boot/arm')
-rw-r--r--sys/boot/arm/at91/libat91/mci_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/arm/at91/libat91/mci_device.h b/sys/boot/arm/at91/libat91/mci_device.h
index eeff0c9..903454c 100644
--- a/sys/boot/arm/at91/libat91/mci_device.h
+++ b/sys/boot/arm/at91/libat91/mci_device.h
@@ -306,7 +306,7 @@ typedef struct _AT91S_MciDevice
#define AT91C_VDD_33_34 (1 << 21)
#define AT91C_VDD_34_35 (1 << 22)
#define AT91C_VDD_35_36 (1 << 23)
-#define AT91C_CARD_POWER_UP_BUSY (1 << 31)
+#define AT91C_CARD_POWER_UP_BUSY (1U << 31)
#define AT91C_MMC_HOST_VOLTAGE_RANGE (AT91C_VDD_27_28 | AT91C_VDD_28_29 | \
AT91C_VDD_29_30 | AT91C_VDD_30_31 | AT91C_VDD_31_32 | AT91C_VDD_32_33)
OpenPOWER on IntegriCloud