Thread (4 messages) flat view 4 messages, 3 authors, 18d ago

Re: [PATCH net-next] net: macb: fix CONFIG_OF=n build

From: Nicolai Buchwitz <hidden>
Date: 2026-08-19 07:10:51

Hi Zhixing

On 19.8.2026 06:09, Zhixing Chen wrote:
macb_alloc_tieoff() and macb_free_tieoff() are called from macb_probe()
and macb_remove(), which are built regardless of CONFIG_OF.

The helpers were added inside the CONFIG_OF block, although the tieoff
descriptor handling does not depend on OF. This breaks CONFIG_OF=n 
builds
with implicit function declaration errors.

Move the helpers outside the CONFIG_OF block.

Fixes: 5262eab9462a ("net: macb: allocate tieoff descriptor once across 
device lifetime")
Signed-off-by: Zhixing Chen <redacted>
---

I hit this while building the latest net-next tree with my local 
config,
where CONFIG_MACB is enabled and CONFIG_OF is disabled.

Since CONFIG_MACB does not depend on CONFIG_OF, macb_main.c still needs
to build in this configuration. However, macb_probe() and macb_remove()
are built while macb_alloc_tieoff() and macb_free_tieoff() are hidden
behind CONFIG_OF.

Build error:

drivers/net/ethernet/cadence/macb_main.c: In function 'macb_probe':
drivers/net/ethernet/cadence/macb_main.c:5951:15: error: implicit 
declaration of function 'macb_alloc_tieoff' 
[-Werror=implicit-function-declaration]
 5951 |         err = macb_alloc_tieoff(bp);
drivers/net/ethernet/cadence/macb_main.c:5973:9: error: implicit 
declaration of function 'macb_free_tieoff' 
[-Werror=implicit-function-declaration]
 5973 |         macb_free_tieoff(bp);
  CC [M]  drivers/gpu/drm/i915/display/intel_qp_tables.o

---
Nathan sent the same patch a few hours earlier [1]. I will follow up 
there.
[...]
[1] 
https://lore.kernel.org/netdev/20260818-macb-fix-no-of-build-v1-1-f2a009616384@kernel.org/ (local)

Thanks,
Nicolai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help