From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 1/3] net: phy: prevent linking breakage
Date: Tue, 04 Jun 2013 19:17:59 +0200 [thread overview]
Message-ID: <10306449.AbS8Q0UukT@wuerfel> (raw)
In-Reply-To: <CAGVrzcZcVB5+NqLop+ALrX4Jx_SyNatczLt4oNzXr7bjgKMXhg@mail.gmail.com>
On Tuesday 04 June 2013 17:09:26 Florian Fainelli wrote:
> You would just need to define a stub for your arch_foo_phy_fixup()
> which has a different definition depending on whether CONFIG_PHYLIB is
> defined or not.
Yes, same thing. For a function that is called in only one place,
I would always prefer if(IS_ENABLED()) over a stub though.
> This would be just one function, instead of the whole bunch of stubs
> needed for phylib. Right now its probably 1 vs 3, so it does not make
> that much of a difference but who knows, if we had more phylib stubs
> and forget to update the stubs? (which tends to happen pretty often).
>
> The size savings are exactly the same in both approaches anyway.
So should we just stick to the current method then and use
if (IS_ENABLED(CONFIG_NET)) for calling the function?
Arnd
next prev parent reply other threads:[~2013-06-04 17:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 11:43 [PATCHv2 0/3] net: phy: prevent linking breakage Alexandre Belloni
2013-05-28 11:43 ` [PATCHv2 1/3] " Alexandre Belloni
2013-05-28 20:09 ` David Miller
2013-05-29 8:21 ` Alexandre Belloni
2013-05-30 9:42 ` David Miller
2013-06-04 15:07 ` Arnd Bergmann
2013-06-04 15:36 ` Florian Fainelli
2013-06-04 16:01 ` Arnd Bergmann
2013-06-04 16:09 ` Florian Fainelli
2013-06-04 17:17 ` Arnd Bergmann [this message]
2013-06-05 9:23 ` Alexandre Belloni
2013-06-05 11:21 ` Arnd Bergmann
2013-05-28 11:43 ` [PATCHv2 2/3] arm: mxs: don't check for CONFIG_PHYLIB as builtin Alexandre Belloni
2013-05-28 11:43 ` [PATCHv2 3/3] arm: imx: " Alexandre Belloni
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=10306449.AbS8Q0UukT@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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