pinctrl: single: fix the loop counter variable type
The 'n' variable is used as a loop counter, not as a physical address, and is used in a comparison with an int. So it makes sense to change its type from phys_addr_t to int. Signed-off-by: Dario Binacchi <dariobin@libero.it> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
This commit is contained in:
		
							parent
							
								
									4ace4fa697
								
							
						
					
					
						commit
						6719294694
					
				| 
						 | 
					@ -75,8 +75,8 @@ static int single_configure_pins(struct udevice *dev,
 | 
				
			||||||
				 int size)
 | 
									 int size)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct single_pdata *pdata = dev_get_plat(dev);
 | 
						struct single_pdata *pdata = dev_get_plat(dev);
 | 
				
			||||||
	int count = size / sizeof(struct single_fdt_pin_cfg);
 | 
						int n, count = size / sizeof(struct single_fdt_pin_cfg);
 | 
				
			||||||
	phys_addr_t n, reg;
 | 
						phys_addr_t reg;
 | 
				
			||||||
	u32 val;
 | 
						u32 val;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (n = 0; n < count; n++, pins++) {
 | 
						for (n = 0; n < count; n++, pins++) {
 | 
				
			||||||
| 
						 | 
					@ -109,8 +109,8 @@ static int single_configure_bits(struct udevice *dev,
 | 
				
			||||||
				 int size)
 | 
									 int size)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct single_pdata *pdata = dev_get_plat(dev);
 | 
						struct single_pdata *pdata = dev_get_plat(dev);
 | 
				
			||||||
	int count = size / sizeof(struct single_fdt_bits_cfg);
 | 
						int n, count = size / sizeof(struct single_fdt_bits_cfg);
 | 
				
			||||||
	phys_addr_t n, reg;
 | 
						phys_addr_t reg;
 | 
				
			||||||
	u32 val, mask;
 | 
						u32 val, mask;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (n = 0; n < count; n++, pins++) {
 | 
						for (n = 0; n < count; n++, pins++) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue