This is an automated email from Gerrit. "Name of user not set <chris.whee...@narfindustries.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8144
-- gerrit commit bec5f635901831a08bd7e56c86f7368961bc47c2 Author: WheelNarf <chris.whee...@narfindustries.com> Date: Mon Feb 12 13:13:51 2024 -0800 jtag/drivers/imx_gpio: add configurable gpio address space size to accommodate other imx chips. Add parenthesis to all macro parameters Change-Id: I7eb1b1b6f651682fc56cd62702165d17f0fe8c12 Signed-off-by: WheelNarf <chris.whee...@narfindustries.com> diff --git a/src/jtag/drivers/imx_gpio.c b/src/jtag/drivers/imx_gpio.c index 5448579337..489199733e 100644 --- a/src/jtag/drivers/imx_gpio.c +++ b/src/jtag/drivers/imx_gpio.c @@ -31,16 +31,16 @@ /* GPIO setup macros */ #define IMX_GPIO_REG_READ(g, offset) \ - (*(pio_base + ((g / 32) * imx_gpio_peri_size + offset) / sizeof(uint32_t))) + (*(pio_base + (((g) / 32) * imx_gpio_peri_size + (offset)) / sizeof(uint32_t))) #define IMX_GPIO_REG_WRITE(g, offset, value) \ - (*(pio_base + ((g / 32) * imx_gpio_peri_size + offset) / sizeof(uint32_t)) = (value)) + (*(pio_base + (((g) / 32) * imx_gpio_peri_size + (offset)) / sizeof(uint32_t)) = (value)) #define IMX_GPIO_SET_REG_BITS(g, offset, bit_mask) \ - (*(pio_base + ((g / 32) * imx_gpio_peri_size + offset) / sizeof(uint32_t)) |= (bit_mask)) + (*(pio_base + (((g) / 32) * imx_gpio_peri_size + (offset)) / sizeof(uint32_t)) |= (bit_mask)) #define IMX_GPIO_CLEAR_REG_BITS(g, offset, bit_mask) \ - (*(pio_base + ((g / 32) * imx_gpio_peri_size + offset) / sizeof(uint32_t)) &= ~(bit_mask)) + (*(pio_base + (((g) / 32) * imx_gpio_peri_size + (offset)) / sizeof(uint32_t)) &= ~(bit_mask)) static uint32_t imx_gpio_peri_base = IMX_GPIO_BASE; static uint32_t imx_gpio_peri_size = IMX_GPIO_SIZE; --