qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qom: Fix "typddef" typo
@ 2020-10-07 22:02 Eduardo Habkost
  2020-10-08  7:01 ` Marc-André Lureau
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Eduardo Habkost @ 2020-10-07 22:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Daniel P. Berrangé, Richard Henderson,
	Eduardo Habkost, Paolo Bonzini

Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
never caused any problems because we always compile using
-std=gnu99.

Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qom/object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qom/object.c b/qom/object.c
index c335dce7e4..125dabd28b 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -692,7 +692,7 @@ static void object_finalize(void *data)
 
 /* Find the minimum alignment guaranteed by the system malloc. */
 #if __STDC_VERSION__ >= 201112L
-typddef max_align_t qemu_max_align_t;
+typedef max_align_t qemu_max_align_t;
 #else
 typedef union {
     long l;
-- 
2.26.2



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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-07 22:02 [PATCH] qom: Fix "typddef" typo Eduardo Habkost
@ 2020-10-08  7:01 ` Marc-André Lureau
  2020-10-08  7:44 ` Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Marc-André Lureau @ 2020-10-08  7:01 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu trival, Richard Henderson, Daniel P. Berrangé, QEMU,
	Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Thu, Oct 8, 2020 at 2:04 AM Eduardo Habkost <ehabkost@redhat.com> wrote:

> Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
> never caused any problems because we always compile using
> -std=gnu99.
>
> Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased
> alignment")
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  qom/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index c335dce7e4..125dabd28b 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -692,7 +692,7 @@ static void object_finalize(void *data)
>
>  /* Find the minimum alignment guaranteed by the system malloc. */
>  #if __STDC_VERSION__ >= 201112L
> -typddef max_align_t qemu_max_align_t;
> +typedef max_align_t qemu_max_align_t;
>  #else
>  typedef union {
>      long l;
> --
> 2.26.2
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1752 bytes --]

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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-07 22:02 [PATCH] qom: Fix "typddef" typo Eduardo Habkost
  2020-10-08  7:01 ` Marc-André Lureau
@ 2020-10-08  7:44 ` Philippe Mathieu-Daudé
  2020-10-12 14:32 ` Laurent Vivier
  2020-10-12 14:45 ` Daniel P. Berrangé
  3 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-08  7:44 UTC (permalink / raw)
  To: Eduardo Habkost, qemu-devel
  Cc: qemu-trivial, Richard Henderson, Daniel P. Berrangé,
	Paolo Bonzini

On 10/8/20 12:02 AM, Eduardo Habkost wrote:
> Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
> never caused any problems because we always compile using
> -std=gnu99.
> 
> Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  qom/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index c335dce7e4..125dabd28b 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -692,7 +692,7 @@ static void object_finalize(void *data)
>  
>  /* Find the minimum alignment guaranteed by the system malloc. */
>  #if __STDC_VERSION__ >= 201112L
> -typddef max_align_t qemu_max_align_t;
> +typedef max_align_t qemu_max_align_t;

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

>  #else
>  typedef union {
>      long l;
> 



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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-07 22:02 [PATCH] qom: Fix "typddef" typo Eduardo Habkost
  2020-10-08  7:01 ` Marc-André Lureau
  2020-10-08  7:44 ` Philippe Mathieu-Daudé
@ 2020-10-12 14:32 ` Laurent Vivier
  2020-10-12 14:45 ` Daniel P. Berrangé
  3 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:32 UTC (permalink / raw)
  To: Eduardo Habkost, qemu-devel
  Cc: qemu-trivial, Richard Henderson, Daniel P. Berrangé,
	Paolo Bonzini

Le 08/10/2020 à 00:02, Eduardo Habkost a écrit :
> Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
> never caused any problems because we always compile using
> -std=gnu99.
> 
> Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  qom/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index c335dce7e4..125dabd28b 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -692,7 +692,7 @@ static void object_finalize(void *data)
>  
>  /* Find the minimum alignment guaranteed by the system malloc. */
>  #if __STDC_VERSION__ >= 201112L
> -typddef max_align_t qemu_max_align_t;
> +typedef max_align_t qemu_max_align_t;
>  #else
>  typedef union {
>      long l;
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-07 22:02 [PATCH] qom: Fix "typddef" typo Eduardo Habkost
                   ` (2 preceding siblings ...)
  2020-10-12 14:32 ` Laurent Vivier
@ 2020-10-12 14:45 ` Daniel P. Berrangé
  2020-10-12 15:24   ` Laurent Vivier
  2020-10-13 13:16   ` Eduardo Habkost
  3 siblings, 2 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2020-10-12 14:45 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-trivial, Paolo Bonzini, Richard Henderson, qemu-devel

