Re: [PATCH] pds_core: fix linking without CONFIG_DEBUG_FS

From: Simon Horman
Date: Mon May 01 2023 - 11:41:58 EST


On Mon, May 01, 2023 at 05:06:14PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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@xxxxxxxx>

Thanks Arnd,

this looks good to me.

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>


While exercising this I noticed that building pds_core fails
if either CONFIG_AUXILIARY_BUS or NET_DEVLINK are not enabled.

I think the solution is for PFS_CORE to select both CONFIG_AUXILIARY_BUS
and NET_DEVLINK.

I am wondering if this is on anyone's radar.
If not I'll send a patch.