Skip to content

Commit 3f90bfd

Browse files
arndbgregkh
authored andcommitted
vfio: unhide vdev->debug_root
[ Upstream commit 555aa17 ] When debugfs is disabled, the hisilicon driver now fails to build: drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'hisi_acc_vfio_debug_init': drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:1671:62: error: 'struct vfio_device' has no member named 'debug_root' 1671 | vfio_dev_migration = debugfs_lookup("migration", vdev->debug_root); | ^~ The driver otherwise relies on dead-code elimination, but this reference fails. The single struct member is not going to make much of a difference for memory consumption, so just keep this visible unconditionally. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: b398f91 ("hisi_acc_vfio_pci: register debugfs for hisilicon migration driver") Link: https://lore.kernel.org/r/20260327165521.3779707-1-arnd@kernel.org Signed-off-by: Alex Williamson <alex@shazbot.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent fdd424d commit 3f90bfd

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

include/linux/vfio.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,11 @@ struct vfio_device {
7171
u8 iommufd_attached:1;
7272
#endif
7373
u8 cdev_opened:1;
74-
#ifdef CONFIG_DEBUG_FS
7574
/*
7675
* debug_root is a static property of the vfio_device
7776
* which must be set prior to registering the vfio_device.
7877
*/
7978
struct dentry *debug_root;
80-
#endif
8179
};
8280

8381
/**

0 commit comments

Comments
 (0)