Backmerging to pick up a fix from drm-misc-next-fixes.
Showing the changes to scripts (16 of 1706 files). Show all
Unified · Split
| @@ -256,6 +256,8 @@ __objtool_obj := $(objtree)/tools/objtool/objtool · 255 unmodified lines | ||
| 256 | 256 | |
| 257 | 257 | objtool_args = $(if $(CONFIG_UNWINDER_ORC),orc generate,check) |
| 258 | 258 | |
| 259 | +objtool_args += $(if $(part-of-module), --module,) | |
| 260 | + | |
| 259 | 261 | ifndef CONFIG_FRAME_POINTER |
| 260 | 262 | objtool_args += --no-fp |
| 261 | 263 | endif |
| @@ -264,6 +266,12 @@ objtool_args += --no-unreachable · 2 unmodified lines | ||
| 264 | 266 | else |
| 265 | 267 | objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable) |
| 266 | 268 | endif |
| 269 | +ifdef CONFIG_RETPOLINE | |
| 270 | +ifneq ($(RETPOLINE_CFLAGS),) | |
| 271 | + objtool_args += --retpoline | |
| 272 | +endif | |
| 273 | +endif | |
| 274 | + | |
| 267 | 275 | |
| 268 | 276 | ifdef CONFIG_MODVERSIONS |
| 269 | 277 | objtool_o = $(@D)/.tmp_$(@F) |
| @@ -297,11 +297,11 @@ cmd_dt_S_dtb= \ · 296 unmodified lines | ||
| 297 | 297 | echo '\#include <asm-generic/vmlinux.lds.h>'; \ |
| 298 | 298 | echo '.section .dtb.init.rodata,"a"'; \ |
| 299 | 299 | 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:'; \ | |
| 302 | 302 | 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'; \ | |
| 305 | 305 | echo '.balign STRUCT_ALIGNMENT'; \ |
| 306 | 306 | ) > $@ |
| 307 | 307 | |
| @@ -93,14 +93,6 @@ · 92 unmodified lines | ||
| 93 | 93 | * (Note: it'd be easy to port over the complete mkdep state machine, |
| 94 | 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 | 97 | #include <sys/types.h> |
| 106 | 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 | ||
| 233 | 225 | static void parse_config_file(const char *p) |
| 234 | 226 | { |
| 235 | 227 | const char *q, *r; |
| 228 | + const char *start = p; | |
| 236 | 229 | |
| 237 | 230 | while ((p = strstr(p, "CONFIG_"))) { |
| 231 | + if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { | |
| 232 | + p += 7; | |
| 233 | + continue; | |
| 234 | + } | |
| 238 | 235 | p += 7; |
| 239 | 236 | q = p; |
| 240 | 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 | 284 | return str_ends_with(s, len, "include/generated/autoconf.h") || |
| 288 | 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 | 286 | str_ends_with(s, len, ".ver"); |
| 292 | 287 | } |
| 293 | 288 | |
| @@ -15,7 +15,7 @@ signal(SIGPIPE, SIG_DFL) · 14 unmodified lines | ||
| 15 | 15 | if len(sys.argv) < 3: |
| 16 | 16 | sys.stderr.write("usage: %s [option] file1 file2\n" % sys.argv[0]) |
| 17 | 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 | 19 | sys.stderr.write("-d Show delta of Data Section\n") |
| 20 | 20 | sys.stderr.write("-t Show delta of text Section\n") |
| 21 | 21 | sys.exit(-1) |
| @@ -56,10 +56,10 @@ statement S; · 55 unmodified lines | ||
| 56 | 56 | p << r.p; |
| 57 | 57 | @@ |
| 58 | 58 | |
| 59 | −coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep") | |
| 59 | +coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup") | |
| 60 | 60 | |
| 61 | 61 | @script:python depends on report@ |
| 62 | 62 | p << r.p; |
| 63 | 63 | @@ |
| 64 | 64 | |
| 65 | −coccilib.report.print_report(p[0], "WARNING opportunity for kmemdep") | |
| 65 | +coccilib.report.print_report(p[0], "WARNING opportunity for kmemdup") | |
| @@ -595,7 +595,7 @@ static void optimize_result(void) · 594 unmodified lines | ||
| 595 | 595 | * original char code */ |
| 596 | 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 | 599 | best = find_best_token(); |
| 600 | 600 | if (token_profit[best] == 0) |
| 601 | 601 | break; |
| @@ -178,7 +178,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 177 unmodified lines | ||
| 178 | 178 | case S_HEX: |
| 179 | 179 | done: |
| 180 | 180 | if (sym_string_valid(sym, p)) { |
| 181 | − sym->def[def].val = strdup(p); | |
| 181 | + sym->def[def].val = xstrdup(p); | |
| 182 | 182 | sym->flags |= def_flags; |
| 183 | 183 | } else { |
| 184 | 184 | if (def != S_DEF_AUTO) |
| @@ -101,7 +101,7 @@ static struct message *message__new(const char *msg, char *option, · 100 unmodified lines | ||
| 101 | 101 | if (self->files == NULL) |
| 102 | 102 | goto out_fail; |
| 103 | 103 | |
| 104 | − self->msg = strdup(msg); | |
| 104 | + self->msg = xstrdup(msg); | |
| 105 | 105 | if (self->msg == NULL) |
| 106 | 106 | goto out_fail_msg; |
| 107 | 107 | |
| @@ -115,6 +115,7 @@ int file_write_dep(const char *name); · 114 unmodified lines | ||
| 115 | 115 | void *xmalloc(size_t size); |
| 116 | 116 | void *xcalloc(size_t nmemb, size_t size); |
| 117 | 117 | void *xrealloc(void *p, size_t size); |
| 118 | +char *xstrdup(const char *s); | |
| 118 | 119 | |
| 119 | 120 | struct gstr { |
| 120 | 121 | size_t len; |
| @@ -55,7 +55,8 @@ EOF · 54 unmodified lines | ||
| 55 | 55 | echo " *** required header files." 1>&2 |
| 56 | 56 | echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 |
| 57 | 57 | 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 | |
| 59 | 60 | echo " *** " 1>&2 |
| 60 | 61 | exit 1 |
| 61 | 62 | fi |
| @@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg) · 211 unmodified lines | ||
| 212 | 212 | sym_defconfig_list = current_entry->sym; |
| 213 | 213 | else if (sym_defconfig_list != current_entry->sym) |
| 214 | 214 | zconf_error("trying to redefine defconfig symbol"); |
| 215 | + sym_defconfig_list->flags |= SYMBOL_AUTO; | |
| 215 | 216 | break; |
| 216 | 217 | case T_OPT_ENV: |
| 217 | 218 | prop_add_env(arg); |
| @@ -183,7 +183,7 @@ static void sym_validate_range(struct symbol *sym) · 182 unmodified lines | ||
| 183 | 183 | sprintf(str, "%lld", val2); |
| 184 | 184 | else |
| 185 | 185 | sprintf(str, "0x%llx", val2); |
| 186 | − sym->curr.val = strdup(str); | |
| 186 | + sym->curr.val = xstrdup(str); | |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | static void sym_set_changed(struct symbol *sym) |
| @@ -849,7 +849,7 @@ struct symbol *sym_lookup(const char *name, int flags) · 659 unmodified lines | ||
| 849 | 849 | : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) |
| 850 | 850 | return symbol; |
| 851 | 851 | } |
| 852 | − new_name = strdup(name); | |
| 852 | + new_name = xstrdup(name); | |
| 853 | 853 | } else { |
| 854 | 854 | new_name = NULL; |
| 855 | 855 | hash = 0; |
| @@ -154,3 +154,14 @@ void *xrealloc(void *p, size_t size) · 153 unmodified lines | ||
| 154 | 154 | fprintf(stderr, "Out of memory.\n"); |
| 155 | 155 | exit(1); |
| 156 | 156 | } |
| 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 | +} | |
| @@ -332,16 +332,12 @@ void zconf_nextfile(const char *name) · 331 unmodified lines | ||
| 332 | 332 | "Inclusion path:\n current file : '%s'\n", |
| 333 | 333 | zconf_curname(), zconf_lineno(), |
| 334 | 334 | 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 { | |
| 340 | 337 | iter = iter->parent; |
| 341 | − } | |
| 342 | − if (iter) | |
| 343 | 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 | 341 | exit(1); |
| 346 | 342 | } |
| 347 | 343 | } |
| @@ -127,7 +127,7 @@ no_mainmenu_stmt: /* empty */ · 126 unmodified lines | ||
| 127 | 127 | * later regardless of whether it comes from the 'prompt' in |
| 128 | 128 | * 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 | 276 | sym->flags |= SYMBOL_AUTO; |
| 277 | 277 | menu_add_entry(sym); |
| 278 | 278 | menu_add_expr(P_CHOICE, NULL, NULL); |
| 279 | + free($2); | |
| 279 | 280 | printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); |
| 280 | 281 | }; |
| 281 | 282 | |
| @@ -246,7 +246,7 @@ else · 245 unmodified lines | ||
| 246 | 246 | fi; |
| 247 | 247 | |
| 248 | 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 | |
| 251 | 251 | archive_builtin |
| 252 | 252 | |