public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Andrew E. Mileski" <andrewm@netwinder.org>
To: linux-kernel@vger.kernel.org
Subject: Re: Universal debug macros.
Date: Mon, 27 Nov 2000 12:19:07 -0500	[thread overview]
Message-ID: <3A22978B.30E6A29A@netwinder.org> (raw)
In-Reply-To: <Pine.LNX.3.95.1001127115313.153A-100000@chaos.analogic.com>

"Richard B. Johnson" wrote:
> 
> On Mon, 27 Nov 2000, Andrew E. Mileski wrote:
> >
> > Reminds me ... <linux/kernel.h> has a "#if DEBUG" statement that blows
> > up if the debug code does something like "#define DEBUG(X...) printk(X...)".
> > I came across this recently (think I was debugging PCI code ... not sure).
> > Changing it to "#ifdef DEBUG" avoids problems.
> >
> > --
> > Andrew E. Mileski - Software Engineer
> > Rebel.com  http://www.rebel.com/
> 
> I find that the following works fine:
> 
> #ifdef DEBUG
> #define DEB(f) f
> #else
> #define DEB(f)
> #endif

Agreed, but that wasn't my point.  There is debug code in the current
kernel that defines DEBUG to something non-numeric, which causes
the compile to barf on kernel.h in some cases (try defining DEBUG in
your Makefile).  Instances of the offending code (there are SEVERAL)
and kernel.h should be fixed.

Try this from the top level:
  grep -r DEBUG * | grep -v DEBUG_ | less

--
Andrew E. Mileski - Software Engineer
Rebel.com  http://www.rebel.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-27 17:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-26 17:53 [PATCH] removal of "static foo = 0" Elmer Joandi
2000-11-26 18:36 ` Alexander Viro
2000-11-26 19:11   ` Elmer Joandi
2000-11-26 22:49 ` Rogier Wolff
2000-11-26 23:30   ` Universal debug macros Elmer Joandi
2000-11-27  0:45     ` Rogier Wolff
2000-11-27  1:11       ` Elmer Joandi
2000-11-27  4:25         ` H. Peter Anvin
2000-11-27  5:19           ` Michael Meissner
2000-11-27 16:56           ` Chmouel Boudjnah
2000-11-27 17:47             ` H. Peter Anvin
2000-11-27 17:56               ` Chmouel Boudjnah
2000-11-27 17:58                 ` H. Peter Anvin
2000-11-27 18:10                   ` Chmouel Boudjnah
2000-11-27 18:28                     ` H. Peter Anvin
2000-11-27 18:39                       ` Chmouel Boudjnah
2000-11-27 18:41                         ` H. Peter Anvin
2000-11-27 21:09                   ` Gerhard Mack
2000-11-27  8:35         ` Rogier Wolff
2000-11-27 14:42           ` Elmer Joandi
2000-11-27 14:59             ` Rogier Wolff
2000-11-27 15:58               ` Elmer Joandi
2000-11-28  1:34                 ` Peter Samuelson
2000-11-27 16:37     ` Andrew E. Mileski
2000-11-27 17:01       ` Richard B. Johnson
2000-11-27 17:19         ` Andrew E. Mileski [this message]
2000-11-27 18:01           ` Richard B. Johnson
2000-11-27 19:55             ` Andrew E. Mileski

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=3A22978B.30E6A29A@netwinder.org \
    --to=andrewm@netwinder.org \
    --cc=linux-kernel@vger.kernel.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