Skip to contentSkip to conversation

Remove useless assignment

PATCH Superseded Frediano Ziglio 4 participants 5 messages Feb 5, 2024 – Feb 6, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 Remove useless assignment

The variable is assigned later, that value is never used.

---
 xen/common/event_channel.c | 2 --
 1 file changed, 2 deletions(-)
xen/common/event_channel.c +0 -2
index a7a004a084..15aec5dcbb 100644
@@ -324,8 +324,6 @@ int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port)
         goto out;
     }
 
-    rc = 0;
-
     chn = evtchn_from_port(d, port);
 
     rc = xsm_evtchn_unbound(XSM_TARGET, d, chn, alloc->remote_dom);
Signature · 1 line
2.34.1
Reviewed-by on v1 2/5
#1 lore raw
Quoted 3 lines · Frediano Ziglio

The variable is assigned later, that value is never used.

Quoted 20 lines
---
 xen/common/event_channel.c | 2 --
 1 file changed, 2 deletions(-)
xen/common/event_channel.c +0 -2
index a7a004a084..15aec5dcbb 100644
@@ -324,8 +324,6 @@ int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port)
         goto out;
     }
 
-    rc = 0;
-
     chn = evtchn_from_port(d, port);
 
     rc = xsm_evtchn_unbound(XSM_TARGET, d, chn, alloc->remote_dom);
Signature · 1 line
2.34.1
#2 lore raw

Hi,

The tag says '2/5' but I don't see a thread. Is the series meant to contain more patches?

Also, the title is not very specific about where the assignment is removed. I have committed with the following title:

xen/evtchn: Remove useful assignment in evtchn_alloc_unbound

Quoted 2 lines · Stefano Stabellini
Quoted 1 line · Frediano Ziglio

The variable is assigned later, that value is never used.

I also add 'rc' just for clarity.

Quoted 17 lines
Quoted 2 lines
Quoted 12 lines
---
  xen/common/event_channel.c | 2 --
  1 file changed, 2 deletions(-)
xen/common/event_channel.c +0 -0
index a7a004a084..15aec5dcbb 100644
@@ -324,8 +324,6 @@ int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port)
          goto out;
      }
 
Quoted 2 lines

xen/common/event_channel.c int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port) · line 328

Quoted 2 lines
xen/common/event_channel.c +0 -2
-    rc = 0;
-

This looks like a missing clean-up from e5ba5165cae6 ("xen/evtchn: Purge ERROR_EXIT{,_DOM}()").

Cheers,

Signature · 1 line
Julien Grall
#3 lore raw
Quoted 7 lines · Julien Grall

The tag says '2/5' but I don't see a thread. Is the series meant to contain more patches?

Also, the title is not very specific about where the assignment is removed. I have committed with the following title:

xen/evtchn: Remove useful assignment in evtchn_alloc_unbound

Luckily in what you committed it is actually "useless" ;-)

Jan

#4 lore raw
Quoted 10 lines · Jan Beulich
Quoted 7 lines · Julien Grall

The tag says '2/5' but I don't see a thread. Is the series meant to contain more patches?

Also, the title is not very specific about where the assignment is removed. I have committed with the following title:

xen/evtchn: Remove useful assignment in evtchn_alloc_unbound

Luckily in what you committed it is actually "useless" ;-)

Oh, I'm sorry - I see I got To: and Cc: mixed up in the earlier reply.

Jan