On Fri, 2008-03-28 at 17:49 -0700, Grant Grundler wrote: > On Fri, Mar 28, 2008 at 4:51 PM, James Bottomley > <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > ... > > So basically, most of the cpu_to_le32 in this driver look wrong. If I > > can fix it (or persuade someone else to fix it) can anyone test it on a > > BE platform? > > But the code I submitted the patch is also broken for LE platforms. > (As you pointed out earlier and was my original incentive for > submitting the patch). No ... it's correct on a LE platform .. the warning is superfluous we promote a u8 to a u32 and then complain when it's truncated to a u8 again. > If most of the usage is wrong anyway, perhaps it's better to > not pretend the driver can work on a BE platform and just rip > all the cpu_to_le32() usage out...including the one I submitted > the patch for. Either way, that change should go in. Right? Well, not really; the problem is it's not complete ... it only covers up the real problem by silencing the warning. If the actual BE pieces of the driver worked, you could make it correct either by making senselen a u32 and leaving the cpu_to_le32 or adding it to the point at which we assign it to bufflen. If you can verify my analysis of the way the driver works, then the complete fix should be pretty simple: just remove the cpu_to_le32 from everywhere except the sg list construction. James -- 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