From: Louis Date: Wed, 2 Jul 2008 19:29:42 +0800 Subject: [U-Boot-Users] [PATCH][resubmit] AX88180: new gigabit network driver References: <003f01c8db64$76c343a0$0100a8c0@louis> <486B2930.30404@qstreams.com> Message-ID: <008401c8dc36$ee097100$0100a8c0@louis> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ben, Thanks for your suggestion; I will correct the driver as soon as possible. And I make a mistake in sending the mail through outlook express, hence making indentation problems. ----- Original Message ----- From: "Ben Warren" To: "Ben Warren" Cc: "Louis" ; ; "[???]"" ; ""ASIX Donald at sc8-sf-spam2-b.sourceforge.net" <=?windows-1252?Q?=22ASIX_Donald?=@sc8-sf-spam2-b.sourceforge.net> Sent: Wednesday, July 02, 2008 3:49 PM Subject: Re: [U-Boot-Users] [PATCH][resubmit] AX88180: new gigabit network driver > On Wed, Jul 2, 2008 at 12:07 AM, Ben Warren wrote: > > >>> +#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 >