From f82935ebd6adf554787c273cdc91d2d6ef1eaf51 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 17 May 2013 14:18:35 +0200 Subject: scripts/mod: Spelling s/DEVICEVTABLE/DEVICETABLE/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Michal Marek --- scripts/mod/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/mod') diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 75d59fcd48b8..ae21b898aba8 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -15,8 +15,8 @@ endef quiet_cmd_offsets = GEN $@ define cmd_offsets (set -e; \ - echo "#ifndef __DEVICEVTABLE_OFFSETS_H__"; \ - echo "#define __DEVICEVTABLE_OFFSETS_H__"; \ + echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \ + echo "#define __DEVICETABLE_OFFSETS_H__"; \ echo "/*"; \ echo " * DO NOT MODIFY."; \ echo " *"; \ -- cgit From bd70134396622ea50b14e34dae0810879884d553 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 29 May 2013 13:18:56 +0100 Subject: improve modalias building For one, there's no point in the respective pieces to be rebuilt unconditionally on each and every rebuild. Second there's no need to invent a custom rule for generating the .s file from the .c source - we can simply use the generic rule here. And finally, $(obj) should be used to refer to files in the build tree (rather than spelling out the subdirectory). Signed-off-by: Jan Beulich Signed-off-by: Michal Marek --- scripts/mod/Makefile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'scripts/mod') diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index ae21b898aba8..c11212ff3510 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -29,15 +29,10 @@ define cmd_offsets echo "#endif" ) > $@ endef -# We use internal kbuild rules to avoid the "is up to date" message from make -scripts/mod/devicetable-offsets.s: scripts/mod/devicetable-offsets.c FORCE - $(Q)mkdir -p $(dir $@) - $(call if_changed_dep,cc_s_c) +$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s + $(call if_changed,offsets) -$(obj)/$(devicetable-offsets-file): scripts/mod/devicetable-offsets.s - $(call cmd,offsets) - -targets += $(devicetable-offsets-file) +targets += $(devicetable-offsets-file) devicetable-offsets.s # dependencies on generated files need to be listed explicitly -- cgit From 04130cc973a96df33b1429024fd6dec59fa35a84 Mon Sep 17 00:00:00 2001 From: Daniel Tang Date: Sun, 9 Jun 2013 12:33:55 +1000 Subject: Fix a build warning in scripts/mod/file2alias.c On some systems, __used is already defined in sys/cdefs.h and causes a build warning: scripts/mod/file2alias.c:85:1: warning: "__used" redefined In file included from /usr/include/stdio.h:64, from scripts/mod/modpost.h:1, from scripts/mod/file2alias.c:13: /usr/include/sys/cdefs.h:146:1: warning: this is the location of the previous definition This adds an extra check before defining the __used macro to see if the macro was already defined elsewhere. Signed-off-by: Daniel Tang Signed-off-by: Michal Marek --- scripts/mod/file2alias.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts/mod') diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 45f9a3377dcd..ab554564569a 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -79,10 +79,12 @@ struct devtable **__start___devtable, **__stop___devtable; extern struct devtable *__start___devtable[], *__stop___devtable[]; #endif /* __MACH__ */ -#if __GNUC__ == 3 && __GNUC_MINOR__ < 3 -# define __used __attribute__((__unused__)) -#else -# define __used __attribute__((__used__)) +#if !defined(__used) +# if __GNUC__ == 3 && __GNUC_MINOR__ < 3 +# define __used __attribute__((__unused__)) +# else +# define __used __attribute__((__used__)) +# endif #endif /* Define a variable f that holds the value of field f of struct devid -- cgit