On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote:
> Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
> never caused any problems because we always compile using
> -std=gnu99.
> 
> Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  qom/object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qom/object.c b/qom/object.c
> index c335dce7e4..125dabd28b 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -692,7 +692,7 @@ static void object_finalize(void *data)
>  
>  /* Find the minimum alignment guaranteed by the system malloc. */
>  #if __STDC_VERSION__ >= 201112L
> -typddef max_align_t qemu_max_align_t;
> +typedef max_align_t qemu_max_align_t;
>  #else

Why do we need / have this first part of the #if at all ?  We
unconditionally add  -std=gnu99, so surely this has always
been dead code and can just be better deleted.

>  typedef union {
>      long l;
> -- 
> 2.26.2
> 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-12 14:45 ` Daniel P. Berrangé
@ 2020-10-12 15:24   ` Laurent Vivier
  2020-10-13 13:16   ` Eduardo Habkost
  1 sibling, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-10-12 15:24 UTC (permalink / raw)
  To: Daniel P. Berrangé, Eduardo Habkost
  Cc: qemu-trivial, Paolo Bonzini, Richard Henderson, qemu-devel

Le 12/10/2020 à 16:45, Daniel P. Berrangé a écrit :
> On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote:
>> Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
>> never caused any problems because we always compile using
>> -std=gnu99.
>>
>> Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>>  qom/object.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index c335dce7e4..125dabd28b 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -692,7 +692,7 @@ static void object_finalize(void *data)
>>  
>>  /* Find the minimum alignment guaranteed by the system malloc. */
>>  #if __STDC_VERSION__ >= 201112L
>> -typddef max_align_t qemu_max_align_t;
>> +typedef max_align_t qemu_max_align_t;
>>  #else
> 
> Why do we need / have this first part of the #if at all ?  We
> unconditionally add  -std=gnu99, so surely this has always
> been dead code and can just be better deleted.
> 

I've removed the patch from my queue.

But perhaps it will be needed in the future if we switch to a newer
standard version?

Thanks,
Laurent


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

* Re: [PATCH] qom: Fix "typddef" typo
  2020-10-12 14:45 ` Daniel P. Berrangé
  2020-10-12 15:24   ` Laurent Vivier
@ 2020-10-13 13:16   ` Eduardo Habkost
  1 sibling, 0 replies; 7+ messages in thread
From: Eduardo Habkost @ 2020-10-13 13:16 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: qemu-trivial, Paolo Bonzini, Richard Henderson, qemu-devel

On Mon, Oct 12, 2020 at 03:45:12PM +0100, Daniel P. Berrangé wrote:
> On Wed, Oct 07, 2020 at 06:02:55PM -0400, Eduardo Habkost wrote:
> > Fix typo introduced in the C11 #ifdef for qemu_max_align_t.  It
> > never caused any problems because we always compile using
> > -std=gnu99.
> > 
> > Fixes: 4c880f363e9e ("qom: Allow objects to be allocated with increased alignment")
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  qom/object.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/qom/object.c b/qom/object.c
> > index c335dce7e4..125dabd28b 100644
> > --- a/qom/object.c
> > +++ b/qom/object.c
> > @@ -692,7 +692,7 @@ static void object_finalize(void *data)
> >  
> >  /* Find the minimum alignment guaranteed by the system malloc. */
> >  #if __STDC_VERSION__ >= 201112L
> > -typddef max_align_t qemu_max_align_t;
> > +typedef max_align_t qemu_max_align_t;
> >  #else
> 
> Why do we need / have this first part of the #if at all ?  We
> unconditionally add  -std=gnu99, so surely this has always
> been dead code and can just be better deleted.

It has the same function as a comment saying "we can use
max_align_t as soon as we move to C11".  The difference is that
it doesn't need us to manually change the code once we do.

-- 
Eduardo



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

end of thread, other threads:[~2020-10-13 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-07 22:02 [PATCH] qom: Fix "typddef" typo Eduardo Habkost
2020-10-08  7:01 ` Marc-André Lureau
2020-10-08  7:44 ` Philippe Mathieu-Daudé
2020-10-12 14:32 ` Laurent Vivier
2020-10-12 14:45 ` Daniel P. Berrangé
2020-10-12 15:24   ` Laurent Vivier
2020-10-13 13:16   ` Eduardo Habkost

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