diff options
author | eadler <eadler@FreeBSD.org> | 2013-11-30 22:17:27 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2013-11-30 22:17:27 +0000 |
commit | 44c01df17391f4429ee371e8039ae4fd802c2a8e (patch) | |
tree | 050fb3b68519f6ef7d59051550fa29cdd79d6dac /sys/arm/samsung | |
parent | 5bcb8c5f4293579e5f8aba6f33f85246b7b70e5d (diff) | |
download | FreeBSD-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/arm/samsung')
-rw-r--r-- | sys/arm/samsung/exynos/ehci_exynos5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/samsung/exynos/ehci_exynos5.c b/sys/arm/samsung/exynos/ehci_exynos5.c index ada0405..71c43d8 100644 --- a/sys/arm/samsung/exynos/ehci_exynos5.c +++ b/sys/arm/samsung/exynos/ehci_exynos5.c @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); #define HOST_CTRL_SUSPEND (1 << 4) #define HOST_CTRL_RESET_LINK (1 << 1) #define HOST_CTRL_RESET_PHY (1 << 0) -#define HOST_CTRL_RESET_PHY_ALL (1 << 31) +#define HOST_CTRL_RESET_PHY_ALL (1U << 31) /* Forward declarations */ static int exynos_ehci_attach(device_t dev); |