public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ARM: at91: Fix link breakage when !CONFIG_PHYLIB
Date: Mon, 27 May 2013 12:37:15 +0200	[thread overview]
Message-ID: <51A3375B.3090205@free-electrons.com> (raw)
In-Reply-To: <20130527080909.GB2919@ludovic.desroches@atmel.com>

On 27/05/2013 10:09, Ludovic Desroches wrote:
> On Sat, May 25, 2013 at 10:05:57PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 09:39 Sat 25 May     , Alexandre Belloni wrote:
>>> Fixes:
>>> arch/arm/mach-at91/built-in.o: In function `ksz9021rn_phy_fixup':
>>> :(.text+0x1174): undefined reference to `mdiobus_write'
>>> :(.text+0x1188): undefined reference to `mdiobus_write'
>>> :(.text+0x119c): undefined reference to `mdiobus_write'
>>> :(.text+0x11b0): undefined reference to `mdiobus_write'
>>> arch/arm/mach-at91/built-in.o: In function `sama5_dt_device_init':
>>> :(.init.text+0x1e34): undefined reference to `phy_register_fixup_for_uid'
>>>
>>> when CONFIG_PHYLIB is not selected.
> Signed-off-by missing.
>
> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
>

I'll send a v3...

>>> ---
>>> Changes in v2:
>>> 	use IS_BUILTIN
>>> 	use CONFIG_PHYLIB and not CONFIG_PHY
>>>
>> I do not like this, I prefer we just drop the fixup by adding the dt support
>> to the micrel phy as done for broadcom
>>
> Yes it will be a better solution but we don't have it. Even if we add dt
> support for micrel phy it won't go into 3.10 so it has to be fixed before the
> release.

The fixup is also done like that on i.mx6. I think we'll have to stick
to that for now.

>> if !PHYLIB just add an inline declaration of 
>> phy_register_fixup_for_uid
>>
>> so gcc will drop ksz9021rn_phy_fixup automatically

By using IS_BUILTIN, gcc is already optimizing out the offeding lines,
else you would still get the linking error.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


      parent reply	other threads:[~2013-05-27 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25  7:39 [PATCH v2] ARM: at91: Fix link breakage when !CONFIG_PHYLIB Alexandre Belloni
2013-05-25 20:05 ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]   ` <20130527080909.GB2919@ludovic.desroches@atmel.com>
2013-05-27 10:37     ` Alexandre Belloni [this message]

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=51A3375B.3090205@free-electrons.com \
    --to=alexandre.belloni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.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