<font size=2 face="sans-serif">Hi Cyril and Jeremy,</font><br><font size=2 face="sans-serif">I'm sorry for that. </font><br><font size=2 face="sans-serif">This morning I changed my code and </font><tt><font size=2>accidentally
pushed to github</font></tt><font size=2 face="sans-serif"> before I found
your reviews. I will </font><tt><font size=2>be more careful in future.</font></tt><br><br><font size=3 color=#424282 face="Calibri">Regards,</font><br><br><font size=3 color=#424282 face="Calibri">William Li ( Li Nan, Àîéª
) </font><br><font size=3 color=#424282 face="Calibri"> </font><br><br><font size=3 color=#424282 face="Calibri">Firmware Engineering Professional</font><br><font size=3 color=#424282 face="Calibri">OpenPower AE Team | IBM System
& Technology Lab</font><br><font size=3 color=#424282 face="Calibri">Mobile: +86-186-1081 6605</font><br><br><font size=3 color=#424282 face="Calibri">Beijing, China</font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Cyril Bur <cyrilbur@gmail.com></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Nan KX Li/China/IBM@IBMCN</font><br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">Jeremy Kerr <jk@ozlabs.org>,
openbmc@lists.ozlabs.org</font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">05/26/2016 12:04</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [PATCH openpower-host-ipmi-oem
v2] Fix endianness issue5</font><br><hr noshade><br><br><br><tt><font size=2>On Thu, 26 May 2016 10:25:34 +0800<br>Jeremy Kerr <jk@ozlabs.org> wrote:<br><br>> Hi Nan,<br>> <br><br>Hi Nan,<br><br>I responded to v1 of your patch. You have sent exactly the same code as
v2. <br><br>One of two things has happened:<br>One you accidentally triggered github to send a v2 (which admittedly is
easy to<br>do), please try to be more careful in future, this creates a lot of pointless<br>noise on the list and leads to double reviews, Jeremy has made the same
point<br>I previously have.<br>Two you're ignoring reviews to your patches and sending subsequent versions...<br>why do you do this?<br><br>> You seem to have a minor typo in the commit title there.<br>> <br>> > -
// TODO: Issue 5: This is not endian-safe.<br>> > -
short *recid = (short*) &reqptr->selrecordls;<br>> > -
short *offset = (short*) &reqptr->offsetls;<br>> > +<br>> > +
unsigned short recid = ((unsigned short) reqptr->selrecordms)
<< 8 + reqptr->selrecordls;<br>> > +
unsigned short offset = ((unsigned short) reqptr->offsetms) <<
8 + reqptr->offsetls; <br>> <br>> That won't do the endian conversion correctly. Can you use one of
the<br>> existing endian conversion functions?<br>> <br>> The le16toh() function is probably what you want here, from endian.h.<br>> <br>> Also, be careful of the change from 'short' to 'unsigned short'.<br>> <br>> Regards,<br>> <br>> <br>> Jeremy<br>> _______________________________________________<br>> openbmc mailing list<br>> openbmc@lists.ozlabs.org<br>> </font></tt><a href=https://lists.ozlabs.org/listinfo/openbmc><tt><font size=2>https://lists.ozlabs.org/listinfo/openbmc</font></tt></a><tt><font size=2><br><br></font></tt><br><BR>