From: Michal Simek Date: Wed, 13 Jun 2018 11:22:08 +0000 (+0200) Subject: gpio: zynq_gpio: bank description should use unsigned type X-Git-Tag: v2018.07-rc2~49^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01fcf01e8194d65985da4432f53394bfcb98cbfe;p=u-boot 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 --- 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]) &&