[PATCH] xen/events: remove redundant initialization of variable irq

Colin King posted 1 patch 2 years, 9 months ago
Failed in applying to current master (apply log)
drivers/xen/events/events_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] xen/events: remove redundant initialization of variable irq
Posted by Colin King 2 years, 9 months ago
From: Colin Ian King <colin.king@canonical.com>

The variable irq is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/xen/events/events_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index d7e361fb0548..154daddbdcb4 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -1009,7 +1009,7 @@ static void __unbind_from_irq(unsigned int irq)
 int xen_bind_pirq_gsi_to_irq(unsigned gsi,
 			     unsigned pirq, int shareable, char *name)
 {
-	int irq = -1;
+	int irq;
 	struct physdev_irq irq_op;
 	int ret;
 
-- 
2.31.1


Re: [PATCH] xen/events: remove redundant initialization of variable irq
Posted by Juergen Gross 2 years, 9 months ago
On 21.07.21 13:40, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable irq is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Re: [PATCH] xen/events: remove redundant initialization of variable irq
Posted by Boris Ostrovsky 2 years, 9 months ago
On 7/21/21 11:36 AM, Juergen Gross wrote:
> On 21.07.21 13:40, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The variable irq is being initialized with a value that is never
>> read, it is being updated later on. The assignment is redundant and
>> can be removed.
>>
>> Addresses-Coverity: ("Unused value")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>
> Reviewed-by: Juergen Gross <jgross@suse.com>



Applied to for-linus-5.14


-boris