Re: [PATCH -next] ia64/sn: fix percpu warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Tejun Heo <tj@xxxxxxxxxx> 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-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux