qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH] hw/rdma: another clang compilation fix
@ 2019-02-14 15:40 Marcel Apfelbaum
  2019-02-14 19:50 ` Kamal Heib
  2019-02-17  7:51 ` Marcel Apfelbaum
  0 siblings, 2 replies; 5+ messages in thread
From: Marcel Apfelbaum @ 2019-02-14 15:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: yuval.shaia, kamalheib1, marcel.apfelbaum

Configuring QEMU with:
   configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
Results in:
   qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
   } RdmaDeviceResources;
     ^
   qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here
   typedef struct RdmaDeviceResources RdmaDeviceResources;

Fix by removing one of the 'typedef' definitions.

Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
---
 hw/rdma/rdma_rm_defs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
index 0ba61d1838..5e877c1fd9 100644
--- a/hw/rdma/rdma_rm_defs.h
+++ b/hw/rdma/rdma_rm_defs.h
@@ -96,7 +96,7 @@ typedef struct RdmaRmPort {
     enum ibv_port_state state;
 } RdmaRmPort;
 
-typedef struct RdmaDeviceResources {
+struct RdmaDeviceResources {
     RdmaRmPort port;
     RdmaRmResTbl pd_tbl;
     RdmaRmResTbl mr_tbl;
@@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
     RdmaRmResTbl cq_tbl;
     RdmaRmResTbl cqe_ctx_tbl;
     GHashTable *qp_hash; /* Keeps mapping between real and emulated */
-} RdmaDeviceResources;
+};
 
 #endif
-- 
2.17.1

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

* Re: [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix
  2019-02-14 15:40 [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix Marcel Apfelbaum
@ 2019-02-14 19:50 ` Kamal Heib
  2019-02-17  7:51 ` Marcel Apfelbaum
  1 sibling, 0 replies; 5+ messages in thread
From: Kamal Heib @ 2019-02-14 19:50 UTC (permalink / raw)
  To: Marcel Apfelbaum, qemu-devel; +Cc: yuval.shaia



On 2/14/19 5:40 PM, Marcel Apfelbaum wrote:
> Configuring QEMU with:
>    configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
> Results in:
>    qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
>    } RdmaDeviceResources;
>      ^
>    qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here
>    typedef struct RdmaDeviceResources RdmaDeviceResources;
> 
> Fix by removing one of the 'typedef' definitions.
> 
> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> ---
>  hw/rdma/rdma_rm_defs.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
> index 0ba61d1838..5e877c1fd9 100644
> --- a/hw/rdma/rdma_rm_defs.h
> +++ b/hw/rdma/rdma_rm_defs.h
> @@ -96,7 +96,7 @@ typedef struct RdmaRmPort {
>      enum ibv_port_state state;
>  } RdmaRmPort;
>  
> -typedef struct RdmaDeviceResources {
> +struct RdmaDeviceResources {
>      RdmaRmPort port;
>      RdmaRmResTbl pd_tbl;
>      RdmaRmResTbl mr_tbl;
> @@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
>      RdmaRmResTbl cq_tbl;
>      RdmaRmResTbl cqe_ctx_tbl;
>      GHashTable *qp_hash; /* Keeps mapping between real and emulated */
> -} RdmaDeviceResources;
> +};
>  
>  #endif
> 

Acked-by: Kamal Heib <kamalheib1@gmail.com>

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

* Re: [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix
  2019-02-14 15:40 [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix Marcel Apfelbaum
  2019-02-14 19:50 ` Kamal Heib
@ 2019-02-17  7:51 ` Marcel Apfelbaum
  2019-02-18 22:05   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Marcel Apfelbaum @ 2019-02-17  7:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: yuval.shaia, kamalheib1, qemu-stable



Cc:qemu-stable@nongnu.org


Thanks,
Marcel

On 2/14/19 5:40 PM, Marcel Apfelbaum wrote:
> Configuring QEMU with:
>     configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
> Results in:
>     qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
>     } RdmaDeviceResources;
>       ^
>     qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition is here
>     typedef struct RdmaDeviceResources RdmaDeviceResources;
>
> Fix by removing one of the 'typedef' definitions.
>
> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> ---
>   hw/rdma/rdma_rm_defs.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
> index 0ba61d1838..5e877c1fd9 100644
> --- a/hw/rdma/rdma_rm_defs.h
> +++ b/hw/rdma/rdma_rm_defs.h
> @@ -96,7 +96,7 @@ typedef struct RdmaRmPort {
>       enum ibv_port_state state;
>   } RdmaRmPort;
>   
> -typedef struct RdmaDeviceResources {
> +struct RdmaDeviceResources {
>       RdmaRmPort port;
>       RdmaRmResTbl pd_tbl;
>       RdmaRmResTbl mr_tbl;
> @@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
>       RdmaRmResTbl cq_tbl;
>       RdmaRmResTbl cqe_ctx_tbl;
>       GHashTable *qp_hash; /* Keeps mapping between real and emulated */
> -} RdmaDeviceResources;
> +};
>   
>   #endif

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

* Re: [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix
  2019-02-17  7:51 ` Marcel Apfelbaum
@ 2019-02-18 22:05   ` Philippe Mathieu-Daudé
  2019-02-19 12:04     ` Marcel Apfelbaum
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-18 22:05 UTC (permalink / raw)
  To: Marcel Apfelbaum, qemu-devel; +Cc: kamalheib1, qemu-stable, yuval.shaia

On 2/17/19 8:51 AM, Marcel Apfelbaum wrote:
> 
> Cc:qemu-stable@nongnu.org

I doubt this is a security issue worth Cc'ing qemu-stable :)

> Thanks,
> Marcel
> 
> On 2/14/19 5:40 PM, Marcel Apfelbaum wrote:
>> Configuring QEMU with:
>>     configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
>> Results in:
>>     qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef
>> 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
>>     } RdmaDeviceResources;
>>       ^
>>     qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition
>> is here
>>     typedef struct RdmaDeviceResources RdmaDeviceResources;
>>
>> Fix by removing one of the 'typedef' definitions.
>>
>> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>> ---
>>   hw/rdma/rdma_rm_defs.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
>> index 0ba61d1838..5e877c1fd9 100644
>> --- a/hw/rdma/rdma_rm_defs.h
>> +++ b/hw/rdma/rdma_rm_defs.h
>> @@ -96,7 +96,7 @@ typedef struct RdmaRmPort {
>>       enum ibv_port_state state;
>>   } RdmaRmPort;
>>   -typedef struct RdmaDeviceResources {
>> +struct RdmaDeviceResources {
>>       RdmaRmPort port;
>>       RdmaRmResTbl pd_tbl;
>>       RdmaRmResTbl mr_tbl;
>> @@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
>>       RdmaRmResTbl cq_tbl;
>>       RdmaRmResTbl cqe_ctx_tbl;
>>       GHashTable *qp_hash; /* Keeps mapping between real and emulated */
>> -} RdmaDeviceResources;
>> +};
>>     #endif
> 
> 

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

* Re: [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix
  2019-02-18 22:05   ` Philippe Mathieu-Daudé
@ 2019-02-19 12:04     ` Marcel Apfelbaum
  0 siblings, 0 replies; 5+ messages in thread
From: Marcel Apfelbaum @ 2019-02-19 12:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: kamalheib1, qemu-stable, yuval.shaia


Hi Philippe,

On 2/19/19 12:05 AM, Philippe Mathieu-Daudé wrote:
> On 2/17/19 8:51 AM, Marcel Apfelbaum wrote:
>> Cc:qemu-stable@nongnu.org
> I doubt this is a security issue worth Cc'ing qemu-stable :)
>

I thought it worth adding a compilation fix to the stable branch.

Thanks,
Marcel

>> Thanks,
>> Marcel
>>
>> On 2/14/19 5:40 PM, Marcel Apfelbaum wrote:
>>> Configuring QEMU with:
>>>      configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma
>>> Results in:
>>>      qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef
>>> 'RdmaDeviceResources' is a C11 feature [-Werror,-Wtypedef-redefinition]
>>>      } RdmaDeviceResources;
>>>        ^
>>>      qemu/hw/rdma/rdma_backend_defs.h:24:36: note: previous definition
>>> is here
>>>      typedef struct RdmaDeviceResources RdmaDeviceResources;
>>>
>>> Fix by removing one of the 'typedef' definitions.
>>>
>>> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
>>> ---
>>>    hw/rdma/rdma_rm_defs.h | 4 ++--
>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
>>> index 0ba61d1838..5e877c1fd9 100644
>>> --- a/hw/rdma/rdma_rm_defs.h
>>> +++ b/hw/rdma/rdma_rm_defs.h
>>> @@ -96,7 +96,7 @@ typedef struct RdmaRmPort {
>>>        enum ibv_port_state state;
>>>    } RdmaRmPort;
>>>    -typedef struct RdmaDeviceResources {
>>> +struct RdmaDeviceResources {
>>>        RdmaRmPort port;
>>>        RdmaRmResTbl pd_tbl;
>>>        RdmaRmResTbl mr_tbl;
>>> @@ -105,6 +105,6 @@ typedef struct RdmaDeviceResources {
>>>        RdmaRmResTbl cq_tbl;
>>>        RdmaRmResTbl cqe_ctx_tbl;
>>>        GHashTable *qp_hash; /* Keeps mapping between real and emulated */
>>> -} RdmaDeviceResources;
>>> +};
>>>      #endif
>>

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

end of thread, other threads:[~2019-02-19 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14 15:40 [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix Marcel Apfelbaum
2019-02-14 19:50 ` Kamal Heib
2019-02-17  7:51 ` Marcel Apfelbaum
2019-02-18 22:05   ` Philippe Mathieu-Daudé
2019-02-19 12:04     ` Marcel Apfelbaum

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).