* Can somebody with flex/bison experience help with genksyms?
@ 2005-12-19 21:40 Robin Holt
2005-12-20 0:05 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Robin Holt @ 2005-12-19 21:40 UTC (permalink / raw)
To: linux-ia64, linux-kernel, rth, bj0rn
The following code fails to generate a crc when run through genksyms.
#include <linux/module.h>
struct nodepda_s {
int z1, z2;
}
DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda);
EXPORT_PER_CPU_SYMBOL(__sn_nodepda);
While the following works:
#include <linux/module.h>
struct nodepda_s {
int z1, z2;
}
typedef struct nodepda_s * nodepda_s_p;
DEFINE_PER_CPU(nodepda_s_p, __sn_nodepda);
EXPORT_PER_CPU_SYMBOL(__sn_nodepda);
This appears to be due to the way STRUCT_KEYW is handled in parse.y as
compared to TYPEOF_KEYW. I know nothing about flex and bison. I am
just trolling for anybody willing to help. I believe the STRUCT_KEYW
handling would need to consume the *, but am not sure how that is
conditionally done.
Thanks,
Robin Holt
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Can somebody with flex/bison experience help with genksyms?
2005-12-19 21:40 Can somebody with flex/bison experience help with genksyms? Robin Holt
@ 2005-12-20 0:05 ` Andreas Schwab
2005-12-20 2:35 ` Robin Holt
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2005-12-20 0:05 UTC (permalink / raw)
To: Robin Holt; +Cc: linux-ia64, linux-kernel, rth, bj0rn
Robin Holt <holt@sgi.com> writes:
> The following code fails to generate a crc when run through genksyms.
>
> #include <linux/module.h>
>
> struct nodepda_s {
> int z1, z2;
> }
>
> DEFINE_PER_CPU(struct nodepda_s *, __sn_nodepda);
> EXPORT_PER_CPU_SYMBOL(__sn_nodepda);
>
> While the following works:
>
> #include <linux/module.h>
>
> struct nodepda_s {
> int z1, z2;
> }
>
> typedef struct nodepda_s * nodepda_s_p;
>
> DEFINE_PER_CPU(nodepda_s_p, __sn_nodepda);
> EXPORT_PER_CPU_SYMBOL(__sn_nodepda);
>
>
>
> This appears to be due to the way STRUCT_KEYW is handled in parse.y as
> compared to TYPEOF_KEYW. I know nothing about flex and bison. I am
> just trolling for anybody willing to help. I believe the STRUCT_KEYW
> handling would need to consume the *, but am not sure how that is
> conditionally done.
Does this patch help?
--- scripts/genksyms/parse.y.~1~ 2005-10-28 02:02:08.000000000 +0200
+++ scripts/genksyms/parse.y 2005-12-20 01:02:46.420239410 +0100
@@ -197,7 +197,7 @@ storage_class_specifier:
type_specifier:
simple_type_specifier
| cvar_qualifier
- | TYPEOF_KEYW '(' decl_specifier_seq ')'
+ | TYPEOF_KEYW '(' decl_specifier_seq m_abstract_declarator ')'
/* References to s/u/e's defined elsewhere. Rearrange things
so that it is easier to expand the definition fully later. */
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Can somebody with flex/bison experience help with genksyms?
2005-12-20 0:05 ` Andreas Schwab
@ 2005-12-20 2:35 ` Robin Holt
0 siblings, 0 replies; 3+ messages in thread
From: Robin Holt @ 2005-12-20 2:35 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Robin Holt, linux-ia64, linux-kernel, rth, bj0rn
On Tue, Dec 20, 2005 at 01:05:03AM +0100, Andreas Schwab wrote:
> - | TYPEOF_KEYW '(' decl_specifier_seq ')'
> + | TYPEOF_KEYW '(' decl_specifier_seq m_abstract_declarator ')'
Thank you. It was on the STRUCT_KEYW a few lines down and now it
works. I will post shortly.
Thanks,
Robin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-20 2:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-19 21:40 Can somebody with flex/bison experience help with genksyms? Robin Holt
2005-12-20 0:05 ` Andreas Schwab
2005-12-20 2:35 ` Robin Holt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox