Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- suppress sparse warnings about unknown attributes

- fix typos and stale comments

- fix build error of arch/sh

- fix wrong use of ld-option vs cc-ldoption

- remove redundant GCC_PLUGINS_CFLAGS assignment

- fix another memory leak of Kconfig

- fix line number in error messages of Kconfig

- do not write confusing CONFIG_DEFCONFIG_LIST out to .config

- add xstrdup() to Kconfig to handle memory shortage errors

- show also a Debian package name if ncurses is missing

* tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
MAINTAINERS: take over Kconfig maintainership
kconfig: fix line number in recursive inclusion error message
Coccinelle: memdup: Fix typo in warning messages
kconfig: Update ncurses package names for menuconfig
kbuild/kallsyms: trivial typo fix
kbuild: test --build-id linker flag by ld-option instead of cc-ldoption
kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
kconfig: Don't leak choice names during parsing
sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE
kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list
kconfig: add xstrdup() helper
kbuild: disable sparse warnings about unknown attributes
Makefile: Fix lying comment re. silentoldconfig

+40 -27
+3 -1
MAINTAINERS
··· 7602 7602 F: scripts/Makefile.kasan 7603 7603 7604 7604 KCONFIG 7605 + M: Masahiro Yamada <yamada.masahiro@socionext.com> 7606 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig 7605 7607 L: linux-kbuild@vger.kernel.org 7606 - S: Orphan 7608 + S: Maintained 7607 7609 F: Documentation/kbuild/kconfig-language.txt 7608 7610 F: scripts/kconfig/ 7609 7611
+5 -7
Makefile
··· 388 388 CHECK = sparse 389 389 390 390 CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 391 - -Wbitwise -Wno-return-void $(CF) 391 + -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) 392 392 NOSTDINC_FLAGS = 393 393 CFLAGS_MODULE = 394 394 AFLAGS_MODULE = ··· 584 584 # To avoid any implicit rule to kick in, define an empty command 585 585 $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; 586 586 587 - # If .config is newer than include/config/auto.conf, someone tinkered 588 - # with it and forgot to run make oldconfig. 589 - # if auto.conf.cmd is missing then we are probably in a cleaned tree so 590 - # we execute the config step to be sure to catch updated Kconfig files 587 + # The actual configuration files used during the build are stored in 588 + # include/generated/ and include/config/. Update them if .config is newer than 589 + # include/config/auto.conf (which mirrors .config). 591 590 include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd 592 591 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig 593 592 else ··· 861 862 KBUILD_CFLAGS += $(ARCH_CFLAGS) $(KCFLAGS) 862 863 863 864 # Use --build-id when available. 864 - LDFLAGS_BUILD_ID := $(patsubst -Wl$(comma)%,%,\ 865 - $(call cc-ldoption, -Wl$(comma)--build-id,)) 865 + LDFLAGS_BUILD_ID := $(call ld-option, --build-id) 866 866 KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 867 867 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 868 868
+3 -1
arch/sh/boot/dts/Makefile
··· 1 - obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o 1 + ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"") 2 + obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o 3 + endif
+2 -2
scripts/coccinelle/api/memdup.cocci
··· 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")
+1 -1
scripts/kallsyms.c
··· 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;
+1 -1
scripts/kconfig/confdata.c
··· 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)
+1 -1
scripts/kconfig/kxgettext.c
··· 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
+1
scripts/kconfig/lkc.h
··· 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;
+2 -1
scripts/kconfig/lxdialog/check-lxdialog.sh
··· 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
+1
scripts/kconfig/menu.c
··· 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);
+2 -2
scripts/kconfig/symbol.c
··· 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 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;
+11
scripts/kconfig/util.c
··· 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 + }
+4 -8
scripts/kconfig/zconf.l
··· 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 }
+2 -1
scripts/kconfig/zconf.y
··· 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 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