Well, that's definitely an improvement - the original code makes no
sense at all, since it's doing a bitwise xor on two bits that are not
the same, and then uses that as a boolean value.
Your change at least makes it use the bitwise xor on properly logical
values, making the bitwise xor work as a _logical_ xor.
Although at that point I'd just get rid of the xor, and replace it by
the "!=" operation - which is equivalent on logical ops.
>> pBuf = ide_map_rq(rq, &flags);
>> DTF("write: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
>
>
>Hmm. There is something else that smells in the above, since the XOR operator
>doesn't seem to be proper. Why shouldn't we get DRQ_STAT at all on short
>request? Could you perhaps just try to replace it with an OR?
The XOR operation is a valid op, if you just use it on valid values,
which the patch does seem to make it do.
I don't know whether the logic is _correct_ after that, but at least
there is some remote chance that it might make sense.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/