* [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types)
@ 2013-04-02 20:14 Stefan Weil
2013-04-03 10:39 ` Stefan Berger
2013-04-05 12:51 ` Anthony Liguori
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Weil @ 2013-04-02 20:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil, Anthony Liguori, Stefan Berger
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tpm/tpm_int.h | 9 ++-------
tpm/tpm_tis.h | 4 ++--
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/tpm/tpm_int.h b/tpm/tpm_int.h
index b4787ad..340bfd5 100644
--- a/tpm/tpm_int.h
+++ b/tpm/tpm_int.h
@@ -15,11 +15,8 @@
#include "exec/memory.h"
#include "tpm/tpm_tis.h"
-struct TPMDriverOps;
-typedef struct TPMDriverOps TPMDriverOps;
-
/* overall state of the TPM interface */
-typedef struct TPMState {
+struct TPMState {
ISADevice busdev;
MemoryRegion mmio;
@@ -32,12 +29,10 @@ typedef struct TPMState {
char *backend;
TPMBackend *be_driver;
-} TPMState;
+};
#define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
-typedef void (TPMRecvDataCB)(TPMState *, uint8_t locty);
-
struct TPMDriverOps {
enum TpmType type;
/* get a descriptive text of the backend to display to the user */
diff --git a/tpm/tpm_tis.h b/tpm/tpm_tis.h
index 0c8df80..7f216e5 100644
--- a/tpm/tpm_tis.h
+++ b/tpm/tpm_tis.h
@@ -35,10 +35,10 @@
#define TYPE_TPM_TIS "tpm-tis"
-typedef struct TPMSizedBuffer {
+struct TPMSizedBuffer {
uint32_t size;
uint8_t *buffer;
-} TPMSizedBuffer;
+};
typedef enum {
TPM_TIS_STATE_IDLE = 0,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types)
2013-04-02 20:14 [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types) Stefan Weil
@ 2013-04-03 10:39 ` Stefan Berger
2013-04-03 19:52 ` Stefan Weil
2013-04-05 12:51 ` Anthony Liguori
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Berger @ 2013-04-03 10:39 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, qemu-devel
On 04/02/2013 04:14 PM, Stefan Weil wrote:
What compiler and options did you use?
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> ---
> tpm/tpm_int.h | 9 ++-------
> tpm/tpm_tis.h | 4 ++--
> 2 files changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/tpm/tpm_int.h b/tpm/tpm_int.h
> index b4787ad..340bfd5 100644
> --- a/tpm/tpm_int.h
> +++ b/tpm/tpm_int.h
> @@ -15,11 +15,8 @@
> #include "exec/memory.h"
> #include "tpm/tpm_tis.h"
>
> -struct TPMDriverOps;
> -typedef struct TPMDriverOps TPMDriverOps;
> -
> /* overall state of the TPM interface */
> -typedef struct TPMState {
> +struct TPMState {
> ISADevice busdev;
> MemoryRegion mmio;
>
> @@ -32,12 +29,10 @@ typedef struct TPMState {
>
> char *backend;
> TPMBackend *be_driver;
> -} TPMState;
> +};
>
> #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
>
> -typedef void (TPMRecvDataCB)(TPMState *, uint8_t locty);
> -
> struct TPMDriverOps {
> enum TpmType type;
> /* get a descriptive text of the backend to display to the user */
> diff --git a/tpm/tpm_tis.h b/tpm/tpm_tis.h
> index 0c8df80..7f216e5 100644
> --- a/tpm/tpm_tis.h
> +++ b/tpm/tpm_tis.h
> @@ -35,10 +35,10 @@
> #define TYPE_TPM_TIS "tpm-tis"
>
>
> -typedef struct TPMSizedBuffer {
> +struct TPMSizedBuffer {
> uint32_t size;
> uint8_t *buffer;
> -} TPMSizedBuffer;
> +};
>
> typedef enum {
> TPM_TIS_STATE_IDLE = 0,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types)
2013-04-03 10:39 ` Stefan Berger
@ 2013-04-03 19:52 ` Stefan Weil
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2013-04-03 19:52 UTC (permalink / raw)
To: Stefan Berger; +Cc: Anthony Liguori, qemu-devel
Am 03.04.2013 12:39, schrieb Stefan Berger:
> On 04/02/2013 04:14 PM, Stefan Weil wrote:
>
> What compiler and options did you use?
>
That's the MinGW-w64 cross gdb from Debian Squeeze with QEMU's
default compiler options.
$ amd64-mingw32msvc-gcc --version
amd64-mingw32msvc-gcc (GCC) 4.4.4make: Entering directory
`/qemu/bin/debug/w64'
CC tpm/tpm.o
In file included from /qemu/tpm/tpm_int.h:16,
from /qemu/tpm/tpm.c:19:
/qemu/tpm/tpm_tis.h:41: error: redefinition of typedef 'TPMSizedBuffer'
/qemu/include/tpm/tpm.h:18: note: previous declaration of
'TPMSizedBuffer' was here
In file included from /qemu/tpm/tpm.c:19:
/qemu/tpm/tpm_int.h:19: error: redefinition of typedef 'TPMDriverOps'
/qemu/include/backends/tpm.h:34: note: previous declaration of
'TPMDriverOps' was here
/qemu/tpm/tpm_int.h:35: error: redefinition of typedef 'TPMState'
/qemu/include/tpm/tpm.h:17: note: previous declaration of 'TPMState' was
here
/qemu/tpm/tpm_int.h:39: error: redefinition of typedef 'TPMRecvDataCB'
/qemu/include/tpm/tpm.h:19: note: previous declaration of
'TPMRecvDataCB' was here
make: *** [tpm/tpm.o] Fehler 1
make: Leaving directory `/qemu/bin/debug/w64'
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
QEMU was configured with
./configure' '--cross-prefix=amd64-mingw32msvc-' '--enable-debug'
'--disable-docs'
Regards,
Stefan W.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types)
2013-04-02 20:14 [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types) Stefan Weil
2013-04-03 10:39 ` Stefan Berger
@ 2013-04-05 12:51 ` Anthony Liguori
1 sibling, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2013-04-05 12:51 UTC (permalink / raw)
To: Stefan Weil, qemu-devel; +Cc: Anthony Liguori, Stefan Berger
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-05 12:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-02 20:14 [Qemu-devel] [PATCH] tpm: Fix several compiler warnings (redefined data types) Stefan Weil
2013-04-03 10:39 ` Stefan Berger
2013-04-03 19:52 ` Stefan Weil
2013-04-05 12:51 ` Anthony Liguori
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.