Re: [PATCH] serial: vt8500_serial: Fix a parameter of find_first_zero_bit.

2016-08-23 Thread Christophe JAILLET
Le 23/08/2016 à 11:23, Arnd Bergmann a écrit : On Tuesday, August 23, 2016 6:20:28 AM CEST Christophe JAILLET wrote: Le 22/08/2016 à 10:42, Arnd Bergmann a écrit : [...] Sorry, but I'm not following the logic here. [...] You argue that the two have the same meaning, which I see, but why is it

Re: [PATCH] serial: vt8500_serial: Fix a parameter of find_first_zero_bit.

2016-08-23 Thread Arnd Bergmann
On Tuesday, August 23, 2016 6:20:28 AM CEST Christophe JAILLET wrote: > Le 22/08/2016 à 10:42, Arnd Bergmann a écrit : > > [...] > > Sorry, but I'm not following the logic here. > > > > [...] > > You argue that the two have the same meaning, which I see, but > > why is it better than the existing c

Re: [PATCH] serial: vt8500_serial: Fix a parameter of find_first_zero_bit.

2016-08-22 Thread Christophe JAILLET
Le 22/08/2016 à 10:42, Arnd Bergmann a écrit : [...] Sorry, but I'm not following the logic here. [...] You argue that the two have the same meaning, which I see, but why is it better than the existing code? Arnd Hi, sorry if my explanation was unclear. What I mean is that if "sizeo

Re: [PATCH] serial: vt8500_serial: Fix a parameter of find_first_zero_bit.

2016-08-22 Thread Arnd Bergmann
On Sunday, August 21, 2016 11:20:25 PM CEST Christophe JAILLET wrote: > The 2nd parameter of 'find_first_zero_bit' is the number of bits to search. > In this case, we are passing 'sizeof(vt8500_ports_in_use)'. > 'vt8500_ports_in_use' is an 'unsigned long'. So the sizeof is likely to > return 4. >

[PATCH] serial: vt8500_serial: Fix a parameter of find_first_zero_bit.

2016-08-21 Thread Christophe JAILLET
The 2nd parameter of 'find_first_zero_bit' is the number of bits to search. In this case, we are passing 'sizeof(vt8500_ports_in_use)'. 'vt8500_ports_in_use' is an 'unsigned long'. So the sizeof is likely to return 4. A few lines below, we check if it is below VT8500_MAX_PORTS, which is 6. It is