linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Steinmetz <ast@domdv.de>
To: Thunder from the hill <thunder@lightweight.ods.org>
Cc: Bob_Tracy <rct@gherkin.frus.com>,
	dag@brattli.net, linux-kernel@vger.kernel.org
Subject: Re: 2.5.34: IR __FUNCTION__ breakage
Date: Fri, 13 Sep 2002 18:01:13 +0200	[thread overview]
Message-ID: <3D820BC9.5080207@domdv.de> (raw)
In-Reply-To: Pine.LNX.4.44.0209121414570.10048-100000@hawkeye.luckynet.adm



Thunder from the hill wrote:
> Hi,
> 
> On Thu, 12 Sep 2002, Bob_Tracy wrote:
> 
>>define DERROR(dbg, args...) \
>>	{if(DEBUG_##dbg){\
>>		printk(KERN_INFO "irnet: %s(): ", __FUNCTION__);\
>>		printk(KERN_INFO args);}}
>>
>>which strikes me as not quite what the author intended, although it
>>should work.
> 
> 
> Why not
> 
> #define DERROR(dbg, fmt, args...) \
> 	do { if (DEBUG_##dbg) \
> 		printk(KERN_INFO "irnet: %s(): " fmt, __FUNCTION, args); \
> 	} while(0)
> 
> ?
> 
> 			Thunder

At least for gcc 3.2 this would be better:

#define DERROR(dbg, fmt, args...) \
     do { if (DEBUG_##dbg) \
         printk(KERN_INFO "irnet: %s(): " fmt, __FUNCTION__, ##args); \
     } while(0)

Unfortunately this doesn't work with gcc 2.95.3.

-- 
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH


  parent reply	other threads:[~2002-09-13 15:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 19:54 2.5.34: IR __FUNCTION__ breakage Bob_Tracy
2002-09-12 20:16 ` Thunder from the hill
2002-09-12 21:09   ` Bob_Tracy
2002-09-13 16:01   ` Andreas Steinmetz [this message]
2002-09-13 16:14     ` Thunder from the hill
2002-09-13 17:46       ` Ahmed Masud
2002-09-13 18:01         ` Andreas Steinmetz
2002-09-13 20:11         ` Thunder from the hill
2002-09-13 20:12     ` Neil Booth
2002-09-13 20:30       ` Andreas Steinmetz
2002-09-13 20:53         ` Thunder from the hill

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=3D820BC9.5080207@domdv.de \
    --to=ast@domdv.de \
    --cc=dag@brattli.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rct@gherkin.frus.com \
    --cc=thunder@lightweight.ods.org \
    /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;
as well as URLs for NNTP newsgroup(s).