Re: [PATCH 6/10] hpsa: use safer test on the result of find_first_zero_bit

2014-06-04 Thread scameron
On Wed, Jun 04, 2014 at 05:06:44PM +0200, Julia Lawall wrote: > > > On Wed, 4 Jun 2014, scame...@beardog.cce.hp.com wrote: > > > On Wed, Jun 04, 2014 at 11:07:56AM +0200, Julia Lawall wrote: > > > From: Julia Lawall > > > > > > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thu

Re: [PATCH 6/10] hpsa: use safer test on the result of find_first_zero_bit

2014-06-04 Thread Julia Lawall
On Wed, 4 Jun 2014, scame...@beardog.cce.hp.com wrote: > On Wed, Jun 04, 2014 at 11:07:56AM +0200, Julia Lawall wrote: > > From: Julia Lawall > > > > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may > > return a larger number than the maximum position argument if that po

Re: [PATCH 6/10] hpsa: use safer test on the result of find_first_zero_bit

2014-06-04 Thread scameron
On Wed, Jun 04, 2014 at 11:07:56AM +0200, Julia Lawall wrote: > From: Julia Lawall > > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may > return a larger number than the maximum position argument if that position > is not a multiple of BITS_PER_LONG. > > The semantic matc

[PATCH 6/10] hpsa: use safer test on the result of find_first_zero_bit

2014-06-04 Thread Julia Lawall
From: Julia Lawall Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may return a larger number than the maximum position argument if that position is not a multiple of BITS_PER_LONG. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @