qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tpm: Fix linker error when using --disable-tpm
@ 2017-12-18 14:07 Stefan Berger
  2017-12-18 15:49 ` no-reply
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2017-12-18 14:07 UTC (permalink / raw)
  To: qemu-devel, thuth; +Cc: peter.maydell, marcandre.lureau, Stefan Berger

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(+)

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
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] tpm: Fix linker error when using --disable-tpm
  2017-12-18 14:07 [Qemu-devel] [PATCH] tpm: Fix linker error when using --disable-tpm Stefan Berger
@ 2017-12-18 15:49 ` no-reply
  0 siblings, 0 replies; 2+ messages in thread
From: no-reply @ 2017-12-18 15:49 UTC (permalink / raw)
  To: stefanb; +Cc: famz, qemu-devel, thuth, peter.maydell, marcandre.lureau

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-18 23:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 14:07 [Qemu-devel] [PATCH] tpm: Fix linker error when using --disable-tpm Stefan Berger
2017-12-18 15:49 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).