Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-07 Thread Mike Christie
Robert P. J. Day wrote: Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> --- Thanks for the iscsi bits. We have the libiscsi part from [EMAIL PROTECTED] queued for 2.6.25. And the iscsi_tcp parts you are patching over are broken and I am going to fix that for 2.6.25. We only support 1 r2

Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-07 Thread Robert P. J. Day
On Tue, 6 Nov 2007, Matthew Wilcox wrote: > On Tue, Nov 06, 2007 at 10:20:46AM -0500, Robert P. J. Day wrote: > > @@ -1656,7 +1657,7 @@ static inline int reconnect_target(struct NCR_ESP > > *esp, struct ESP_regs *eregs) > > if(!(it & me)) > > return -1; > > it &= ~me; > > -

Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-06 Thread Robert P. J. Day
On Tue, 6 Nov 2007, Matthew Wilcox wrote: > On Tue, Nov 06, 2007 at 11:09:51AM -0500, Robert P. J. Day wrote: > > > > bits &= ~esp->scsi_id_mask; > > > > - if (!bits || (bits & (bits - 1))) > > > > + if (!is_power_of_2(bits)) > > > >

Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-06 Thread Matthew Wilcox
On Tue, Nov 06, 2007 at 11:09:51AM -0500, Robert P. J. Day wrote: > > > bits &= ~esp->scsi_id_mask; > > > - if (!bits || (bits & (bits - 1))) > > > + if (!is_power_of_2(bits)) > > > goto do_reset; > > > > Non-equivalent transform. Definitely a bug. > >

Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-06 Thread Robert P. J. Day
On Tue, 6 Nov 2007, Matthew Wilcox wrote: > On Tue, Nov 06, 2007 at 10:20:46AM -0500, Robert P. J. Day wrote: > > @@ -1656,7 +1657,7 @@ static inline int reconnect_target(struct NCR_ESP > > *esp, struct ESP_regs *eregs) > > if(!(it & me)) > > return -1; > > it &= ~me; > > -

Re: [PATCH] SCSI: Use is_power_of_2() macro for simplicity.

2007-11-06 Thread Matthew Wilcox
On Tue, Nov 06, 2007 at 10:20:46AM -0500, Robert P. J. Day wrote: > @@ -1656,7 +1657,7 @@ static inline int reconnect_target(struct NCR_ESP *esp, > struct ESP_regs *eregs) > if(!(it & me)) > return -1; > it &= ~me; > - if(it & (it - 1)) > + if(!is_power_of_2(it))