Skip to contentSkip to conversation

kconfig resync with Linux 4.10

PATCH New Masahiro Yamada 3 participants 6 messages Feb 11, 2017 – Feb 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover kconfig resync with Linux 4.10

I tested the new keyword "imply", and it worked.

Masahiro Yamada (2):
kconfig: re-sync with Linux 4.10
i2c: sandbox: remove code snippet from Kconfig help

 drivers/i2c/Kconfig                  |   23 +-
 scripts/kconfig/Makefile             |   92 +-
 scripts/kconfig/conf.c               |    7 +-
 scripts/kconfig/confdata.c           |   19 +-
 scripts/kconfig/expr.c               |  278 +++---
 scripts/kconfig/expr.h               |    6 +-
 scripts/kconfig/menu.c               |   57 +-
 scripts/kconfig/merge_config.sh      |   22 +-
 scripts/kconfig/nconf.c              |    2 +
 scripts/kconfig/nconf.gui.c          |   15 +-
 scripts/kconfig/qconf.cc             |  705 ++++++++-------
 scripts/kconfig/qconf.h              |  150 ++--
 scripts/kconfig/streamline_config.pl |   46 +-
 scripts/kconfig/symbol.c             |   90 +-
 scripts/kconfig/zconf.gperf          |    2 +
 scripts/kconfig/zconf.hash.c_shipped |   68 +-
 scripts/kconfig/zconf.l              |   21 +-
 scripts/kconfig/zconf.lex.c_shipped  |  333 ++++---
 scripts/kconfig/zconf.tab.c_shipped  | 1631 ++++++++++++++++------------------
 scripts/kconfig/zconf.y              |   25 +-
 20 files changed, 1931 insertions(+), 1661 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 kconfig: re-sync with Linux 4.10

Re-sync all files under the scripts/kconfig directory with Linux 4.10.

Some parts include U-Boot own modification. I made sure to not revert the following commits:

5b8031ccb4ed ("Add more SPDX-License-Identifier tags") 192bc6948b02 ("Fix GCC format-security errors and convert sprintfs.") da58dec86616 ("Various Makefiles: Add SPDX-License-Identifier tags") 20c20826efab ("Kconfig: Enable usage of escape char '\' in string values")

---

 scripts/kconfig/Makefile             |   92 +-
 scripts/kconfig/conf.c               |    7 +-
 scripts/kconfig/confdata.c           |   19 +-
 scripts/kconfig/expr.c               |  278 +++---
 scripts/kconfig/expr.h               |    6 +-
 scripts/kconfig/menu.c               |   57 +-
 scripts/kconfig/merge_config.sh      |   22 +-
 scripts/kconfig/nconf.c              |    2 +
 scripts/kconfig/nconf.gui.c          |   15 +-
 scripts/kconfig/qconf.cc             |  705 ++++++++-------
 scripts/kconfig/qconf.h              |  150 ++--
 scripts/kconfig/streamline_config.pl |   46 +-
 scripts/kconfig/symbol.c             |   90 +-
 scripts/kconfig/zconf.gperf          |    2 +
 scripts/kconfig/zconf.hash.c_shipped |   68 +-
 scripts/kconfig/zconf.l              |   21 +-
 scripts/kconfig/zconf.lex.c_shipped  |  333 ++++---
 scripts/kconfig/zconf.tab.c_shipped  | 1631 ++++++++++++++++------------------
 scripts/kconfig/zconf.y              |   25 +-
 19 files changed, 1930 insertions(+), 1639 deletions(-)
scripts/kconfig/Makefile +39 -53
index 14285b1..af23812 100644
@@ -44,6 +44,8 @@ nconfig: $(obj)/nconf
 
 silentoldconfig: $(obj)/conf
 	$(Q)mkdir -p include/config include/generated
+	$(Q)test -e include/generated/autoksyms.h || \
+	    touch   include/generated/autoksyms.h
 	$< $(silent) --$@ $(Kconfig)
 
 localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
