Skip to contentSkip to conversation

vfio: fix wrong initialize vfio_group_list

PATCH In review Chen Fan 3 participants 6 messages Jan 22, 2015 – Jan 26, 2015

lore
Share & tools
lore

Chen Fan

author
#0 lore raw

PATCH 1/1 vfio: fix wrong initialize vfio_group_list

---
 hw/vfio/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +1 -1
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
 #include "trace.h"
 
 struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
 struct vfio_as_head vfio_address_spaces =
     QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 
Signature · 1 line
1.9.3
#1 lore raw

Hi Chen,

thanks for correcting this mistake I introduced when moving code from pci to common.

Best Regards

Eric

Quoted 19 lines · Chen Fan
---
 hw/vfio/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +1 -1
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
 #include "trace.h"
 
 struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
 struct vfio_as_head vfio_address_spaces =
     QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 
author
#2 lore raw
Quoted 4 lines · Eric Auger

Hi Chen,

thanks for correcting this mistake I introduced when moving code from pci to common.

so, can you check in this patch?

Thanks,
Chen

Quoted 26 lines

Best Regards

Eric

Quoted 19 lines · Chen Fan
---
  hw/vfio/common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +1 -1
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
  #include "trace.h"
 
  struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
  struct vfio_as_head vfio_address_spaces =
      QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 
#3 lore raw

----- Original Message -----

Quoted 9 lines
Quoted 4 lines · Eric Auger

Hi Chen,

thanks for correcting this mistake I introduced when moving code from pci to common.

so, can you check in this patch?

I've got it queued up and while it's clearly an error, I don't see that the fix actually changes the resulting code, the parameter is ignored in the macro. Am I missing something? If that's the case, I'll include it in my next pull request, but I don't see any pressing reason to rush that request. Thanks,

Alex

Quoted 23 lines
Quoted 21 lines · Chen Fan
Quoted 19 lines
---
  hw/vfio/common.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +1 -1
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
  #include "trace.h"
 
  struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
  struct vfio_as_head vfio_address_spaces =
      QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 
author
#4 lore raw
Quoted 11 lines · Alex Williamson

----- Original Message -----

Quoted 8 lines
Quoted 4 lines · Eric Auger

Hi Chen,

thanks for correcting this mistake I introduced when moving code from pci to common.

so, can you check in this patch?

I've got it queued up and while it's clearly an error, I don't see that the fix actually changes the resulting code, the parameter is ignored in the macro. Am I missing something? If that's the case, I'll include it in my next pull request, but I don't see any pressing reason to rush that request. Thanks,

Yes, this patch can not affect the result of the code execution for now, but I think it is also a typo mistake, if the macro QLIST_HEAD_INITIALIZER will be changed and using the parameter in the future, this error will be difficultly found. I think the earlier found the earlier fixed.

Thanks,
Chen

Quoted 26 lines

Alex

Quoted 13 lines
Quoted 13 lines · Chen Fan
Quoted 12 lines
---
   hw/vfio/common.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +0 -0
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
   #include "trace.h"
 
Quoted 8 lines
Quoted 7 lines

hw/vfio/common.c line 38

Quoted 7 lines
hw/vfio/common.c +1 -1
   struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
   struct vfio_as_head vfio_address_spaces =
       QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 

.

#5 lore raw

----- Original Message -----

Quoted 17 lines · Alex Williamson
Quoted 7 lines

----- Original Message -----

Quoted 5 lines
Quoted 2 lines · Eric Auger

Hi Chen,

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

thanks for correcting this mistake I introduced when moving code from pci to common.

so, can you check in this patch?

I've got it queued up and while it's clearly an error, I don't see that the fix actually changes the resulting code, the parameter is ignored in the macro. Am I missing something? If that's the case, I'll include it in my next pull request, but I don't see any pressing reason to rush that request. Thanks,

Quoted 5 lines

Yes, this patch can not affect the result of the code execution for now, but I think it is also a typo mistake, if the macro QLIST_HEAD_INITIALIZER
will be changed and using the parameter in the future, this error will be difficultly found. I think the earlier found the earlier fixed.

Yes, it's obviously an error and I'll get it in before QEMU 2.3, likely within the next week or so. Thanks,

Alex

Quoted 25 lines
Quoted 23 lines
Quoted 13 lines
Quoted 13 lines · Chen Fan
Quoted 12 lines
---
   hw/vfio/common.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
hw/vfio/common.c +0 -0
index cf483ff..e71385e 100644
@@ -32,7 +32,7 @@
   #include "trace.h"
 
Quoted 8 lines
Quoted 7 lines

hw/vfio/common.c line 38

Quoted 7 lines
hw/vfio/common.c +1 -1
   struct vfio_group_head vfio_group_list =
-    QLIST_HEAD_INITIALIZER(vfio_address_spaces);
+    QLIST_HEAD_INITIALIZER(vfio_group_list);
   struct vfio_as_head vfio_address_spaces =
       QLIST_HEAD_INITIALIZER(vfio_address_spaces);
 

.