* [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested
@ 2015-06-02 18:05 Stefan Berger
2015-06-03 7:07 ` Juan Quintela
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2015-06-02 18:05 UTC (permalink / raw)
To: qemu-devel, mst; +Cc: peter.maydell, Stefan Berger, stefanb, quintela
Prevent the function tpm_tis_get_tpm_version() from being called
if not TPM support is requested.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
include/sysemu/tpm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index c143890..c8afa17 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -32,11 +32,13 @@ TPMVersion tpm_tis_get_tpm_version(Object *obj);
static inline TPMVersion tpm_get_version(void)
{
+#ifdef CONFIG_TPM
Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
if (obj) {
return tpm_tis_get_tpm_version(obj);
}
+#endif
return TPM_VERSION_UNSPEC;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested
2015-06-02 18:05 [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested Stefan Berger
@ 2015-06-03 7:07 ` Juan Quintela
0 siblings, 0 replies; 2+ messages in thread
From: Juan Quintela @ 2015-06-03 7:07 UTC (permalink / raw)
To: Stefan Berger; +Cc: peter.maydell, stefanb, qemu-devel, mst
Stefan Berger <stefanb@linux.vnet.ibm.com> wrote:
> Prevent the function tpm_tis_get_tpm_version() from being called
> if not TPM support is requested.
>
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> ---
> include/sysemu/tpm.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
> index c143890..c8afa17 100644
> --- a/include/sysemu/tpm.h
> +++ b/include/sysemu/tpm.h
> @@ -32,11 +32,13 @@ TPMVersion tpm_tis_get_tpm_version(Object *obj);
>
> static inline TPMVersion tpm_get_version(void)
> {
> +#ifdef CONFIG_TPM
> Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
>
> if (obj) {
> return tpm_tis_get_tpm_version(obj);
> }
> +#endif
> return TPM_VERSION_UNSPEC;
> }
I sent basically the same patch to mst and to the list.
I don't care which one is picked.
Thanks, Juan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-03 7:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 18:05 [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested Stefan Berger
2015-06-03 7:07 ` Juan Quintela
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.