From 01fcf01e8194d65985da4432f53394bfcb98cbfe Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 13 Jun 2018 13:22:08 +0200 Subject: [PATCH] gpio: zynq_gpio: bank description should use unsigned type Use u32 instead of int for max_bank, bank_min and bank_max. These values can't be negative that's why no reason to use signed type. Signed-off-by: Michal Simek --- drivers/gpio/zynq_gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c index 442ba196ca..8d84e3fc13 100644 --- a/drivers/gpio/zynq_gpio.c +++ b/drivers/gpio/zynq_gpio.c @@ -111,9 +111,9 @@ struct zynq_gpio_privdata { struct zynq_platform_data { const char *label; u16 ngpio; - int max_bank; - int bank_min[ZYNQMP_GPIO_MAX_BANK]; - int bank_max[ZYNQMP_GPIO_MAX_BANK]; + u32 max_bank; + u32 bank_min[ZYNQMP_GPIO_MAX_BANK]; + u32 bank_max[ZYNQMP_GPIO_MAX_BANK]; }; static const struct zynq_platform_data zynqmp_gpio_def = { @@ -165,7 +165,7 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, struct udevice *dev) { struct zynq_gpio_privdata *priv = dev_get_priv(dev); - int bank; + u32 bank; for (bank = 0; bank < priv->p_data->max_bank; bank++) { if ((pin_num >= priv->p_data->bank_min[bank]) && -- 2.39.5