[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180528074756.bgl5fxvn7foe5uhn@kili.mountain>
Date: Mon, 28 May 2018 10:47:56 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Alex Williamson <alex.williamson@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] vfio/pci: remove a bogus cast in vfio_msi_set_block()
This cast is confusing... The "start" variable is an unsigned int. We
absolutely do not want to cast it to a negative int so why is the cast
there? It turns out, when you look at the context, it's a no-op and we
can just remove it.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 1c46045b0e7f..2724fed62129 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -368,7 +368,7 @@ static int vfio_msi_set_block(struct vfio_pci_device *vdev, unsigned start,
}
if (ret) {
- for (--j; j >= (int)start; j--)
+ for (--j; j >= start; j--)
vfio_msi_set_vector_signal(vdev, j, -1, msix);
}
Powered by blists - more mailing lists