Message ID | 1513606078-728-1-git-send-email-stefanb@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1513606078-728-1-git-send-email-stefanb@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH] tpm: Fix linker error when using --disable-tpm === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE.. | wc -l) failed=0 git config --local diff.renamelimit 0 git config --local diff.renames True commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1)) done exit $failed === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' fbcf0426cd tpm: Fix linker error when using --disable-tpm === OUTPUT BEGIN === Checking PATCH 1/1: tpm: Fix linker error when using --disable-tpm... ERROR: adding a line without newline at end of file #44: FILE: stubs/tpm.c:49: +} total: 1 errors, 0 warnings, 25 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-devel@freelists.org
diff --git a/stubs/tpm.c b/stubs/tpm.c index c18aac1..bb1db44 100644 --- a/stubs/tpm.c +++ b/stubs/tpm.c @@ -6,6 +6,7 @@ */ #include "qemu/osdep.h" #include "sysemu/tpm.h" +#include "sysemu/tpm_backend.h" #include "qmp-commands.h" int tpm_init(void) @@ -31,3 +32,18 @@ TpmModelList *qmp_query_tpm_models(Error **errp) { return NULL; } + +void tpm_backend_reset(TPMBackend *s) +{ + return; +} + +int tpm_backend_init(TPMBackend *s, TPMIf *tpmif, Error **errp) +{ + return 0; +} + +TPMBackend *qemu_find_tpm_be(const char *id) +{ + return NULL; +} \ No newline at end of file
Commit 493b7830 extends core/qdev-properties-system.c with a property to lookup a TPM backend, which calls into TPM related functions. Unfortunately this breaks the build when --disable-tpm is used. To fix this we extend stubs/tpm.c with the missing stub functions. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> --- stubs/tpm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)