Skip to contentSkip to conversation

vfio/fsl-mc: Remove unused variable 'hwirq'

PATCH Applied Yue Haibing 2 participants 2 messages Jul 30, 2024 – Sep 3, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio/fsl-mc: Remove unused variable 'hwirq'

Commit 7447d911af69 ("vfio/fsl-mc: Block calling interrupt handler without trigger") left this variable unused, so remove it.

---
 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c +1 -3
index 82b2afa9b7e3..7e7988c4258f 100644
@@ -108,10 +108,10 @@ static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
 				       void *data)
 {
 	struct fsl_mc_device *mc_dev = vdev->mc_dev;
-	int ret, hwirq;
 	struct vfio_fsl_mc_irq *irq;
 	struct device *cont_dev = fsl_mc_cont_dev(&mc_dev->dev);
 	struct fsl_mc_device *mc_cont = to_fsl_mc_device(cont_dev);
+	int ret;
 
 	if (!count && (flags & VFIO_IRQ_SET_DATA_NONE))
 		return vfio_set_trigger(vdev, index, -1);
@@ -136,8 +136,6 @@ static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
 		return vfio_set_trigger(vdev, index, fd);
 	}
 
-	hwirq = vdev->mc_dev->irqs[index]->virq;
-
 	irq = &vdev->mc_irqs[index];
 
 	if (flags & VFIO_IRQ_SET_DATA_NONE) {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 25 lines · On Tue, 30 Jul 2024 22:11:33 +0800 Yue Haibing <[email protected]> wrote:

Commit 7447d911af69 ("vfio/fsl-mc: Block calling interrupt handler without trigger") left this variable unused, so remove it.

---
 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c +1 -1
index 82b2afa9b7e3..7e7988c4258f 100644
@@ -108,10 +108,10 @@ static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
 				       void *data)
 {
 	struct fsl_mc_device *mc_dev = vdev->mc_dev;
-	int ret, hwirq;
 	struct vfio_fsl_mc_irq *irq;
 	struct device *cont_dev = fsl_mc_cont_dev(&mc_dev->dev);
 	struct fsl_mc_device *mc_cont = to_fsl_mc_device(cont_dev);
+	int ret;
 
 	if (!count && (flags & VFIO_IRQ_SET_DATA_NONE))
 		return vfio_set_trigger(vdev, index, -1);

drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev, · line 141

Quoted 8 lines
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c +0 -2
@@ -136,8 +136,6 @@ static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
 		return vfio_set_trigger(vdev, index, fd);
 	}
 
-	hwirq = vdev->mc_dev->irqs[index]->virq;
-
 	irq = &vdev->mc_irqs[index];
 
 	if (flags & VFIO_IRQ_SET_DATA_NONE) {

Applied to vfio next branch for v6.12. Thanks!

Alex