From: Arnd Bergmann <arnd@kernel.org>
To: Alex Williamson <alex@shazbot.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Kevin Tian <kevin.tian@intel.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] vfio: unhide vdev->debug_root
Date: Fri, 27 Mar 2026 17:55:08 +0100 [thread overview]
Message-ID: <20260327165521.3779707-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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>
----
This seems to be a new build failure, but I could not pinpoint which
commit caused it, as both the #ifdef and the the use were introduced
a while ago.
---
include/linux/vfio.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 50b474334a19..31b826efba00 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -74,13 +74,11 @@ struct vfio_device {
u8 iommufd_attached:1;
#endif
u8 cdev_opened:1;
-#ifdef CONFIG_DEBUG_FS
/*
* debug_root is a static property of the vfio_device
* which must be set prior to registering the vfio_device.
*/
struct dentry *debug_root;
-#endif
};
/**
--
2.39.5
next reply other threads:[~2026-03-27 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 16:55 Arnd Bergmann [this message]
2026-03-30 22:54 ` [PATCH] vfio: unhide vdev->debug_root Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260327165521.3779707-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=alex@shazbot.org \
--cc=arnd@arndb.de \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox