On Thu, 10 Mar 2005, Andreas Schwab wrote: > Greg Howard <[EMAIL PROTECTED]> writes: > > > On Thu, 10 Mar 2005, Andreas Schwab wrote: > > > >> > >> Or even better: replace scdrv_buffer_to_int by be32_to_cpup. > > > > Sounds like a good idea. Will be32_to_cpup work if the > > argument isn't word-aligned? > > Probably not, ie. it will result in an unaligned access.
Hmmm... Well, for what it's worth I went ahead and tried it, and it worked. Looking at the code and how my test behaved (it worked correctly and interpreted an entire event buffer), I don't see anyway I could have *avoided* passing a non-word-aligned pointer to be32_to_cpup at some point in the byte stream-- but I didn't see any hiccups, still less an unaligned access error. Maybe the compiler is doing me a favor behind the scenes...? Anyhow, it seems to work, so unless you or others have misgivings I'm inclined to let the revised patch (as I sent it earlier today) stand. Thanks all for your help. - Greg - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
