xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/pci: remove redundant assignment to variable irq
@ 2020-04-09 11:41 Colin King
  2020-06-30 22:12 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-04-09 11:41 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Bjorn Helgaas, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, H . Peter Anvin, x86, xen-devel,
	linux-pci
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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

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

diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 91220cc25854..80272eb49230 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -63,7 +63,7 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev)
 static int xen_register_pirq(u32 gsi, int gsi_override, int triggering,
 			     bool set_pirq)
 {
-	int rc, pirq = -1, irq = -1;
+	int rc, pirq = -1, irq;
 	struct physdev_map_pirq map_irq;
 	int shareable = 0;
 	char *name;
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen/pci: remove redundant assignment to variable irq
  2020-04-09 11:41 [PATCH] xen/pci: remove redundant assignment to variable irq Colin King
@ 2020-06-30 22:12 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-06-30 22:12 UTC (permalink / raw)
  To: Colin King
  Cc: Juergen Gross, Konrad Rzeszutek Wilk, linux-pci, x86,
	kernel-janitors, linux-kernel, Ingo Molnar, Borislav Petkov,
	H . Peter Anvin, Bjorn Helgaas, xen-devel, Thomas Gleixner,
	Boris Ostrovsky

[+cc Juergen, Boris]

On Thu, Apr 09, 2020 at 12:41:18PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable irq is being initialized with a value that is never read
> and it is being updated later with a new value.  The initialization is
> redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to pci/virtualization for v5.9, thanks!

I don't see this in linux-next yet, but if anybody else would prefer
to take it, let me know and I'll drop it.  

> ---
>  arch/x86/pci/xen.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
> index 91220cc25854..80272eb49230 100644
> --- a/arch/x86/pci/xen.c
> +++ b/arch/x86/pci/xen.c
> @@ -63,7 +63,7 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev)
>  static int xen_register_pirq(u32 gsi, int gsi_override, int triggering,
>  			     bool set_pirq)
>  {
> -	int rc, pirq = -1, irq = -1;
> +	int rc, pirq = -1, irq;
>  	struct physdev_map_pirq map_irq;
>  	int shareable = 0;
>  	char *name;
> -- 
> 2.25.1
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-30 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 11:41 [PATCH] xen/pci: remove redundant assignment to variable irq Colin King
2020-06-30 22:12 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).