mount_smbfs
John-Mark Gurney
jmg at funkthat.com
Fri Jan 23 21:54:56 UTC 2015
Warner Losh wrote this message on Fri, Jan 23, 2015 at 13:21 -0800:
>
> > On Jan 23, 2015, at 11:54 AM, John-Mark Gurney <jmg at funkthat.com> wrote:
> >
> > Daisuke Aoyama wrote this message on Sat, Jan 24, 2015 at 03:07 +0900:
> >> Quick hack patch is attached.
> >
> > Please use {l,b}e16dec, or if the code is suppose to be native endian,
> > make it dependant on __NO_STRICT_ALIGNMENT and add the proper endian
> > swap, not __arm__ as there are other arches that require the same fix...
>
> If there???s just a couple of places that need this, don???t bother making them dependent
> on __NO_STRICT_ALIGNMENT. That clutters things up a bit too much. Given the 3
> or 4 places this is used, and the relative infrequency of the calls, just doing a memcpy
> unconditionally is always correct and reduces the risk of one branch of the #if being
> changed w/o the other. Since it is already using NBENCODE(), I think that using
> {l,b}e16enc (not dec) would be a larger code churn.
Clearly neither of us looked at the code closely... NBENCODE should be
rewritten to take a pointer and use le16enc... Then memsetw should just
call NBENCODE internally as it goes...
Also, as this is in contrib, the patch should be submitted upstream...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-arm
mailing list