kconfig: introduce kconfig filesThe Kconfig files were generated mostly with this script: for i in `grep -ho CONFIG_[A-Z0-9_]* default-configs/* | sort -u`; do set fnord `git grep -lw $i --
kconfig: introduce kconfig filesThe Kconfig files were generated mostly with this script: for i in `grep -ho CONFIG_[A-Z0-9_]* default-configs/* | sort -u`; do set fnord `git grep -lw $i -- 'hw/*/Makefile.objs' ` shift if test $# = 1; then cat >> $(dirname $1)/Kconfig << EOFconfig ${i#CONFIG_} boolEOF git add $(dirname $1)/Kconfig else echo $i $* fi done sed -i '$d' hw/*/Kconfig for i in hw/*; do if test -d $i && ! test -f $i/Kconfig; then touch $i/Kconfig git add $i/Kconfig fi doneWhenever a symbol is referenced from multiple subdirectories, thescript prints the list of directories that reference the symbol.These symbols have to be added manually to the Kconfig files.Kconfig.host and hw/Kconfig were created manually.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Yang Zhong <yang.zhong@intel.com>Message-Id: <20190123065618.3520-27-yang.zhong@intel.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
Include qapi/error.h exactly where neededThis cleanup makes the number of objects depending on qapi/error.hdrop from 1910 (out of 4743) to 1612 in my "build everything" tree.While there, separat
Include qapi/error.h exactly where neededThis cleanup makes the number of objects depending on qapi/error.hdrop from 1910 (out of 4743) to 1612 in my "build everything" tree.While there, separate #include from file comment with a blank line,and drop a useless comment on why qemu/osdep.h is included first.Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-Id: <20180201111846.21846-5-armbru@redhat.com>[Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed]
maint: Fix macros with broken 'do/while(0); ' usageThe point of writing a macro embedded in a 'do { ... } while (0)'loop (particularly if the macro has multiple statements or wouldotherwise end w
maint: Fix macros with broken 'do/while(0); ' usageThe point of writing a macro embedded in a 'do { ... } while (0)'loop (particularly if the macro has multiple statements or wouldotherwise end with an 'if' statement) is so that the macro can beused as a drop-in statement with the caller supplying thetrailing ';'. Although our coding style frowns on brace-less 'if': if (cond) statement; else something else;that is the classic case where failure to use do/while(0) wrappingwould cause the 'else' to pair with any embedded 'if' in the macrorather than the intended outer 'if'. But conversely, if the macroincludes an embedded ';', then the same brace-less coding stylewould now have two statements, making the 'else' a syntax errorrather than pairing with the outer 'if'. Thus, even though ourcoding style with required braces is not impacted, ending a macrowith ';' makes our code harder to port to projects that usebrace-less styles.The change should have no semantic impact. I was not able tofully compile-test all of the changes (as some of them areexamples of the ugly bit-rotting debug print statements that arecompletely elided by default, and I didn't want to recompilewith the necessary -D witnesses - cleaning those up is left as abite-sized task for another day); I did, however, audit that forall files touched, all callers of the changed macros DID supplya trailing ';' at the callsite, and did not appear to be usedas part of a brace-less conditional.Found mechanically via: $ git grep -B1 'while (0);' | grep -A1 \\\\Signed-off-by: Eric Blake <eblake@redhat.com>Acked-by: Cornelia Huck <cohuck@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>Message-Id: <20171201232433.25193-7-eblake@redhat.com>Reviewed-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
STM32F2xx: Add the ADC deviceAdd the STM32F2xx ADC device. This device randomlygenerates values on each read.This also includes creating a hw/adc directory.Signed-off-by: Alistair Francis <ali
STM32F2xx: Add the ADC deviceAdd the STM32F2xx ADC device. This device randomlygenerates values on each read.This also includes creating a hw/adc directory.Signed-off-by: Alistair Francis <alistair@alistair23.me>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 3240e660adaf537f55a63ce06096e844aece8cda.1474742262.git.alistair@alistair23.meSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
12