Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-15 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 3:19 AM Dan Carpenter wrote: > > On Fri, Apr 09, 2021 at 03:46:47PM +0900, Masahiro Yamada wrote: > > On Thu, Apr 8, 2021 at 12:25 AM Colin King wrote: > > > > > > From: Colin Ian King > > > > > > The for-loop iterates with a u8 loop counter i and compares this > > >

Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-15 Thread Dan Carpenter
On Fri, Apr 09, 2021 at 03:46:47PM +0900, Masahiro Yamada wrote: > On Thu, Apr 8, 2021 at 12:25 AM Colin King wrote: > > > > From: Colin Ian King > > > > The for-loop iterates with a u8 loop counter i and compares this > > with the loop upper limit of num_parents that is an int type. > > There

Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-09 Thread Colin Ian King
On 09/04/2021 07:46, Masahiro Yamada wrote: > On Thu, Apr 8, 2021 at 12:25 AM Colin King wrote: >> >> From: Colin Ian King >> >> The for-loop iterates with a u8 loop counter i and compares this >> with the loop upper limit of num_parents that is an int type. >> There is a potential infinite loop

Re: [PATCH] clk: uniphier: Fix potential infinite loop

2021-04-09 Thread Masahiro Yamada
On Thu, Apr 8, 2021 at 12:25 AM Colin King wrote: > > From: Colin Ian King > > The for-loop iterates with a u8 loop counter i and compares this > with the loop upper limit of num_parents that is an int type. > There is a potential infinite loop if num_parents is larger than > the u8 loop

[PATCH] clk: uniphier: Fix potential infinite loop

2021-04-07 Thread Colin King
From: Colin Ian King The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of num_parents that is an int type. There is a potential infinite loop if num_parents is larger than the u8 loop counter. Fix this by making the loop counter the same type as