lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <20230501150624.3552344-1-arnd@kernel.org> Date: Mon, 1 May 2023 17:06:14 +0200 From: Arnd Bergmann <arnd@...nel.org> To: Shannon Nelson <shannon.nelson@....com>, Brett Creeley <brett.creeley@....com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com> Cc: Arnd Bergmann <arnd@...db.de>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH] pds_core: fix linking without CONFIG_DEBUG_FS From: Arnd Bergmann <arnd@...db.de> The debugfs.o file is only built when the fs is enabled: main.c:(.text+0x47c): undefined reference to `pdsc_debugfs_del_dev' main.c:(.text+0x8dc): undefined reference to `pdsc_debugfs_add_dev' main.c:(.exit.text+0x14): undefined reference to `pdsc_debugfs_destroy' main.c:(.init.text+0x8): undefined reference to `pdsc_debugfs_create' dev.c:(.text+0x988): undefined reference to `pdsc_debugfs_add_ident' core.c:(.text+0x6b0): undefined reference to `pdsc_debugfs_del_qcq' core.c:(.text+0x998): undefined reference to `pdsc_debugfs_add_qcq' core.c:(.text+0xf0c): undefined reference to `pdsc_debugfs_add_viftype' Add dummy helper functions for these interfaces. Fixes: 55435ea7729a ("pds_core: initial framework for pds_core PF driver") Signed-off-by: Arnd Bergmann <arnd@...db.de> --- drivers/net/ethernet/amd/pds_core/core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/amd/pds_core/core.h b/drivers/net/ethernet/amd/pds_core/core.h index e545fafc4819..2cc430403e9c 100644 --- a/drivers/net/ethernet/amd/pds_core/core.h +++ b/drivers/net/ethernet/amd/pds_core/core.h @@ -261,6 +261,7 @@ int pdsc_dl_enable_validate(struct devlink *dl, u32 id, void __iomem *pdsc_map_dbpage(struct pdsc *pdsc, int page_num); +#ifdef CONFIG_DEBUG_FS void pdsc_debugfs_create(void); void pdsc_debugfs_destroy(void); void pdsc_debugfs_add_dev(struct pdsc *pdsc); @@ -270,6 +271,17 @@ void pdsc_debugfs_add_viftype(struct pdsc *pdsc); void pdsc_debugfs_add_irqs(struct pdsc *pdsc); void pdsc_debugfs_add_qcq(struct pdsc *pdsc, struct pdsc_qcq *qcq); void pdsc_debugfs_del_qcq(struct pdsc_qcq *qcq); +#else +static inline void pdsc_debugfs_create(void) {} +static inline void pdsc_debugfs_destroy(void) {} +static inline void pdsc_debugfs_add_dev(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_del_dev(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_ident(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_viftype(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_irqs(struct pdsc *pdsc) {} +static inline void pdsc_debugfs_add_qcq(struct pdsc *pdsc, struct pdsc_qcq *qcq) {} +static inline void pdsc_debugfs_del_qcq(struct pdsc_qcq *qcq) {} +#endif int pdsc_err_to_errno(enum pds_core_status_code code); bool pdsc_is_fw_running(struct pdsc *pdsc); -- 2.39.2
Powered by blists - more mailing lists