From: Nicolai Buchwitz <nb@tipi-net.de>
To: Zhixing Chen <running910@gmail.com>
Cc: "Théo Lebrun" <theo.lebrun@bootlin.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: macb: fix CONFIG_OF=n build
Date: Wed, 19 Aug 2026 09:10:40 +0200 [thread overview]
Message-ID: <e84bc7b95374bbe76234bd56e819ba5b@tipi-net.de> (raw)
In-Reply-To: <20260819040913.109367-1-running910@gmail.com>
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 <running910@gmail.com>
> ---
>
> 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/
Thanks,
Nicolai
next prev parent reply other threads:[~2026-08-19 7:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 4:09 [PATCH net-next] net: macb: fix CONFIG_OF=n build Zhixing Chen
2026-08-19 7:10 ` Nicolai Buchwitz [this message]
2026-08-19 7:44 ` Zhixing Chen
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=e84bc7b95374bbe76234bd56e819ba5b@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew+netdev@lunn.ch \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=running910@gmail.com \
--cc=theo.lebrun@bootlin.com \
/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