Skip to content

Commit 7bc21c5

Browse files
committed
Merge tag 'vfio-v6.12-rc1' of https://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson: "Just a few cleanups this cycle: - Remove several unused structure and function declarations, and unused variables (Dr. David Alan Gilbert, Yue Haibing, Zhang Zekun) - Constify unmodified structure in mdev (Hongbo Li) - Convert to unsigned type to catch overflow with less fanfare than passing a negative value to kcalloc() (Dan Carpenter)" * tag 'vfio-v6.12-rc1' of https://github.com/awilliam/linux-vfio: vfio/pci: clean up a type in vfio_pci_ioctl_pci_hot_reset_groups() vfio/mdev: Constify struct kobj_type vfio: mdev: Remove unused function declarations vfio/fsl-mc: Remove unused variable 'hwirq' vfio/pci: Remove unused struct 'vfio_pci_mmap_vma'
2 parents 4491b85 + aab439f commit 7bc21c5

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ static int vfio_fsl_mc_set_irq_trigger(struct vfio_fsl_mc_device *vdev,
108108
void *data)
109109
{
110110
struct fsl_mc_device *mc_dev = vdev->mc_dev;
111-
int ret, hwirq;
112111
struct vfio_fsl_mc_irq *irq;
113112
struct device *cont_dev = fsl_mc_cont_dev(&mc_dev->dev);
114113
struct fsl_mc_device *mc_cont = to_fsl_mc_device(cont_dev);
114+
int ret;
115115

116116
if (!count && (flags & VFIO_IRQ_SET_DATA_NONE))
117117
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,
136136
return vfio_set_trigger(vdev, index, fd);
137137
}
138138

139-
hwirq = vdev->mc_dev->irqs[index]->virq;
140-
141139
irq = &vdev->mc_irqs[index];
142140

143141
if (flags & VFIO_IRQ_SET_DATA_NONE) {

drivers/vfio/mdev/mdev_private.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#ifndef MDEV_PRIVATE_H
1111
#define MDEV_PRIVATE_H
1212

13-
int mdev_bus_register(void);
14-
void mdev_bus_unregister(void);
15-
1613
extern const struct bus_type mdev_bus_type;
1714
extern const struct attribute_group *mdev_device_groups[];
1815

drivers/vfio/mdev/mdev_sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static void mdev_type_release(struct kobject *kobj)
160160
put_device(type->parent->dev);
161161
}
162162

163-
static struct kobj_type mdev_type_ktype = {
163+
static const struct kobj_type mdev_type_ktype = {
164164
.sysfs_ops = &mdev_type_sysfs_ops,
165165
.release = mdev_type_release,
166166
.default_groups = mdev_type_groups,

drivers/vfio/pci/vfio_pci_core.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ struct vfio_pci_vf_token {
5858
int users;
5959
};
6060

61-
struct vfio_pci_mmap_vma {
62-
struct vm_area_struct *vma;
63-
struct list_head vma_next;
64-
};
65-
6661
static inline bool vfio_vga_disabled(void)
6762
{
6863
#ifdef CONFIG_VFIO_PCI_VGA
@@ -1329,7 +1324,7 @@ static int vfio_pci_ioctl_get_pci_hot_reset_info(
13291324

13301325
static int
13311326
vfio_pci_ioctl_pci_hot_reset_groups(struct vfio_pci_core_device *vdev,
1332-
int array_count, bool slot,
1327+
u32 array_count, bool slot,
13331328
struct vfio_pci_hot_reset __user *arg)
13341329
{
13351330
int32_t *group_fds;

0 commit comments

Comments
 (0)