On Wed, Jul 2, 2008 at 12:07 AM, Ben Warren <[EMAIL PROTECTED]> wrote:
<snip>

>> +#define WRITE_TXBUF(data) \
>> + do { \
>> +  *(volatile unsigned short *)(AX88180_BASE + TXBUFFER_START) \
>> +  = data; \
>> + } while (0)
>> +
> In this case, the do{...}while(0) is unnecessary.  Just make the
> assignment.

Sorry, I was wrong in this case - do{...}while(0) is correct.  Please
consider replacing all of these macros with static inline functions
though.  Much easier for everybody that way.

regards,
Ben

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to