* [PATCH] genksyms: Handle string literals with spaces in reference files
@ 2015-12-09 15:06 Michal Marek
2015-12-10 10:08 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Michal Marek @ 2015-12-09 15:06 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel
The reference files use spaces to separate tokens, however, we must
preserve spaces inside string literals. Currently the only case in the
tree is struct edac_raw_error_desc in <linux/edac.h>:
$ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
$ mv drivers/edac/amd64_edac.{symtypes,symref}
$ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
drivers/edac/amd64_edac.c:527: warning: amd64_get_dram_hole_info: modversion changed because of changes in struct edac_raw_error_desc
Signed-off-by: Michal Marek <mmarek@suse.com>
---
scripts/genksyms/genksyms.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 88632df4381b..dafaf96e0a34 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -423,13 +423,15 @@ static struct string_list *read_node(FILE *f)
struct string_list node = {
.string = buffer,
.tag = SYM_NORMAL };
- int c;
+ int c, in_string = 0;
while ((c = fgetc(f)) != EOF) {
- if (c == ' ') {
+ if (!in_string && c == ' ') {
if (node.string == buffer)
continue;
break;
+ } else if (c == '"') {
+ in_string = !in_string;
} else if (c == '\n') {
if (node.string == buffer)
return NULL;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] genksyms: Handle string literals with spaces in reference files
2015-12-09 15:06 [PATCH] genksyms: Handle string literals with spaces in reference files Michal Marek
@ 2015-12-10 10:08 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2015-12-10 10:08 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel
Dne 9.12.2015 v 16:06 Michal Marek napsal(a):
> The reference files use spaces to separate tokens, however, we must
> preserve spaces inside string literals. Currently the only case in the
> tree is struct edac_raw_error_desc in <linux/edac.h>:
>
> $ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
> $ mv drivers/edac/amd64_edac.{symtypes,symref}
> $ KBUILD_SYMTYPES=1 make -s drivers/edac/amd64_edac.symtypes
> drivers/edac/amd64_edac.c:527: warning: amd64_get_dram_hole_info: modversion changed because of changes in struct edac_raw_error_desc
>
> Signed-off-by: Michal Marek <mmarek@suse.com>
Applied to kbuild.git#kbuild.
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-10 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 15:06 [PATCH] genksyms: Handle string literals with spaces in reference files Michal Marek
2015-12-10 10:08 ` Michal Marek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.