Re: [patch 00/25] dynamic-debug during module initialization

From: Jim Cromie
Date: Sat Dec 03 2011 - 10:57:21 EST


On Thu, Dec 1, 2011 at 2:20 PM, Jason Baron <jbaron@xxxxxxxxxx> wrote:
> On Wed, Nov 30, 2011 at 12:56:29PM -0700, jim.cromie@xxxxxxxxx wrote:
>> This patchset adds
>> - dynamic-debug during module initialization
>> - multiple queries
>>
>> Unlike previous versions, this drops pending-query approach in
>> favor of "fake module parameter" approach proposed by Thomas Renninger.
>>     https://lkml.org/lkml/2010/9/15/397
>>
>> Its based upon v3.2-rc3, cuz it includes a few adjustments to
>> dynamic_debug.h which are not in driver-core-next atm.
>>
>>
>> 1     bug-fix for kernel/module.c under DEBUGP
>> 2     whitespace cleanup
>> 3-12  dynamic-debug cleanups, should be relatively uncontroversial
>> 13-17 multiple queries in ddebug_query="..."
>>
>> 18-25 fake module parameter
>> 20    maybe fold into 18 (kept separate since 18 is Thomas's work)
>> 23    *.dyndbg=...
>> 25    BUILD_BUG_DECL (likely discussion point ;-)
>>
>
> I like 25, it truly makes 'dyndbg' a reserved module parameter, which is the
> intention.
>

heres a failing usage:

...
#include <linux/device.h>
#include <linux/netdevice.h>

BUILD_BUG_DECL(foo,(1==1));

heres what it looks like expanded:

static struct __BUILD_BUG_DECL_foo { int __BUILD_BUG_DECL_foo[1 -
2*!!(1==1)]; } __BUILD_BUG_DECL_foo[0] __attribute__((unused));

and heres the error:

CALL /home/jimc/projects/lx/linux-2.6/scripts/checksyscalls.sh
CC lib/dynamic_debug.o
/home/jimc/projects/lx/linux-2.6/lib/dynamic_debug.c:37:42: error:
size of array ‘__BUILD_BUG_DECL_foo’ is negative
make[3]: *** [lib/dynamic_debug.o] Error 1


I havent seen any unused-var warnings, but maybe Ive not stimulated it enough.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/