Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-04 Thread Leon Romanovsky
On Fri, Sep 02, 2016 at 10:39:11AM -0400, Doug Ledford wrote: > On 8/28/2016 2:06 AM, Leon Romanovsky wrote: > > On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: > >> On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > >>> On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: >

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-04 Thread Leon Romanovsky
On Fri, Sep 02, 2016 at 10:39:11AM -0400, Doug Ledford wrote: > On 8/28/2016 2:06 AM, Leon Romanovsky wrote: > > On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: > >> On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > >>> On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: >

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-02 Thread Doug Ledford
On 8/27/2016 1:25 AM, Christophe JAILLET wrote: > Le 26/08/2016 à 15:35, Doug Ledford a écrit : >> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: >>> The 2nd parameter of 'find_first_bit' is the number of bits to search. >>> In this case, we are passing 'sizeof(unsigned long)' which is likely to

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-02 Thread Doug Ledford
On 8/27/2016 1:25 AM, Christophe JAILLET wrote: > Le 26/08/2016 à 15:35, Doug Ledford a écrit : >> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: >>> The 2nd parameter of 'find_first_bit' is the number of bits to search. >>> In this case, we are passing 'sizeof(unsigned long)' which is likely to

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-02 Thread Doug Ledford
On 8/28/2016 2:06 AM, Leon Romanovsky wrote: > On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: >> On 8/26/2016 3:29 PM, Leon Romanovsky wrote: >>> On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: On 8/26/2016 9:35 AM, Doug Ledford wrote: > On 8/26/2016 12:49 AM,

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-09-02 Thread Doug Ledford
On 8/28/2016 2:06 AM, Leon Romanovsky wrote: > On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: >> On 8/26/2016 3:29 PM, Leon Romanovsky wrote: >>> On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: On 8/26/2016 9:35 AM, Doug Ledford wrote: > On 8/26/2016 12:49 AM,

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-28 Thread Leon Romanovsky
On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: > On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > > On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: > >> On 8/26/2016 9:35 AM, Doug Ledford wrote: > >>> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > The 2nd

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-28 Thread Leon Romanovsky
On Fri, Aug 26, 2016 at 03:34:48PM -0400, Doug Ledford wrote: > On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > > On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: > >> On 8/26/2016 9:35 AM, Doug Ledford wrote: > >>> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > The 2nd

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Christophe JAILLET
Le 26/08/2016 à 15:35, Doug Ledford a écrit : On 8/26/2016 12:49 AM, Christophe JAILLET wrote: The 2nd parameter of 'find_first_bit' is the number of bits to search. In this case, we are passing 'sizeof(unsigned long)' which is likely to be 4 or 8. If the size can be 4 or 8, then using 64

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Christophe JAILLET
Le 26/08/2016 à 15:35, Doug Ledford a écrit : On 8/26/2016 12:49 AM, Christophe JAILLET wrote: The 2nd parameter of 'find_first_bit' is the number of bits to search. In this case, we are passing 'sizeof(unsigned long)' which is likely to be 4 or 8. If the size can be 4 or 8, then using 64

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Leon Romanovsky
On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: > On 8/26/2016 9:35 AM, Doug Ledford wrote: > > On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > >> The 2nd parameter of 'find_first_bit' is the number of bits to search. > >> In this case, we are passing 'sizeof(unsigned long)' which

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Leon Romanovsky
On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: > On 8/26/2016 9:35 AM, Doug Ledford wrote: > > On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > >> The 2nd parameter of 'find_first_bit' is the number of bits to search. > >> In this case, we are passing 'sizeof(unsigned long)' which

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: >> On 8/26/2016 9:35 AM, Doug Ledford wrote: >>> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: The 2nd parameter of 'find_first_bit' is the number of bits to search. In this

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 3:29 PM, Leon Romanovsky wrote: > On Fri, Aug 26, 2016 at 02:01:55PM -0400, Doug Ledford wrote: >> On 8/26/2016 9:35 AM, Doug Ledford wrote: >>> On 8/26/2016 12:49 AM, Christophe JAILLET wrote: The 2nd parameter of 'find_first_bit' is the number of bits to search. In this

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 9:35 AM, Doug Ledford wrote: > On 8/26/2016 12:49 AM, Christophe JAILLET wrote: >> The 2nd parameter of 'find_first_bit' is the number of bits to search. >> In this case, we are passing 'sizeof(unsigned long)' which is likely to >> be 4 or 8. > > If the size can be 4 or 8, then using

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 9:35 AM, Doug Ledford wrote: > On 8/26/2016 12:49 AM, Christophe JAILLET wrote: >> The 2nd parameter of 'find_first_bit' is the number of bits to search. >> In this case, we are passing 'sizeof(unsigned long)' which is likely to >> be 4 or 8. > > If the size can be 4 or 8, then using

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > The 2nd parameter of 'find_first_bit' is the number of bits to search. > In this case, we are passing 'sizeof(unsigned long)' which is likely to > be 4 or 8. If the size can be 4 or 8, then using 64 universally is not correct. Why not use

Re: [PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-26 Thread Doug Ledford
On 8/26/2016 12:49 AM, Christophe JAILLET wrote: > The 2nd parameter of 'find_first_bit' is the number of bits to search. > In this case, we are passing 'sizeof(unsigned long)' which is likely to > be 4 or 8. If the size can be 4 or 8, then using 64 universally is not correct. Why not use

[PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-25 Thread Christophe JAILLET
The 2nd parameter of 'find_first_bit' is the number of bits to search. In this case, we are passing 'sizeof(unsigned long)' which is likely to be 4 or 8. It is likely that the number of bits of 'port_mask' was expected here. This variable is a 'u64', so use 64 instead. It has been spotted by the

[PATCH 1/2] IB/hfi1: Fix a parameter of find_first_bit.

2016-08-25 Thread Christophe JAILLET
The 2nd parameter of 'find_first_bit' is the number of bits to search. In this case, we are passing 'sizeof(unsigned long)' which is likely to be 4 or 8. It is likely that the number of bits of 'port_mask' was expected here. This variable is a 'u64', so use 64 instead. It has been spotted by the