Re: [PATCH]: fixing gcc 4.4 compiler warning: suggest parentheses around operand of ???!???

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

 



On (30/04/09 23:26), Al Viro wrote:
> On Thu, Apr 30, 2009 at 10:08:44PM +0000, James Bottomley wrote:
> 
> > Well, I know why (!STp->use_pf) is wrong: it would set USE_PF in an
> > incredibly obscure fashon.  The flag PF_TESTED seems to imply that it's
> > a don't check this again type deal, and the if clause is looking for it
> > not being set, hence I think the most likely thing to be done here is
> > set the PF_TESTED flag.
> 
> Not _set_ USE_PF; what's happening there is
> 	^= USE_PF | PF_TESTED; 	/* we know that PF_TESTED was not set */
> 

st.h:#define PF_TESTED   2
st.h:#define USE_PF      1

st.c:2963
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST && !(STp->use_pf & PF_TESTED))

'&& !(STp->use_pf & PF_TESTED)' means: STp->use_pf == 0 or STp->use_pf != ... 0010 (PF_TESTED).

if == 0
STp->use_pf = !0 | 2    -> 3

if > PF_TESTED
STp->use_pf = 0 | PF_TESTED     -> PF_TESTED

I need to think about
> I think the most likely thing to be done here is set the PF_TESTED flag.

Sergey.

--
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