History

Merge airlied/drm-next into drm-misc-next

Backmerging to pick up a fix from drm-misc-next-fixes.

Sean Paul committed 8 years ago

Commit 83fd26c2 parents 4165791 694f54f1706 files · +81704 −12408Browse files

Showing the changes to scripts (16 of 1706 files). Show all

Unified · Split

16 files
  1. scripts/Makefile.build +8 −0
  2. scripts/Makefile.lib +4 −4
  3. scripts/basic/fixdep.c +5 −10
  4. scripts/bloat-o-meter +1 −1
  5. scripts/coccinelle/api/memdup.cocci +2 −2
  6. scripts/kallsyms.c +1 −1
  7. scripts/kconfig/confdata.c +1 −1
  8. scripts/kconfig/kxgettext.c +1 −1
  9. scripts/kconfig/lkc.h +1 −0
  10. scripts/kconfig/lxdialog/check-lxdialog.sh +2 −1
  11. scripts/kconfig/menu.c +1 −0
  12. scripts/kconfig/symbol.c +2 −2
  13. scripts/kconfig/util.c +11 −0
  14. scripts/kconfig/zconf.l +4 −8
  15. scripts/kconfig/zconf.y +2 −1
  16. scripts/link-vmlinux.sh +1 −1
scripts/Makefile.build+8−0
@@ -256,6 +256,8 @@ __objtool_obj := $(objtree)/tools/objtool/objtool · 255 unmodified lines
256 256
257objtool_args = $(if $(CONFIG_UNWINDER_ORC),orc generate,check)257objtool_args = $(if $(CONFIG_UNWINDER_ORC),orc generate,check)
258 258
259objtool_args += $(if $(part-of-module), --module,)
260
259ifndef CONFIG_FRAME_POINTER261ifndef CONFIG_FRAME_POINTER
260objtool_args += --no-fp262objtool_args += --no-fp
261endif263endif
@@ -264,6 +266,12 @@ objtool_args += --no-unreachable · 2 unmodified lines
264else266else
265objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)267objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
266endif268endif
269ifdef CONFIG_RETPOLINE
270ifneq ($(RETPOLINE_CFLAGS),)
271 objtool_args += --retpoline
272endif
273endif
274
267 275
268ifdef CONFIG_MODVERSIONS276ifdef CONFIG_MODVERSIONS
269objtool_o = $(@D)/.tmp_$(@F)277objtool_o = $(@D)/.tmp_$(@F)
scripts/Makefile.lib+4−4
@@ -297,11 +297,11 @@ cmd_dt_S_dtb= \ · 296 unmodified lines
297 echo '\#include <asm-generic/vmlinux.lds.h>'; \297 echo '\#include <asm-generic/vmlinux.lds.h>'; \
298 echo '.section .dtb.init.rodata,"a"'; \298 echo '.section .dtb.init.rodata,"a"'; \
299 echo '.balign STRUCT_ALIGNMENT'; \299 echo '.balign STRUCT_ALIGNMENT'; \
300 echo '.global __dtb_$(*F)_begin'; \300 echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
301 echo '__dtb_$(*F)_begin:'; \301 echo '__dtb_$(subst -,_,$(*F))_begin:'; \
302 echo '.incbin "$<" '; \302 echo '.incbin "$<" '; \
303 echo '__dtb_$(*F)_end:'; \303 echo '__dtb_$(subst -,_,$(*F))_end:'; \
304 echo '.global __dtb_$(*F)_end'; \304 echo '.global __dtb_$(subst -,_,$(*F))_end'; \
305 echo '.balign STRUCT_ALIGNMENT'; \305 echo '.balign STRUCT_ALIGNMENT'; \
306) > $@306) > $@
307 307
scripts/basic/fixdep.c+5−10
@@ -93,14 +93,6 @@ · 92 unmodified lines
93 * (Note: it'd be easy to port over the complete mkdep state machine,93 * (Note: it'd be easy to port over the complete mkdep state machine,
94 * but I don't think the added complexity is worth it)94 * but I don't think the added complexity is worth it)
95 */95 */
96/*
97 * Note 2: if somebody writes HELLO_CONFIG_BOOM in a file, it will depend onto
98 * CONFIG_BOOM. This could seem a bug (not too hard to fix), but please do not
99 * fix it! Some UserModeLinux files (look at arch/um/) call CONFIG_BOOM as
100 * UML_CONFIG_BOOM, to avoid conflicts with /usr/include/linux/autoconf.h,
101 * through arch/um/include/uml-config.h; this fixdep "bug" makes sure that
102 * those files will have correct dependencies.
103 */
104 96
105#include <sys/types.h>97#include <sys/types.h>
106#include <sys/stat.h>98#include <sys/stat.h>
@@ -233,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub) · 126 unmodified lines
233static void parse_config_file(const char *p)225static void parse_config_file(const char *p)
234{226{
235 const char *q, *r;227 const char *q, *r;
228 const char *start = p;
236 229
237 while ((p = strstr(p, "CONFIG_"))) {230 while ((p = strstr(p, "CONFIG_"))) {
231 if (p > start && (isalnum(p[-1]) || p[-1] == '_')) {
232 p += 7;
233 continue;
234 }
238 p += 7;235 p += 7;
239 q = p;236 q = p;
240 while (*q && (isalnum(*q) || *q == '_'))237 while (*q && (isalnum(*q) || *q == '_'))
@@ -286,8 +283,6 @@ static int is_ignored_file(const char *s, int len) · 45 unmodified lines
286{283{
287 return str_ends_with(s, len, "include/generated/autoconf.h") ||284 return str_ends_with(s, len, "include/generated/autoconf.h") ||
288 str_ends_with(s, len, "include/generated/autoksyms.h") ||285 str_ends_with(s, len, "include/generated/autoksyms.h") ||
289 str_ends_with(s, len, "arch/um/include/uml-config.h") ||
290 str_ends_with(s, len, "include/linux/kconfig.h") ||
291 str_ends_with(s, len, ".ver");286 str_ends_with(s, len, ".ver");
292}287}
293 288
scripts/bloat-o-meter+1−1
@@ -15,7 +15,7 @@ signal(SIGPIPE, SIG_DFL) · 14 unmodified lines
15if len(sys.argv) < 3:15if len(sys.argv) < 3:
16 sys.stderr.write("usage: %s [option] file1 file2\n" % sys.argv[0])16 sys.stderr.write("usage: %s [option] file1 file2\n" % sys.argv[0])
17 sys.stderr.write("The options are:\n")17 sys.stderr.write("The options are:\n")
18 sys.stderr.write("-c cateogrize output based on symbole type\n")18 sys.stderr.write("-c categorize output based on symbol type\n")
19 sys.stderr.write("-d Show delta of Data Section\n")19 sys.stderr.write("-d Show delta of Data Section\n")
20 sys.stderr.write("-t Show delta of text Section\n")20 sys.stderr.write("-t Show delta of text Section\n")
21 sys.exit(-1)21 sys.exit(-1)
scripts/coccinelle/api/memdup.cocci+2−2
@@ -56,10 +56,10 @@ statement S; · 55 unmodified lines
56p << r.p;56p << r.p;
57@@57@@
58 58
59coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep")59coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup")
60 60
61@script:python depends on report@61@script:python depends on report@
62p << r.p;62p << r.p;
63@@63@@
64 64
65coccilib.report.print_report(p[0], "WARNING opportunity for kmemdep")65coccilib.report.print_report(p[0], "WARNING opportunity for kmemdup")
scripts/kallsyms.c+1−1
@@ -595,7 +595,7 @@ static void optimize_result(void) · 594 unmodified lines
595 * original char code */595 * original char code */
596 if (!best_table_len[i]) {596 if (!best_table_len[i]) {
597 597
598 /* find the token with the breates profit value */598 /* find the token with the best profit value */
599 best = find_best_token();599 best = find_best_token();
600 if (token_profit[best] == 0)600 if (token_profit[best] == 0)
601 break;601 break;
scripts/kconfig/confdata.c+1−1
@@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 177 unmodified lines
178 case S_HEX:178 case S_HEX:
179 done:179 done:
180 if (sym_string_valid(sym, p)) {180 if (sym_string_valid(sym, p)) {
181 sym->def[def].val = strdup(p);181 sym->def[def].val = xstrdup(p);
182 sym->flags |= def_flags;182 sym->flags |= def_flags;
183 } else {183 } else {
184 if (def != S_DEF_AUTO)184 if (def != S_DEF_AUTO)
scripts/kconfig/kxgettext.c+1−1
@@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option, · 100 unmodified lines
101 if (self->files == NULL)101 if (self->files == NULL)
102 goto out_fail;102 goto out_fail;
103 103
104 self->msg = strdup(msg);104 self->msg = xstrdup(msg);
105 if (self->msg == NULL)105 if (self->msg == NULL)
106 goto out_fail_msg;106 goto out_fail_msg;
107 107
scripts/kconfig/lkc.h+1−0
@@ -115,6 +115,7 @@ int file_write_dep(const char *name); · 114 unmodified lines
115void *xmalloc(size_t size);115void *xmalloc(size_t size);
116void *xcalloc(size_t nmemb, size_t size);116void *xcalloc(size_t nmemb, size_t size);
117void *xrealloc(void *p, size_t size);117void *xrealloc(void *p, size_t size);
118char *xstrdup(const char *s);
118 119
119struct gstr {120struct gstr {
120 size_t len;121 size_t len;
scripts/kconfig/lxdialog/check-lxdialog.sh+2−1
@@ -55,7 +55,8 @@ EOF · 54 unmodified lines
55 echo " *** required header files." 1>&255 echo " *** required header files." 1>&2
56 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&256 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
57 echo " *** " 1>&257 echo " *** " 1>&2
58 echo " *** Install ncurses (ncurses-devel) and try again." 1>&258 echo " *** Install ncurses (ncurses-devel or libncurses-dev " 1>&2
59 echo " *** depending on your distribution) and try again." 1>&2
59 echo " *** " 1>&260 echo " *** " 1>&2
60 exit 161 exit 1
61 fi62 fi
scripts/kconfig/menu.c+1−0
@@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg) · 211 unmodified lines
212 sym_defconfig_list = current_entry->sym;212 sym_defconfig_list = current_entry->sym;
213 else if (sym_defconfig_list != current_entry->sym)213 else if (sym_defconfig_list != current_entry->sym)
214 zconf_error("trying to redefine defconfig symbol");214 zconf_error("trying to redefine defconfig symbol");
215 sym_defconfig_list->flags |= SYMBOL_AUTO;
215 break;216 break;
216 case T_OPT_ENV:217 case T_OPT_ENV:
217 prop_add_env(arg);218 prop_add_env(arg);
scripts/kconfig/symbol.c+2−2
@@ -183,7 +183,7 @@ static void sym_validate_range(struct symbol *sym) · 182 unmodified lines
183 sprintf(str, "%lld", val2);183 sprintf(str, "%lld", val2);
184 else184 else
185 sprintf(str, "0x%llx", val2);185 sprintf(str, "0x%llx", val2);
186 sym->curr.val = strdup(str);186 sym->curr.val = xstrdup(str);
187}187}
188 188
189static void sym_set_changed(struct symbol *sym)189static void sym_set_changed(struct symbol *sym)
@@ -849,7 +849,7 @@ struct symbol *sym_lookup(const char *name, int flags) · 659 unmodified lines
849 : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))849 : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
850 return symbol;850 return symbol;
851 }851 }
852 new_name = strdup(name);852 new_name = xstrdup(name);
853 } else {853 } else {
854 new_name = NULL;854 new_name = NULL;
855 hash = 0;855 hash = 0;
scripts/kconfig/util.c+11−0
@@ -154,3 +154,14 @@ void *xrealloc(void *p, size_t size) · 153 unmodified lines
154 fprintf(stderr, "Out of memory.\n");154 fprintf(stderr, "Out of memory.\n");
155 exit(1);155 exit(1);
156}156}
157
158char *xstrdup(const char *s)
159{
160 char *p;
161
162 p = strdup(s);
163 if (p)
164 return p;
165 fprintf(stderr, "Out of memory.\n");
166 exit(1);
167}
scripts/kconfig/zconf.l+4−8
@@ -332,16 +332,12 @@ void zconf_nextfile(const char *name) · 331 unmodified lines
332 "Inclusion path:\n current file : '%s'\n",332 "Inclusion path:\n current file : '%s'\n",
333 zconf_curname(), zconf_lineno(),333 zconf_curname(), zconf_lineno(),
334 zconf_curname());334 zconf_curname());
335 iter = current_file->parent;335 iter = current_file;
336 while (iter && \336 do {
337 strcmp(iter->name,current_file->name)) {
338 fprintf(stderr, " included from: '%s:%d'\n",
339 iter->name, iter->lineno-1);
340 iter = iter->parent;337 iter = iter->parent;
341 }
342 if (iter)
343 fprintf(stderr, " included from: '%s:%d'\n",338 fprintf(stderr, " included from: '%s:%d'\n",
344 iter->name, iter->lineno+1);339 iter->name, iter->lineno - 1);
340 } while (strcmp(iter->name, current_file->name));
345 exit(1);341 exit(1);
346 }342 }
347 }343 }
scripts/kconfig/zconf.y+2−1
@@ -127,7 +127,7 @@ no_mainmenu_stmt: /* empty */ · 126 unmodified lines
127 * later regardless of whether it comes from the 'prompt' in127 * later regardless of whether it comes from the 'prompt' in
128 * mainmenu_stmt or here128 * mainmenu_stmt or here
129 */129 */
130 menu_add_prompt(P_MENU, strdup("Linux Kernel Configuration"), NULL);130 menu_add_prompt(P_MENU, xstrdup("Linux Kernel Configuration"), NULL);
131};131};
132 132
133 133
@@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL · 142 unmodified lines
276 sym->flags |= SYMBOL_AUTO;276 sym->flags |= SYMBOL_AUTO;
277 menu_add_entry(sym);277 menu_add_entry(sym);
278 menu_add_expr(P_CHOICE, NULL, NULL);278 menu_add_expr(P_CHOICE, NULL, NULL);
279 free($2);
279 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());280 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
280};281};
281 282
scripts/link-vmlinux.sh+1−1
@@ -246,7 +246,7 @@ else · 245 unmodified lines
246fi;246fi;
247 247
248# final build of init/248# final build of init/
249${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}"249${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init
250 250
251archive_builtin251archive_builtin
252 252