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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> > -	if(it & (it - 1))
> > +	if(!is_power_of_2(it))
> >  		return -1;
>
> Non-equivalent transform.  Probably a bug.
>
> >  		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.

ok, that one i'm curious about.  how is that not an equivalent
transform?  am i missing something painfully obvious?

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux