Skip to contentSkip to conversation

hw: set_netdev: remove useless code

PATCH Applied Li Qiang 6 participants 10 messages Nov 9, 2018 – Nov 12, 2018

lore
Share & tools
lore

Li Qiang

author
#0 lore raw

PATCH 1/1 hw: set_netdev: remove useless code

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -4
index 8b22fb5..b45a7ef 100644
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
#2 lore raw
Quoted 23 lines · Laurent Vivier
Quoted 22 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -4
index 8b22fb5..b45a7ef 100644
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
Quoted 5 lines

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 3 lines
hw/core/qdev-properties-system.c +0 -0
         if (peers[i]->peer) {
             err = -EEXIST;

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

Thomas

#3 lore raw
Quoted 24 lines · Thomas Huth
Quoted 23 lines · Laurent Vivier
Quoted 22 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -4
index 8b22fb5..b45a7ef 100644
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
Quoted 8 lines
Quoted 5 lines

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 3 lines
hw/core/qdev-properties-system.c +0 -0
         if (peers[i]->peer) {
             err = -EEXIST;

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

It seems trivial enough to go via qemu-trivial, but it would be good to have a R-b from someone else than me to confirm.

Thanks,
Laurent

Reviewed-by
#4 lore raw
Quoted 31 lines · Laurent Vivier
Quoted 30 lines · Thomas Huth
Quoted 28 lines · Laurent Vivier
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
Quoted 5 lines
Quoted 2 lines

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

It seems trivial enough to go via qemu-trivial, but it would be good to have a R-b from someone else than me to confirm.

I would have expected Jason to pick it up, after all it's networking, but it's okay if you want to take it too.

Thanks,

Paolo

#5 lore raw
Quoted 32 lines · Paolo Bonzini
Quoted 31 lines · Laurent Vivier
Quoted 30 lines · Thomas Huth
Quoted 28 lines · Laurent Vivier
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

It seems trivial enough to go via qemu-trivial, but it would be good to have a R-b from someone else than me to confirm.

I would have expected Jason to pick it up, after all it's networking, but it's okay if you want to take it too.

If Jason pushes it before I do, I will remove it from my queue. [I have the bad habit to rebase by branch before a pull request]

Thanks,
Laurent

#6 lore raw
In reply to Paolo Bonzini
Quoted 32 lines · Paolo Bonzini
Quoted 31 lines · Laurent Vivier
Quoted 30 lines · Thomas Huth
Quoted 28 lines · Laurent Vivier
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

It seems trivial enough to go via qemu-trivial, but it would be good to have a R-b from someone else than me to confirm.

I would have expected Jason to pick it up, after all it's networking, but it's okay if you want to take it too.

If Jason pushes it before I do, I will remove it from my queue. [I have the bad habit to rebase by branch before a pull request]

Thanks,
Laurent

#7 lore raw

[Qemu-devel] qdev has no maintainer (was: [PATCH] hw: set_netdev: remove useless code)

In reply to Thomas Huth
Quoted 24 lines · Thomas Huth
Quoted 23 lines · Laurent Vivier
Quoted 22 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -4
index 8b22fb5..b45a7ef 100644
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
Quoted 8 lines
Quoted 5 lines

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 3 lines
hw/core/qdev-properties-system.c +0 -0
         if (peers[i]->peer) {
             err = -EEXIST;

So who can pick up such patches? We don't have a maintainer for the QDEV subsystem anymore... should it go via qemu-trivial?

We've never had a formal qdev maintainer.

"qdev is too important to continue much longer without a maintainer."
Message-ID: <[email protected]>
https://lists.gnu.org/archive/html/qemu-devel/2011-06/msg01053.html

The closest we got to appointing one was probably here:
Message-ID: <[email protected]>
https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg00949.html

In my opinion, not having a maintainer push or at least direct the cart is one of the reasons of the relatively sad state of qdev.

Same for QOM, where we had an active maintainer for a while, but no more.

Reviewed-by on v1 1/1
#8 lore raw
In reply to Li Qiang
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;
#9 lore raw
In reply to Li Qiang
Quoted 15 lines · Li Qiang

In set_netdev(), the peers[i] is initialized
qemu_find_net_clients_except() when i is in
0 between 'queues' it can't be NULL.

---
 hw/core/qdev-properties-system.c | 4 ----
 1 file changed, 4 deletions(-)
hw/core/qdev-properties-system.c +0 -0
index 8b22fb5..b45a7ef 100644

hw/core/qdev-properties-system.c static void set_netdev(Object *obj, Visitor *v, const char *name, · line 293

Quoted 10 lines
hw/core/qdev-properties-system.c +0 -4
@@ -288,10 +288,6 @@ static void set_netdev(Object *obj, Visitor *v, const char *name,
     }
 
     for (i = 0; i < queues; i++) {
-        if (peers[i] == NULL) {
-            err = -ENOENT;
-            goto out;
-        }
 
         if (peers[i]->peer) {
             err = -EEXIST;

Applied to my trivial-patches branch.

Thanks,
Laurent