@@ -95,7 +97,7 @@ $(simple-targets): $(obj)/conf
 PHONY += oldnoconfig savedefconfig defconfig
 
 # oldnoconfig is an alias of olddefconfig, because people already are dependent
-# on its behavior(sets new symbols to their default value but not 'n') with the
+# on its behavior (sets new symbols to their default value but not 'n') with the
 # counter-intuitive name.
 oldnoconfig: olddefconfig
 
@@ -106,8 +108,13 @@ defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< $(silent) --defconfig $(Kconfig)
 else
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
 	@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
 	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
+else
+	@$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
+	$(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
+endif
 endif
 
 %_defconfig: $(obj)/conf
@@ -128,6 +135,10 @@ PHONY += kvmconfig
 kvmconfig: kvm_guest.config
 	@:
 
+PHONY += xenconfig
+xenconfig: xen.config
+	@:
+
 PHONY += tinyconfig
 tinyconfig:
 	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
@@ -135,10 +146,11 @@ tinyconfig:
 # Help text used by make help
 help:
 	@echo  '  config	  - Update current config utilising a line-oriented program'
-	@echo  '  nconfig         - Update current config utilising a ncurses menu based program'
+	@echo  '  nconfig         - Update current config utilising a ncurses menu based'
+	@echo  '                    program'
 	@echo  '  menuconfig	  - Update current config utilising a menu based program'
-	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
-	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
+	@echo  '  xconfig	  - Update current config utilising a Qt based front-end'
+	@echo  '  gconfig	  - Update current config utilising a GTK+ based front-end'
 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
 	@echo  '  localmodconfig  - Update current config disabling modules not loaded'
 	@echo  '  localyesconfig  - Update current config converting local mods to core'
@@ -151,8 +163,10 @@ help:
 	@echo  '  alldefconfig    - New config with all symbols set to default'
 	@echo  '  randconfig	  - New config with random answer to all options'
 	@echo  '  listnewconfig   - List new options'
-	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value'
-#	@echo  '  kvmconfig	  - Enable additional options for guest kernel support'
+	@echo  '  olddefconfig	  - Same as silentoldconfig but sets new symbols to their'
+	@echo  '                    default value'
+#	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
+#	@echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
 #	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
 
 # lxdialog stuff
@@ -171,9 +185,9 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
 # mconf:  Used for the menuconfig target
 #         Utilizes the lxdialog package
 # qconf:  Used for the xconfig target
-#         Based on QT which needs to be installed to compile it
+#         Based on Qt which needs to be installed to compile it
 # gconf:  Used for the gconfig target
-#         Based on GTK which needs to be installed to compile it
+#         Based on GTK+ which needs to be installed to compile it
 # object files used by all kconfig flavours
 
 lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
@@ -230,51 +244,23 @@ ifeq ($(MAKECMDGOALS),xconfig)
 $(obj)/.tmp_qtcheck: $(src)/Makefile
 -include $(obj)/.tmp_qtcheck
 
-# QT needs some extra effort...
+# Qt needs some extra effort...
 $(obj)/.tmp_qtcheck:
-	@set -e; $(kecho) "  CHECK   qt"; dir=""; pkg=""; \
-	if ! pkg-config --exists QtCore 2> /dev/null; then \
-	    echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
-	    pkg-config --exists qt 2> /dev/null && pkg=qt; \
-	    pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
-	    if [ -n "$$pkg" ]; then \
-	      cflags="\$$(shell pkg-config $$pkg --cflags)"; \
-	      libs="\$$(shell pkg-config $$pkg --libs)"; \
-	      moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
-	      dir="$$(pkg-config $$pkg --variable=prefix)"; \
-	    else \
-	      for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
-	        if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
-	      done; \
-	      if [ -z "$$dir" ]; then \
-	        echo >&2 "*"; \
-	        echo >&2 "* Unable to find any QT installation. Please make sure that"; \
-	        echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
-	        echo >&2 "* either qmake can be found or install pkg-config or set"; \
-	        echo >&2 "* the QTDIR environment variable to the correct location."; \
-	        echo >&2 "*"; \
-	        false; \
-	      fi; \
-	      libpath=$$dir/lib; lib=qt; osdir=""; \
-	      $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
-	        osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
-	      test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
-	      test -f $$libpath/libqt-mt.so && lib=qt-mt; \
-	      cflags="-I$$dir/include"; \
-	      libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
-	      moc="$$dir/bin/moc"; \
-	    fi; \
-	    if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
-	      echo "*"; \
-	      echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
-	      echo "*"; \
-	      moc="/usr/bin/moc"; \
-	    fi; \
+	@set -e; $(kecho) "  CHECK   qt"; \
+	if pkg-config --exists Qt5Core; then \
+	    cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
+	    libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
+	    moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
+	elif pkg-config --exists QtCore; then \
+	    cflags=`pkg-config --cflags QtCore QtGui`; \
+	    libs=`pkg-config --libs QtCore QtGui`; \
+	    moc=`pkg-config --variable=moc_location QtCore`; \
 	else \
-	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
-	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
-	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
-	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
+	    echo >&2 "*"; \
+	    echo >&2 "* Could not find Qt via pkg-config."; \
+	    echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
+	    echo >&2 "*"; \
+	    exit 1; \
 	fi; \
 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 	echo "KC_QT_LIBS=$$libs" >> $@; \
@@ -286,7 +272,7 @@ $(obj)/gconf.o: $(obj)/.tmp_gtkcheck
 ifeq ($(MAKECMDGOALS),gconfig)
 -include $(obj)/.tmp_gtkcheck
 
-# GTK needs some extra effort, too...
+# GTK+ needs some extra effort, too...
 $(obj)/.tmp_gtkcheck:
 	@if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then		\
 		if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then			\
@@ -317,7 +303,7 @@ quiet_cmd_moc = MOC     $@
 $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
 	$(call cmd,moc)
 
-# Extract gconf menu items for I18N support
+# Extract gconf menu items for i18n support
 $(obj)/gconf.glade.h: $(obj)/gconf.glade
 	$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
 	$(obj)/gconf.glade
scripts/kconfig/conf.c +4 -3
index 6c20431..866369f 100644
@@ -5,6 +5,7 @@
 
 #include <locale.h>
 #include <ctype.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -41,7 +42,7 @@ static int tty_stdio;
 static int valid_stdin = 1;
 static int sync_kconfig;
 static int conf_cnt;
-static char line[128];
+static char line[PATH_MAX];
 static struct menu *rootEntry;
 
 static void print_help(struct menu *menu)
@@ -109,7 +110,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
 		/* fall through */
 	case oldaskconfig:
 		fflush(stdout);
-		xfgets(line, 128, stdin);
+		xfgets(line, sizeof(line), stdin);
 		if (!tty_stdio)
 			printf("\n");
 		return 1;
@@ -311,7 +312,7 @@ static int conf_choice(struct menu *menu)
 			/* fall through */
 		case oldaskconfig:
 			fflush(stdout);
-			xfgets(line, 128, stdin);
+			xfgets(line, sizeof(line), stdin);
 			strip(line);
 			if (line[0] == '?') {
 				print_help(menu);
scripts/kconfig/confdata.c +10 -9
index 9847ae6..745cb93 100644
@@ -263,11 +263,8 @@ int conf_read_simple(const char *name, int def)
 		if (in)
 			goto load;
 		sym_add_change_count(1);
-		if (!sym_defconfig_list) {
-			if (modules_sym)
-				sym_calc_value(modules_sym);
+		if (!sym_defconfig_list)
 			return 1;
-		}
 
 		for_all_defaults(sym_defconfig_list, prop) {
 			if (expr_calc_value(prop->visible.expr) == no ||
@@ -374,7 +371,9 @@ load:
 				continue;
 		} else {
 			if (line[0] != '\r' && line[0] != '\n')
-				conf_warning("unexpected data");
+				conf_warning("unexpected data: %.*s",
+					     (int)strcspn(line, "\r\n"), line);
+
 			continue;
 		}
 setsym:
@@ -400,9 +399,6 @@ setsym:
 	}
 	free(line);
 	fclose(in);
-
-	if (modules_sym)
-		sym_calc_value(modules_sym);
 	return 0;
 }
 
@@ -413,8 +409,12 @@ int conf_read(const char *name)
 
 	sym_set_change_count(0);
 
-	if (conf_read_simple(name, S_DEF_USER))
+	if (conf_read_simple(name, S_DEF_USER)) {
+		sym_calc_value(modules_sym);
 		return 1;
+	}
+
+	sym_calc_value(modules_sym);
 
 	for_all_symbols(i, sym) {
 		sym_calc_value(sym);
@@ -847,6 +847,7 @@ static int conf_split_config(void)
 
 	name = conf_get_autoconfig_name();
 	conf_read_simple(name, S_DEF_AUTO);
+	sym_calc_value(modules_sym);
 
 	if (chdir("include/config"))
 		return 1;
scripts/kconfig/expr.c +157 -121

377 lines not on this page · raw message

scripts/kconfig/expr.h +5 -1
index a2fc96a..a73f762 100644
@@ -29,7 +29,9 @@ typedef enum tristate {
 } tristate;
 
 enum expr_type {
-	E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE
+	E_NONE, E_OR, E_AND, E_NOT,
+	E_EQUAL, E_UNEQUAL, E_LTH, E_LEQ, E_GTH, E_GEQ,
+	E_LIST, E_SYMBOL, E_RANGE
 };
 
 union expr_data {
@@ -83,6 +85,7 @@ struct symbol {
 	struct property *prop;
 	struct expr_value dir_dep;
 	struct expr_value rev_dep;
+	struct expr_value implied;
 };
 
 #define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
@@ -134,6 +137,7 @@ enum prop_type {
 	P_DEFAULT,  /* default y */
 	P_CHOICE,   /* choice value */
 	P_SELECT,   /* select BAR */
+	P_IMPLY,    /* imply BAR */
 	P_RANGE,    /* range 7..100 (for a symbol) */
 	P_ENV,      /* value from environment variable */
 	P_SYMBOL,   /* where a symbol is defined */
scripts/kconfig/menu.c +40 -17

112 lines not on this page · raw message

scripts/kconfig/merge_config.sh +17 -5
index ec8e203..67d1314 100755
@@ -32,7 +32,7 @@ usage() {
 	echo "  -m    only merge the fragments, do not execute the make command"
 	echo "  -n    use allnoconfig instead of alldefconfig"
 	echo "  -r    list redundant entries when merging fragments"
-	echo "  -O    dir to put generated output files"
+	echo "  -O    dir to put generated output files.  Consider setting \$KCONFIG_CONFIG instead."
 }
 
 RUNMAKE=true
@@ -77,11 +77,19 @@ while true; do
 	esac
 done
 
-if [ "$#" -lt 2 ] ; then
+if [ "$#" -lt 1 ] ; then
 	usage
 	exit
 fi
 
+if [ -z "$KCONFIG_CONFIG" ]; then
+	if [ "$OUTPUT" != . ]; then
+		KCONFIG_CONFIG=$(readlink -m -- "$OUTPUT/.config")
+	else
+		KCONFIG_CONFIG=.config
+	fi
+fi
+
 INITFILE=$1
 shift;
 
@@ -100,6 +108,10 @@ cat $INITFILE > $TMP_FILE
 # Merge files, printing warnings on overridden values
 for MERGE_FILE in $MERGE_LIST ; do
 	echo "Merging $MERGE_FILE"
+	if [ ! -r "$MERGE_FILE" ]; then
+		echo "The merge file '$MERGE_FILE' does not exist.  Exit." >&2
+		exit 1
+	fi
 	CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
 
 	for CFG in $CFG_LIST ; do
@@ -120,9 +132,9 @@ for MERGE_FILE in $MERGE_LIST ; do
 done
 
 if [ "$RUNMAKE" = "false" ]; then
-	cp $TMP_FILE $OUTPUT/.config
+	cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG"
 	echo "#"
-	echo "# merged configuration written to $OUTPUT/.config (needs make)"
+	echo "# merged configuration written to $KCONFIG_CONFIG (needs make)"
 	echo "#"
 	clean_up
 	exit
@@ -146,7 +158,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
 for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
 
 	REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
-	ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
+	ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
 	if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
 		echo "Value requested for $CFG not in final .config"
 		echo "Requested value:  $REQUESTED_VAL"
scripts/kconfig/nconf.c +2 -0
index d42d534..a9bc533 100644
@@ -5,7 +5,9 @@
  * Derived from menuconfig.
  *
  */
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <string.h>
 #include <stdlib.h>
 
scripts/kconfig/nconf.gui.c +11 -4
index 8275f0e..4b2f44c 100644
@@ -364,12 +364,14 @@ int dialog_inputbox(WINDOW *main_window,
 	WINDOW *prompt_win;
 	WINDOW *form_win;
 	PANEL *panel;
-	int i, x, y;
+	int i, x, y, lines, columns, win_lines, win_cols;
 	int res = -1;
 	int cursor_position = strlen(init);
 	int cursor_form_win;
 	char *result = *resultp;
 
+	getmaxyx(stdscr, lines, columns);
+
 	if (strlen(init)+1 > *result_len) {
 		*result_len = strlen(init)+1;
 		*resultp = result = realloc(result, *result_len);
@@ -386,14 +388,19 @@ int dialog_inputbox(WINDOW *main_window,
 	if (title)
 		prompt_width = max(prompt_width, strlen(title));
 
+	win_lines = min(prompt_lines+6, lines-2);
+	win_cols = min(prompt_width+7, columns-2);
+	prompt_lines = max(win_lines-6, 0);
+	prompt_width = max(win_cols-7, 0);
+
 	/* place dialog in middle of screen */
-	y = (getmaxy(stdscr)-(prompt_lines+4))/2;
-	x = (getmaxx(stdscr)-(prompt_width+4))/2;
+	y = (lines-win_lines)/2;
+	x = (columns-win_cols)/2;
 
 	strncpy(result, init, *result_len);
 
 	/* create the windows */
-	win = newwin(prompt_lines+6, prompt_width+7, y, x);
+	win = newwin(win_lines, win_cols, y, x);
 	prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2);
 	form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2);
 	keypad(form_win, TRUE);
scripts/kconfig/qconf.cc +393 -312

1,259 lines not on this page · raw message

scripts/kconfig/qconf.h +71 -79

263 lines not on this page · raw message

scripts/kconfig/streamline_config.pl +40 -6

82 lines not on this page · raw message

scripts/kconfig/symbol.c +87 -3

162 lines not on this page · raw message

scripts/kconfig/zconf.gperf +2 -0
index b6ac02d..ead02ed 100644
@@ -22,6 +22,7 @@ comment,	T_COMMENT,	TF_COMMAND
 config,		T_CONFIG,	TF_COMMAND
 menuconfig,	T_MENUCONFIG,	TF_COMMAND
 help,		T_HELP,		TF_COMMAND
+---help---,	T_HELP,		TF_COMMAND
 if,		T_IF,		TF_COMMAND|TF_PARAM
 endif,		T_ENDIF,	TF_COMMAND
 depends,	T_DEPENDS,	TF_COMMAND
@@ -37,6 +38,7 @@ int,		T_TYPE,		TF_COMMAND, S_INT
 hex,		T_TYPE,		TF_COMMAND, S_HEX
 string,		T_TYPE,		TF_COMMAND, S_STRING
 select,		T_SELECT,	TF_COMMAND
+imply,		T_IMPLY,	TF_COMMAND
 range,		T_RANGE,	TF_COMMAND
 visible,	T_VISIBLE,	TF_COMMAND
 option,		T_OPTION,	TF_COMMAND
scripts/kconfig/zconf.hash.c_shipped +38 -30

174 lines not on this page · raw message

scripts/kconfig/zconf.l +16 -5
index 6c62d93..c410d25 100644
@@ -66,9 +66,16 @@ static void alloc_string(const char *str, int size)
 	memcpy(text, str, size);
 	text[size] = 0;
 }
+
+static void warn_ignored_character(char chr)
+{
+	fprintf(stderr,
+	        "%s:%d:warning: ignoring unsupported character '%c'\n",
+	        zconf_curname(), zconf_lineno(), chr);
+}
 %}
 
-n	[A-Za-z0-9_]
+n	[A-Za-z0-9_-]
 
 %%
 	int str = 0;
@@ -106,7 +113,7 @@ n	[A-Za-z0-9_]
 		zconflval.string = text;
 		return T_WORD;
 	}
-	.
+	.	warn_ignored_character(*yytext);
 	\n	{
 		BEGIN(INITIAL);
 		current_file->lineno++;
@@ -122,14 +129,17 @@ n	[A-Za-z0-9_]
 	"!"	return T_NOT;
 	"="	return T_EQUAL;
 	"!="	return T_UNEQUAL;
+	"<="	return T_LESS_EQUAL;
+	">="	return T_GREATER_EQUAL;
+	"<"	return T_LESS;
+	">"	return T_GREATER;
 	\"|\'	{
 		str = yytext[0];
 		new_string();
 		BEGIN(STRING);
 	}
 	\n	BEGIN(INITIAL); current_file->lineno++; return T_EOL;
-	---	/* ignore */
-	({n}|[-/.])+	{
+	({n}|[/.])+	{
 		const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
 		if (id && id->flags & TF_PARAM) {
 			zconflval.id = id;
@@ -141,7 +151,8 @@ n	[A-Za-z0-9_]
 	}
 	#.*	/* comment */
 	\\\n	current_file->lineno++;
-	.
+	[[:blank:]]+
+	.	warn_ignored_character(*yytext);
 	<<EOF>> {
 		BEGIN(INITIAL);
 	}
scripts/kconfig/zconf.lex.c_shipped +193 -140

137 lines not on this page · raw message

scripts/kconfig/zconf.tab.c_shipped +782 -849

1,631 lines not on this page · raw message

scripts/kconfig/zconf.y +23 -2
index 0f683cf..001305f 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.4

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH 1/2 kconfig: re-sync with Linux 4.10

Quoted 6 lines · Masahiro Yamada

Re-sync all files under the scripts/kconfig directory with Linux 4.10.

Some parts include U-Boot own modification. I made sure to not revert the following commits:

Quoted 6 lines

5b8031ccb4ed ("Add more SPDX-License-Identifier tags") 192bc6948b02 ("Fix GCC format-security errors and convert sprintfs.") da58dec86616 ("Various Makefiles: Add SPDX-License-Identifier tags") 20c20826efab ("Kconfig: Enable usage of escape char '\' in string values")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170213/6679d51e/attachment.sig>
#3 lore raw

PATCH 2/2 i2c: sandbox: remove code snippet from Kconfig help

In reply to Masahiro Yamada

With the Kconfig re-sync with Linux 4.10, characters such as '}', ';' in Kconfig help message cause warnings:

$ make defconfig
*** Default configuration is based on 'sandbox_defconfig'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character '}'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character ';'

Drop the Device Tree fragment from the help.

---

 drivers/i2c/Kconfig | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)
drivers/i2c/Kconfig +1 -22
index 71cc173..39f62da 100644
@@ -132,28 +132,7 @@ config SYS_I2C_SANDBOX
 	help
 	  Enable I2C support for sandbox. This is an emulation of a real I2C
 	  bus. Devices can be attached to the bus using the device tree
-	  which specifies the driver to use. As an example, see this device
-	  tree fragment from sandbox.dts. It shows that the I2C bus has a
-	  single EEPROM at address 0x2c (7-bit address) which is emulated by
-	  the driver for "sandbox,i2c-eeprom", which is in
-	  drivers/misc/i2c_eeprom_emul.c.
-
-	  i2c at 0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		reg = <0>;
-		compatible = "sandbox,i2c";
-		clock-frequency = <400000>;
-		eeprom at 2c {
-			reg = <0x2c>;
-			compatible = "i2c-eeprom";
-			emul {
-				compatible = "sandbox,i2c-eeprom";
-				sandbox,filename = "i2c.bin";
-				sandbox,size = <128>;
-			};
-		};
-	};
+	  which specifies the driver to use.  See sandbox.dts as an example.
 
 config SYS_I2C_S3C24X0
 	bool "Samsung I2C driver"
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/2 i2c: sandbox: remove code snippet from Kconfig help

Hello Masahiro,

Am 11.02.2017 um 04:39 schrieb Masahiro Yamada:

Quoted 8 lines

With the Kconfig re-sync with Linux 4.10, characters such as '}', ';' in Kconfig help message cause warnings:

$ make defconfig
*** Default configuration is based on 'sandbox_defconfig'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character '}'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character ';'
Quoted 7 lines

Drop the Device Tree fragment from the help.

---

  drivers/i2c/Kconfig | 23 +----------------------
  1 file changed, 1 insertion(+), 22 deletions(-)

Thanks!

bye,
Heiko

Quoted 36 lines
drivers/i2c/Kconfig +1 -22
index 71cc173..39f62da 100644
@@ -132,28 +132,7 @@ config SYS_I2C_SANDBOX
  	help
  	  Enable I2C support for sandbox. This is an emulation of a real I2C
  	  bus. Devices can be attached to the bus using the device tree
-	  which specifies the driver to use. As an example, see this device
-	  tree fragment from sandbox.dts. It shows that the I2C bus has a
-	  single EEPROM at address 0x2c (7-bit address) which is emulated by
-	  the driver for "sandbox,i2c-eeprom", which is in
-	  drivers/misc/i2c_eeprom_emul.c.
-
-	  i2c at 0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-		reg = <0>;
-		compatible = "sandbox,i2c";
-		clock-frequency = <400000>;
-		eeprom at 2c {
-			reg = <0x2c>;
-			compatible = "i2c-eeprom";
-			emul {
-				compatible = "sandbox,i2c-eeprom";
-				sandbox,filename = "i2c.bin";
-				sandbox,size = <128>;
-			};
-		};
-	};
+	  which specifies the driver to use.  See sandbox.dts as an example.
 
  config SYS_I2C_S3C24X0
  	bool "Samsung I2C driver"
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#5 lore raw

PATCH 2/2 i2c: sandbox: remove code snippet from Kconfig help

In reply to Masahiro Yamada
Quoted 11 lines · Masahiro Yamada

With the Kconfig re-sync with Linux 4.10, characters such as '}', ';' in Kconfig help message cause warnings:

$ make defconfig
*** Default configuration is based on 'sandbox_defconfig'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character '}'
drivers/i2c/Kconfig:132:warning: ignoring unsupported character ';'

Drop the Device Tree fragment from the help.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170213/62f1cc0b/attachment.sig>