On Wed, 2005-08-03 at 15:39 -0700, Mark Haverkamp wrote:
> +               psg->sg[0].addr[1] = cpu_to_le32((u32)(addr>>32));

this is very risky code; if addr is a 32 bit entity, then this is
undefined behavior (which due to the vagities of x86 asm might get
optimized out entirely). It is a lot safer to do (addr>>16)>>16

gcc will optimize that just fine, the difference is that it's still
defined C behavior regardless of the type of addr.


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to