All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: armbru@redhat.com, qemu-devel@nongnu.org
Cc: philmd@redhat.com, Stefan Berger <stefanb@linux.ibm.com>
Subject: [RFC PATCH V1 3/3] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined
Date: Fri, 11 Jun 2021 21:21:02 -0400	[thread overview]
Message-ID: <20210612012102.1820063-4-stefanb@linux.ibm.com> (raw)
In-Reply-To: <20210612012102.1820063-1-stefanb@linux.ibm.com>

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 include/sysemu/tpm.h         | 6 +++++-
 include/sysemu/tpm_backend.h | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 1a85564e47..2ca3fa32ee 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -15,10 +15,12 @@
 #include "qapi/qapi-types-tpm.h"
 #include "qom/object.h"
 
-int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
 int tpm_init(void);
 void tpm_cleanup(void);
 
+#ifdef CONFIG_TPM
+int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
+
 typedef enum TPMVersion {
     TPM_VERSION_UNSPEC = 0,
     TPM_VERSION_1_2 = 1,
@@ -73,4 +75,6 @@ static inline TPMVersion tpm_get_version(TPMIf *ti)
     return TPM_IF_GET_CLASS(ti)->get_version(ti);
 }
 
+#endif /* CONFIG_TPM */
+
 #endif /* QEMU_TPM_H */
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 6f078f5f48..8fd3269c11 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -18,6 +18,8 @@
 #include "sysemu/tpm.h"
 #include "qapi/error.h"
 
+#ifdef CONFIG_TPM
+
 #define TYPE_TPM_BACKEND "tpm-backend"
 OBJECT_DECLARE_TYPE(TPMBackend, TPMBackendClass,
                     TPM_BACKEND)
@@ -209,4 +211,6 @@ TPMInfo *tpm_backend_query_tpm(TPMBackend *s);
 
 TPMBackend *qemu_find_tpm_be(const char *id);
 
-#endif
+#endif /* CONFIG_TPM */
+
+#endif /* TPM_BACKEND_H */
-- 
2.31.1



  parent reply	other threads:[~2021-06-12  1:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  1:20 [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set Stefan Berger
2021-06-12  1:21 ` [RFC PATCH V1 1/3] acpi: Eliminate all " Stefan Berger
2021-06-14  8:09   ` Markus Armbruster
2021-06-14  9:53   ` Philippe Mathieu-Daudé
2021-06-14 18:12     ` Stefan Berger
2021-06-12  1:21 ` [RFC PATCH V1 2/3] arm: " Stefan Berger
2021-06-12  1:21 ` Stefan Berger [this message]
2021-06-14  9:46   ` [RFC PATCH V1 3/3] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined Philippe Mathieu-Daudé
2021-06-14  8:34 ` [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set Markus Armbruster
2021-06-14 19:12   ` Stefan Berger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210612012102.1820063-4-stefanb@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=armbru@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.