From c20b139620498b2f158b52e0c4ad7f6de35a520e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 21 Jun 2019 13:28:54 +0200 Subject: checkpatch: do not warn for multiline parenthesized returned value While indeed we do not want to have return (a); it is less clear that this applies to return (a && b); Some editors indent more nicely if you have parentheses, and some people's eyes may appreciate that as well. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: Richard Henderson Message-Id: <1561116534-21814-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c2aaf42..2f81371 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2296,7 +2296,8 @@ sub process { $value =~ s/\([^\(\)]*\)/1/) { } #print "value<$value>\n"; - if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/) { + if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/ && + $line =~ /;$/) { ERROR("return is not a function, parentheses are not required\n" . $herecurr); } elsif ($spacing !~ /\s+/) { -- cgit v1.1 From 6b7ac49d570c66754fad1b80cc200c7596d1facd Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 24 Jun 2019 20:18:46 +0200 Subject: minikconf: do not include variables from MINIKCONF_ARGS in config-all-devices.mak When minikconf writes config-devices.mak, it includes all variables including those from MINIKCONF_ARGS. This causes values from config-host.mak to "stick" to the ones used in generating config-devices.mak, because config-devices.mak is included after config-host.mak. Avoid this by omitting assignments coming from the command line in the output of minikconf. Reported-by: Christophe de Dinechin Reviewed-by: Christophe de Dinechin Tested-by: Christophe de Dinechin Signed-off-by: Paolo Bonzini --- scripts/minikconf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/minikconf.py b/scripts/minikconf.py index 0ffc6c3..3109a81 100644 --- a/scripts/minikconf.py +++ b/scripts/minikconf.py @@ -688,11 +688,13 @@ if __name__ == '__main__': data = KconfigData(mode) parser = KconfigParser(data) + external_vars = set() for arg in argv[3:]: m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg) if m is not None: name, value = m.groups() parser.do_assignment(name, value == 'y') + external_vars.add(name[7:]) else: fp = open(arg, 'r') parser.parse_file(fp) @@ -700,7 +702,8 @@ if __name__ == '__main__': config = data.compute_config() for key in sorted(config.keys()): - print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n'))) + if key not in external_vars: + print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n'))) deps = open(argv[2], 'w') for fname in data.previously_included: -- cgit v1.1 From 6c22ea9d83ca91a3f5453d2699381a901f144ab5 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Fri, 5 Jul 2019 14:35:53 +0000 Subject: Makefile: generate header file with the list of devices enabled v2: generate config-devices.h which contains the list of devices enabled Message-Id: <20190705143554.10295-1-julio.montes@intel.com> Signed-off-by: Paolo Bonzini Signed-off-by: Julio Montes --- scripts/create_config | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/create_config b/scripts/create_config index d727e5e..00e86c8 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -58,6 +58,8 @@ case $line in name=${line%=*} echo "#define $name 1" ;; + CONFIG_*=n) # configuration + ;; CONFIG_*=*) # configuration name=${line%=*} value=${line#*=} -- cgit v1.1