diff mbox series

[2/5] Remove useless assignment

Message ID 20240205104637.14868-1-frediano.ziglio@cloud.com (mailing list archive)
State Superseded
Headers show
Series [1/5] Constify some parameters | expand

Commit Message

Frediano Ziglio Feb. 5, 2024, 10:46 a.m. UTC
The variable is assigned later, that value is never used.

Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
---
 xen/common/event_channel.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Stefano Stabellini Feb. 5, 2024, 8:41 p.m. UTC | #1
On Mon, 5 Feb 2024, Frediano Ziglio wrote:
> The variable is assigned later, that value is never used.
> 
> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
>  xen/common/event_channel.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
> index a7a004a084..15aec5dcbb 100644
> --- a/xen/common/event_channel.c
> +++ b/xen/common/event_channel.c
> @@ -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);
> -- 
> 2.34.1
>
Julien Grall Feb. 5, 2024, 9:21 p.m. UTC | #2
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

On 05/02/2024 20:41, Stefano Stabellini wrote:
> On Mon, 5 Feb 2024, Frediano Ziglio wrote:
>> The variable is assigned later, that value is never used.

I also add 'rc' just for clarity.

>>
>> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
> 
>> ---
>>   xen/common/event_channel.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
>> index a7a004a084..15aec5dcbb 100644
>> --- a/xen/common/event_channel.c
>> +++ b/xen/common/event_channel.c
>> @@ -324,8 +324,6 @@ int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc, evtchn_port_t port)
>>           goto out;
>>       }
>>   
>> -    rc = 0;
>> -

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

Cheers,
Jan Beulich Feb. 6, 2024, 9:15 a.m. UTC | #3
On 05.02.2024 22:21, Julien Grall wrote:
> 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
Jan Beulich Feb. 6, 2024, 9:17 a.m. UTC | #4
On 06.02.2024 10:15, Jan Beulich wrote:
> On 05.02.2024 22:21, Julien Grall wrote:
>> 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
diff mbox series

Patch

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index a7a004a084..15aec5dcbb 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -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);