[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <4AEB1CD4020000780001CD66@vpn.id2.novell.com>
Date: Fri, 30 Oct 2009 16:05:24 +0000
From: "Jan Beulich" <JBeulich@...ell.com>
To: "Tony Luck" <tony.luck@...el.com>, "Tejun Heo" <tj@...nel.org>
Cc: "Stephen Rothwell" <sfr@...b.auug.org.au>,
"akpm" <akpm@...ux-foundation.org>,
"Randy Dunlap" <randy.dunlap@...cle.com>,
"Sam Ravnborg" <sam@...nborg.org>,
"Andreas Gruenbacher" <agruen@...e.de>,
"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
"LKML" <linux-kernel@...r.kernel.org>,
"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>
Subject: Re: [PATCH -next] ia64/sn: fix percpu warnings
>>> Tejun Heo <tj@...nel.org> 29.10.09 16:43 >>>
>So, the problem is that genksyms can't understand the following.
>
> __typeof__(int [10]) my_ar;
> EXPORT_SYMBOL(my_ar);
In fact almost no use of typeof() works with genksyms: Out of
#include <linux/module.h>
extern int x;
#define export(t, n) typeof(t) export_##n; EXPORT_SYMBOL(export_##n)
export(x, a);
export(&x, b);
export(int, c);
export(int*, d);
export(int**, e);
export(int[4], f);
export(typeof(x), g);
export(typeof(&x), h);
export(typeof(x)*, i);
only c and d get a non-zero CRC. This is clearly due to the naive parsing
scripts/genksyms/parse.y does:
type_specifier:
simple_type_specifier
| cvar_qualifier
| TYPEOF_KEYW '(' decl_specifier_seq '*' ')'
| TYPEOF_KEYW '(' decl_specifier_seq ')'
...
>Would it be difficult to teach it how to parse it?
For someone familiar with bison/yacc this would seem not very difficult
a job, but as far as I'm concerned this is not something I would feel
comfortable trying to fix. Of course one could go the simplistic route
and just add the array case here, but imo this wouldn't be the right
way to deal with it.
Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists