[Qemu-devel] [PATCH] cuda.h: Fix multiple typedef

Dr. David Alan Gilbert (git) posted 1 patch 7 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180216173111.10270-1-dgilbert@redhat.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppcbe passed
Test ppcle passed
Test s390x passed
include/hw/misc/macio/cuda.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] cuda.h: Fix multiple typedef
Posted by Dr. David Alan Gilbert (git) 7 years, 8 months ago
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

RHEL6's compilers don't like the repeated typedef.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 include/hw/misc/macio/cuda.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/hw/misc/macio/cuda.h b/include/hw/misc/macio/cuda.h
index 6afbdd13ee..494b709579 100644
--- a/include/hw/misc/macio/cuda.h
+++ b/include/hw/misc/macio/cuda.h
@@ -93,12 +93,12 @@ typedef struct CUDAState {
 } CUDAState;
 
 /* MOS6522 CUDA */
-typedef struct MOS6522CUDAState {
+struct MOS6522CUDAState {
     /*< private >*/
     MOS6522State parent_obj;
 
     CUDAState *cuda;
-} MOS6522CUDAState;
+};
 
 #define TYPE_MOS6522_CUDA "mos6522-cuda"
 #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
-- 
2.14.3


Re: [Qemu-devel] [PATCH] cuda.h: Fix multiple typedef
Posted by Philippe Mathieu-Daudé 7 years, 8 months ago
On 02/16/2018 02:31 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> RHEL6's compilers don't like the repeated typedef.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  include/hw/misc/macio/cuda.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/hw/misc/macio/cuda.h b/include/hw/misc/macio/cuda.h
> index 6afbdd13ee..494b709579 100644
> --- a/include/hw/misc/macio/cuda.h
> +++ b/include/hw/misc/macio/cuda.h
> @@ -93,12 +93,12 @@ typedef struct CUDAState {
>  } CUDAState;
>  
>  /* MOS6522 CUDA */
> -typedef struct MOS6522CUDAState {
> +struct MOS6522CUDAState {
>      /*< private >*/
>      MOS6522State parent_obj;
>  
>      CUDAState *cuda;
> -} MOS6522CUDAState;
> +};
>  
>  #define TYPE_MOS6522_CUDA "mos6522-cuda"
>  #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
> 

Re: [Qemu-devel] [PATCH] cuda.h: Fix multiple typedef
Posted by Peter Maydell 7 years, 8 months ago
On 16 February 2018 at 17:31, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> RHEL6's compilers don't like the repeated typedef.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  include/hw/misc/macio/cuda.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/misc/macio/cuda.h b/include/hw/misc/macio/cuda.h
> index 6afbdd13ee..494b709579 100644
> --- a/include/hw/misc/macio/cuda.h
> +++ b/include/hw/misc/macio/cuda.h
> @@ -93,12 +93,12 @@ typedef struct CUDAState {
>  } CUDAState;
>
>  /* MOS6522 CUDA */
> -typedef struct MOS6522CUDAState {
> +struct MOS6522CUDAState {
>      /*< private >*/
>      MOS6522State parent_obj;
>
>      CUDAState *cuda;
> -} MOS6522CUDAState;
> +};
>
>  #define TYPE_MOS6522_CUDA "mos6522-cuda"
>  #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
> --

Thanks; applied to master as a  buildfix.

-- PMM

Re: [Qemu-devel] [PATCH] cuda.h: Fix multiple typedef
Posted by Mark Cave-Ayland 7 years, 8 months ago
On 16/02/18 18:38, Peter Maydell wrote:

> On 16 February 2018 at 17:31, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
>> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>>
>> RHEL6's compilers don't like the repeated typedef.
>>
>> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> ---
>>   include/hw/misc/macio/cuda.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/hw/misc/macio/cuda.h b/include/hw/misc/macio/cuda.h
>> index 6afbdd13ee..494b709579 100644
>> --- a/include/hw/misc/macio/cuda.h
>> +++ b/include/hw/misc/macio/cuda.h
>> @@ -93,12 +93,12 @@ typedef struct CUDAState {
>>   } CUDAState;
>>
>>   /* MOS6522 CUDA */
>> -typedef struct MOS6522CUDAState {
>> +struct MOS6522CUDAState {
>>       /*< private >*/
>>       MOS6522State parent_obj;
>>
>>       CUDAState *cuda;
>> -} MOS6522CUDAState;
>> +};
>>
>>   #define TYPE_MOS6522_CUDA "mos6522-cuda"
>>   #define MOS6522_CUDA(obj) OBJECT_CHECK(MOS6522CUDAState, (obj), \
>> --
> 
> Thanks; applied to master as a  buildfix.

Thanks both. Apologies I got caught up later than expected yesterday.


ATB,

Mark.