linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: at91: Fix link breakage when !CONFIG_PHYLIB
Date: Tue, 04 Jun 2013 17:12:10 +0200	[thread overview]
Message-ID: <1900947.vroxSJEyuA@wuerfel> (raw)
In-Reply-To: <51ADF5C8.80007@free-electrons.com>

On Tuesday 04 June 2013 16:12:24 Alexandre Belloni wrote:
> On 04/06/2013 15:49, Nicolas Ferre wrote:
> >
> > ... simply use this "IS_BUILTIN(CONFIG_PHYLIB)" here -----^^^^^^^^^
> > (and not above as suggested by Arnd).
> >
> > Jean-Christophe, Alexandre: do you agree with this conclusion?
> >
> > I plan to stack this patch for next at91-fixes batch.
> >
> 
> Yeah, I prepared and tested that last week but didn't send it yet. I can
> do it now if you want but you could probably just edit my patch. I'd
> like to fix the other platforms too but that probably can wait.
> 
> I believe we would still have to fix the phy_register_fixup*() works as
> it is always called from arch/ and is clearly not fool proofed enough.
> Maybe DT could help ?
> 
> Arnd, do you have any input ?

I've replied to the earlier thread now. Using if(IS_ENABLED(CONFIG_NET))
or if(IS_ENABLED(CONFIG_PHYLIB)) in platform code should be just fine and
is not a lof of extra effort.

As I explained in the other mail, I think IS_ENABLED() is better than
IS_BUILTIN() because the case where the network driver is a loadable
module would cause a silent run-time error with IS_BUILTIN, but a
link time error with IS_ENABLED, and we can prevent that error by
correctly expressing the dependency in Kconfig, e.g.

config THIS_BOARD
	select PHYLIB if THIS_BOARDS_NIC

	Arnd

  reply	other threads:[~2013-06-04 15:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 10:48 [PATCH v3] ARM: at91: Fix link breakage when !CONFIG_PHYLIB Alexandre Belloni
2013-05-27 11:26 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-27 12:50   ` Alexandre Belloni
2013-05-27 12:59     ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-27 16:04       ` Alexandre Belloni
2013-05-27 12:05 ` Nicolas Ferre
2013-05-27 12:42   ` Arnd Bergmann
2013-06-04 13:49     ` Nicolas Ferre
2013-06-04 14:12       ` Alexandre Belloni
2013-06-04 15:12         ` Arnd Bergmann [this message]
2013-05-27 12:43   ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-27 12:46   ` 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=1900947.vroxSJEyuA@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;
as well as URLs for NNTP newsgroup(s).