[U-Boot-Users] [PATCH][resubmit] AX88180: new gigabit network driver

Ben Warren biggerbadderben at gmail.com
Wed Jul 2 09:49:00 CEST 2008


On Wed, Jul 2, 2008 at 12:07 AM, Ben Warren <bwarren at qstreams.com> 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




More information about the U-Boot mailing list