public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 08/13] SPARC: added SMC91111 driver in and out macros for LEON processors.
Date: Mon, 31 Mar 2008 10:15:05 -0400	[thread overview]
Message-ID: <47F0F1E9.3080009@gmail.com> (raw)
In-Reply-To: <20080331111242.GA29923@mail.gnudd.com>

Alessandro Rubini wrote:
>>> +#define SMC_insb(r,b,l) 	({	int __i ;  \
>>> +					byte *__b2;  \
>>> +			    		__b2 = (byte *) b;  \
>>> +			    		for (__i = 0; __i < l; __i++) {  \
>>> +					  *(__b2 + __i) = SMC_inb(r);  \
>>> +					  SMC_inb(0);  \
>>> +					};  \
>>> +				})
>>>       
>
>   
>> [...] it's generally considered good form to wrap multi-line macros with 
>> do {...} while(0) in order to avoid compiler issues.
>>     
>
> But this is the "expression statement" gcc slang. the do/while0 thing
> avoids if/else problems but isn't an expression, it is a statement.
> This has no issue with if/else (no trailing semicolon or brace) and
> moreover it is an expression.
>
>   
Oh, I see.  Thanks for taking the time Alessandro.  I'm putting this 
back on list so others can be educated too.

regards,
Ben

  parent reply	other threads:[~2008-03-31 14:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 19:22 [U-Boot-Users] [PATCH 01/13] SPARC: Added generic support for SPARC architecture Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 02/13] SPARC: added SPARC board information to the command bdinfo Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 03/13] SPARC: added SPARC support for new uimage in common code Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 04/13] SPARC: Added support for SPARC LEON3 SOC processor Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 05/13] SPARC/LEON3: Added AMBA Bus Plug&Play information print command (ambapp) Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 06/13] SPARC: Added support for SPARC LEON2 SOC Processor Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 07/13] SPARC/LEON3: Added GRETH Ethernet 10/100/1000 driver Daniel Hellstrom
2008-03-30  4:35   ` Ben Warren
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 08/13] SPARC: added SMC91111 driver in and out macros for LEON processors Daniel Hellstrom
2008-03-30  4:29   ` Ben Warren
     [not found]   ` <20080331111242.GA29923@mail.gnudd.com>
2008-03-31 14:15     ` Ben Warren [this message]
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 09/13] SPARC/LEON3: added support for GR-XC3S-1500 board with GRLIB template design Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 10/13] SPARC/LEON3: added support for Gaisler GRSIM/TSIM2 SPARC/LEON3 simulatorn Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 11/13] SPARC/LEON3: added support for Altera NIOS Development kit (STRATIX II Edition) with GRLIB template design Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 12/13] SPARC/LEON3: added support for GR-CPCI-AX2000 FPGA AX board Daniel Hellstrom
2008-03-28 19:22 ` [U-Boot-Users] [PATCH 13/13] SPARC/LEON2: added support for Gaisler simulator GRSIM/TSIM for SPARC/LEON2 targets Daniel Hellstrom
  -- strict thread matches above, loose matches on Subject: below --
2008-03-31 14:25 [U-Boot-Users] [PATCH 08/13] SPARC: added SMC91111 driver in and out macros for LEON processors Daniel Hellstrom
2008-03-31 14:21 ` Ben Warren
2008-03-31 14:40   ` Daniel Hellstrom
2008-03-31 14:53     ` Ben Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47F0F1E9.3080009@gmail.com \
    --to=biggerbadderben@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox