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
256256
257257 objtool_args = $(if $(CONFIG_UNWINDER_ORC),orc generate,check)
258258
259+objtool_args += $(if $(part-of-module), --module,)
260+
259261 ifndef CONFIG_FRAME_POINTER
260262 objtool_args += --no-fp
261263 endif
@@ -264,6 +266,12 @@ objtool_args += --no-unreachable · 2 unmodified lines
264266 else
265267 objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
266268 endif
269+ifdef CONFIG_RETPOLINE
270+ifneq ($(RETPOLINE_CFLAGS),)
271+ objtool_args += --retpoline
272+endif
273+endif
274+
267275
268276 ifdef CONFIG_MODVERSIONS
269277 objtool_o = $(@D)/.tmp_$(@F)
scripts/Makefile.lib+4−4
@@ -297,11 +297,11 @@ cmd_dt_S_dtb= \ · 296 unmodified lines
297297 echo '\#include <asm-generic/vmlinux.lds.h>'; \
298298 echo '.section .dtb.init.rodata,"a"'; \
299299 echo '.balign STRUCT_ALIGNMENT'; \
300− echo '.global __dtb_$(*F)_begin'; \
301− echo '__dtb_$(*F)_begin:'; \
300+ echo '.global __dtb_$(subst -,_,$(*F))_begin'; \
301+ echo '__dtb_$(subst -,_,$(*F))_begin:'; \
302302 echo '.incbin "$<" '; \
303− echo '__dtb_$(*F)_end:'; \
304− echo '.global __dtb_$(*F)_end'; \
303+ echo '__dtb_$(subst -,_,$(*F))_end:'; \
304+ echo '.global __dtb_$(subst -,_,$(*F))_end'; \
305305 echo '.balign STRUCT_ALIGNMENT'; \
306306 ) > $@
307307
scripts/basic/fixdep.c+5−10
@@ -93,14 +93,6 @@ · 92 unmodified lines
9393 * (Note: it'd be easy to port over the complete mkdep state machine,
9494 * but I don't think the added complexity is worth it)
9595 */
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− */
10496
10597 #include <sys/types.h>
10698 #include <sys/stat.h>
@@ -233,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub) · 126 unmodified lines
233225 static void parse_config_file(const char *p)
234226 {
235227 const char *q, *r;
228+ const char *start = p;
236229
237230 while ((p = strstr(p, "CONFIG_"))) {
231+ if (p > start && (isalnum(p[-1]) || p[-1] == '_')) {
232+ p += 7;
233+ continue;
234+ }
238235 p += 7;
239236 q = p;
240237 while (*q && (isalnum(*q) || *q == '_'))
@@ -286,8 +283,6 @@ static int is_ignored_file(const char *s, int len) · 45 unmodified lines
286283 {
287284 return str_ends_with(s, len, "include/generated/autoconf.h") ||
288285 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") ||
291286 str_ends_with(s, len, ".ver");
292287 }
293288
scripts/bloat-o-meter+1−1
@@ -15,7 +15,7 @@ signal(SIGPIPE, SIG_DFL) · 14 unmodified lines
1515 if len(sys.argv) < 3:
1616 sys.stderr.write("usage: %s [option] file1 file2\n" % sys.argv[0])
1717 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")
1919 sys.stderr.write("-d Show delta of Data Section\n")
2020 sys.stderr.write("-t Show delta of text Section\n")
2121 sys.exit(-1)
scripts/coccinelle/api/memdup.cocci+2−2
@@ -56,10 +56,10 @@ statement S; · 55 unmodified lines
5656 p << r.p;
5757 @@
5858
59−coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep")
59+coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup")
6060
6161 @script:python depends on report@
6262 p << r.p;
6363 @@
6464
65−coccilib.report.print_report(p[0], "WARNING opportunity for kmemdep")
65+coccilib.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
595595 * original char code */
596596 if (!best_table_len[i]) {
597597
598− /* find the token with the breates profit value */
598+ /* find the token with the best profit value */
599599 best = find_best_token();
600600 if (token_profit[best] == 0)
601601 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
178178 case S_HEX:
179179 done:
180180 if (sym_string_valid(sym, p)) {
181− sym->def[def].val = strdup(p);
181+ sym->def[def].val = xstrdup(p);
182182 sym->flags |= def_flags;
183183 } else {
184184 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
101101 if (self->files == NULL)
102102 goto out_fail;
103103
104− self->msg = strdup(msg);
104+ self->msg = xstrdup(msg);
105105 if (self->msg == NULL)
106106 goto out_fail_msg;
107107
scripts/kconfig/lkc.h+1−0
@@ -115,6 +115,7 @@ int file_write_dep(const char *name); · 114 unmodified lines
115115 void *xmalloc(size_t size);
116116 void *xcalloc(size_t nmemb, size_t size);
117117 void *xrealloc(void *p, size_t size);
118+char *xstrdup(const char *s);
118119
119120 struct gstr {
120121 size_t len;
scripts/kconfig/lxdialog/check-lxdialog.sh+2−1
@@ -55,7 +55,8 @@ EOF · 54 unmodified lines
5555 echo " *** required header files." 1>&2
5656 echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
5757 echo " *** " 1>&2
58− echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
58+ echo " *** Install ncurses (ncurses-devel or libncurses-dev " 1>&2
59+ echo " *** depending on your distribution) and try again." 1>&2
5960 echo " *** " 1>&2
6061 exit 1
6162 fi
scripts/kconfig/menu.c+1−0
@@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg) · 211 unmodified lines
212212 sym_defconfig_list = current_entry->sym;
213213 else if (sym_defconfig_list != current_entry->sym)
214214 zconf_error("trying to redefine defconfig symbol");
215+ sym_defconfig_list->flags |= SYMBOL_AUTO;
215216 break;
216217 case T_OPT_ENV:
217218 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
183183 sprintf(str, "%lld", val2);
184184 else
185185 sprintf(str, "0x%llx", val2);
186− sym->curr.val = strdup(str);
186+ sym->curr.val = xstrdup(str);
187187 }
188188
189189 static void sym_set_changed(struct symbol *sym)
@@ -849,7 +849,7 @@ struct symbol *sym_lookup(const char *name, int flags) · 659 unmodified lines
849849 : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
850850 return symbol;
851851 }
852− new_name = strdup(name);
852+ new_name = xstrdup(name);
853853 } else {
854854 new_name = NULL;
855855 hash = 0;
scripts/kconfig/util.c+11−0
@@ -154,3 +154,14 @@ void *xrealloc(void *p, size_t size) · 153 unmodified lines
154154 fprintf(stderr, "Out of memory.\n");
155155 exit(1);
156156 }
157+
158+char *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
332332 "Inclusion path:\n current file : '%s'\n",
333333 zconf_curname(), zconf_lineno(),
334334 zconf_curname());
335− iter = current_file->parent;
336− while (iter && \
337− strcmp(iter->name,current_file->name)) {
338− fprintf(stderr, " included from: '%s:%d'\n",
339− iter->name, iter->lineno-1);
335+ iter = current_file;
336+ do {
340337 iter = iter->parent;
341− }
342− if (iter)
343338 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));
345341 exit(1);
346342 }
347343 }
scripts/kconfig/zconf.y+2−1
@@ -127,7 +127,7 @@ no_mainmenu_stmt: /* empty */ · 126 unmodified lines
127127 * later regardless of whether it comes from the 'prompt' in
128128 * mainmenu_stmt or here
129129 */
130− menu_add_prompt(P_MENU, strdup("Linux Kernel Configuration"), NULL);
130+ menu_add_prompt(P_MENU, xstrdup("Linux Kernel Configuration"), NULL);
131131 };
132132
133133
@@ -276,6 +276,7 @@ choice: T_CHOICE word_opt T_EOL · 142 unmodified lines
276276 sym->flags |= SYMBOL_AUTO;
277277 menu_add_entry(sym);
278278 menu_add_expr(P_CHOICE, NULL, NULL);
279+ free($2);
279280 printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
280281 };
281282
scripts/link-vmlinux.sh+1−1
@@ -246,7 +246,7 @@ else · 245 unmodified lines
246246 fi;
247247
248248 # 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
250250
251251 archive_builtin
252252