[PATCH 02/11] pinctrl: single: fix the loop counter variable type

Dario Binacchi dariobin at libero.it
Sat Jan 23 19:27:02 CET 2021


The patch changes the variable 'n' type from phys_addr_t to int.

Signed-off-by: Dario Binacchi <dariobin at libero.it>
---

 drivers/pinctrl/pinctrl-single.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index c9a6c272bf..49ed15211d 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -75,8 +75,8 @@ static int single_configure_pins(struct udevice *dev,
 				 int size)
 {
 	struct single_pdata *pdata = dev_get_plat(dev);
-	int count = size / sizeof(struct single_fdt_pin_cfg);
-	phys_addr_t n, reg;
+	int n, count = size / sizeof(struct single_fdt_pin_cfg);
+	phys_addr_t reg;
 	u32 val;
 
 	for (n = 0; n < count; n++, pins++) {
@@ -109,8 +109,8 @@ static int single_configure_bits(struct udevice *dev,
 				 int size)
 {
 	struct single_pdata *pdata = dev_get_plat(dev);
-	int count = size / sizeof(struct single_fdt_bits_cfg);
-	phys_addr_t n, reg;
+	int n, count = size / sizeof(struct single_fdt_bits_cfg);
+	phys_addr_t reg;
 	u32 val, mask;
 
 	for (n = 0; n < count; n++, pins++) {
-- 
2.17.1



More information about the U-Boot mailing list