lkml.org 
[lkml]   [2011]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions
From
Date
On Thu, 2011-09-08 at 16:52 -0700, Andrew Morton wrote:
> On Tue, 30 Aug 2011 14:28:41 -0400
> Jason Baron <jbaron@redhat.com> wrote:
> > Replace the repetitive struct _ddebug descriptor definitions with
> > a new DECLARE_DYNAMIC_DEBUG_META_DATA(name, fmt) macro.
> > +#define DECLARE_DYNAMIC_DEBUG_METADATA(name, fmt) \
> > + static struct _ddebug __used __aligned(8) \
> > + __attribute__((section("__verbose"))) name = { \
> > + .modname = KBUILD_MODNAME, \
> > + .function = __func__, \
> > + .filename = __FILE__, \
> > + .format = (fmt), \
> > + .lineno = __LINE__, \
> > + .flags = _DPRINTK_FLAGS_DEFAULT, \
> > + .enabled = false, \
> > + }
> <anal>That macro implements a definition, not a declaration</anal>

Andrew, that's not quite true and that's how
DECLARE is normally used in linux.

DECLARE_BITMAP, DECLARE_COMPLETION, DECLARE_RWSEM, etc.

A lot of the DEFINE_FOO(name) macros use ##name.




\
 
 \ /
  Last update: 2011-09-09 04:15    [from the cache]
©2003-2011 Jasper Spaans