From ef8ff89b58546055e238c3b521f83b440dfe8ef2 Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Tue, 9 Mar 2010 16:00:20 +0100 Subject: kbuild: Really don't clean bounds.h and asm-offsets.h Commit 7d3cc8b tried to keep bounds.h and asm-offsets.h during make clean by filtering these out of $(clean-files), but they are listed in $(targets) and $(always) and thus removed automatically. Introduce a new $(no-clean-files) variable to really skip such files in Makefile.clean. Signed-off-by: Michal Marek --- scripts/Makefile.clean | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 6f89fbb5625..686cb0d31c7 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -45,6 +45,8 @@ __clean-files := $(extra-y) $(always) \ $(host-progs) \ $(hostprogs-y) $(hostprogs-m) $(hostprogs-) +__clean-files := $(filter-out $(no-clean-files), $(__clean-files)) + # as clean-files is given relative to the current directory, this adds # a $(obj) prefix, except for absolute paths -- cgit v1.2.3-18-g5258 From cbcf14a942eb06d031628046739b983e84b383bf Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 17 Aug 2010 13:36:40 +0300 Subject: scripts/mod/modpost.c: fix commentary accordingly to last changes The last commits 37ed19d5cce35a40d3913cf9aa208ce9f60db3d7 5003bab82d56754b27be01eef24495a02e00039d have introduced new behaviour of sec2annotation() method. However, the commentary inside the method was left as before. Let's fix it accordingly. Signed-off-by: Andy Shevchenko Cc: Rusty Russell Cc: Andrew Morton Acked-by: WANG Cong Signed-off-by: Michal Marek --- scripts/mod/modpost.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index c827309c29c..859bee4972e 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1193,6 +1193,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, * .cpuinit.data => __cpudata * .memexitconst => __memconst * etc. + * + * The memory of returned value has been allocated on a heap. The user of this + * method should free it after usage. */ static char *sec2annotation(const char *s) { @@ -1215,7 +1218,7 @@ static char *sec2annotation(const char *s) strcat(p, "data "); else strcat(p, " "); - return r; /* we leak her but we do not care */ + return r; } else { return ""; } -- cgit v1.2.3-18-g5258 From c3e2f196f9862cd75cb7f495a3cd1f1bbb82bb40 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 6 Sep 2010 11:57:19 +0200 Subject: scripts/setlocalversion: update comment A tagged repository state isn't enough, git describe only looks at signed or annotated tags (git tag -a/-s). This documentation update makes sure the comment matches the current behaviour. Signed-off-by: Michael Prokop Signed-off-by: Michal Marek --- scripts/setlocalversion | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/setlocalversion b/scripts/setlocalversion index e90a91cc518..dc54b198295 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -160,8 +160,10 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then # full scm version string res="$res$(scm_version)" else - # apped a plus sign if the repository is not in a clean tagged - # state and LOCALVERSION= is not specified + # append a plus sign if the repository is not in a clean + # annotated or signed tagged state (as git describe only + # looks at signed or annotated tags - git tag -a/-s) and + # LOCALVERSION= is not specified if test "${LOCALVERSION+set}" != "set"; then scm=$(scm_version --short) res="$res${scm:++}" -- cgit v1.2.3-18-g5258 From ef894870c6c38580e540c29cfb22a827d54a950a Mon Sep 17 00:00:00 2001 From: Jean Sacren Date: Fri, 10 Sep 2010 23:13:33 -0600 Subject: scripts/kallsyms: Enable error messages while hush up unnecessary warnings As no error was handled, we wouldn't be able to know when an error does occur. The fix preserves error messages while it doesn't let unnecessary compiling warnings show up. Signed-off-by: Jean Sacren Signed-off-by: Michal Marek --- scripts/kallsyms.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index e3902fb39af..60dd3eb9366 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -107,12 +107,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); if (rc != 3) { - if (rc != EOF) { - /* skip line. sym is used as dummy to - * shut of "warn_unused_result" warning. - */ - sym = fgets(str, 500, in); - } + if (rc != EOF && fgets(str, 500, in) == NULL) + fprintf(stderr, "Read error or end of file.\n"); return -1; } -- cgit v1.2.3-18-g5258 From d63f6d1b4d3ad0d88685a5f8eb1c3cac01ddd0db Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 19 Oct 2010 16:11:53 -0400 Subject: initramfs: Fix build break on symbol-prefixed archs Signed-off-by: Mike Frysinger Signed-off-by: Michal Marek --- scripts/Makefile.lib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 54fd1b70013..e93525c5e91 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -128,7 +128,9 @@ _c_flags += $(if $(patsubst n%,, \ endif ifdef CONFIG_SYMBOL_PREFIX -_cpp_flags += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) +_sym_flags = -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) +_cpp_flags += $(_sym_flags) +_a_flags += $(_sym_flags) endif -- cgit v1.2.3-18-g5258