From e7bf464c7a774c4a3fe8053b898cd4734b33133c Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Fri, 3 Mar 2023 15:33:34 +0800 Subject: [PATCH] arch/imx6: Fix a compilation error with UBSan Signed-off-by: Huang Qi --- arch/arm/src/imx6/imx_gpio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/imx6/imx_gpio.h b/arch/arm/src/imx6/imx_gpio.h index 3cba13ae0e..be74b0983f 100644 --- a/arch/arm/src/imx6/imx_gpio.h +++ b/arch/arm/src/imx6/imx_gpio.h @@ -50,10 +50,10 @@ */ #define GPIO_MODE_SHIFT (30) /* Bits 30-31: Pin mode */ -#define GPIO_MODE_MASK (3 << GPIO_MODE_SHIFT) -# define GPIO_INPUT (0 << GPIO_MODE_SHIFT) /* GPIO input */ -# define GPIO_OUTPUT (1 << GPIO_MODE_SHIFT) /* GPIO output */ -# define GPIO_PERIPH (2 << GPIO_MODE_SHIFT) /* Peripheral */ +#define GPIO_MODE_MASK (3u << GPIO_MODE_SHIFT) +# define GPIO_INPUT (0u << GPIO_MODE_SHIFT) /* GPIO input */ +# define GPIO_OUTPUT (1u << GPIO_MODE_SHIFT) /* GPIO output */ +# define GPIO_PERIPH (2u << GPIO_MODE_SHIFT) /* Peripheral */ /* Initial Output Value: *