From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: Re: [PATCH] net: of/phy: fix build error when phylib is built as a module Date: Fri, 11 May 2012 16:50:17 -0700 Message-ID: <4FADA5B9.1060303@xenotime.net> References: <20120510.224352.2149006669429730060.davem@davemloft.net> <1336751221-19127-1-git-send-email-bjorn@mork.no> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:40876 "HELO oproxy6-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1759406Ab2EKXuE (ORCPT ); Fri, 11 May 2012 19:50:04 -0400 In-Reply-To: <1336751221-19127-1-git-send-email-bjorn@mork.no> Sender: linux-next-owner@vger.kernel.org List-ID: To: =?UTF-8?B?QmrDuHJuIE1vcms=?= Cc: David Miller , paul.gortmaker@windriver.com, sfr@canb.auug.org.au, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, david.daney@cavium.com On 05/11/2012 08:47 AM, Bj=C3=B8rn Mork wrote: > CONFIG_OF_MDIO is tristate and will be m if PHYLIB is m. Use > IS_ENABLED macro to prevent build error: >=20 > ERROR: "of_mdio_find_bus" [drivers/net/phy/mdio-mux.ko] undefined! >=20 > Reported-by: Randy Dunlap > Cc: David Daney > Signed-off-by: Bj=C3=B8rn Mork Acked-by: Randy Dunlap Thanks. > --- > I wonder if this could be as banal as this? Not even build tested... >=20 > Should be wrapped into commit 25106022 if it works, to ensure > bisectability. >=20 >=20 >=20 > Bj=C3=B8rn >=20 > drivers/net/phy/mdio_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > index 83d5c9f..683ef1c 100644 > --- a/drivers/net/phy/mdio_bus.c > +++ b/drivers/net/phy/mdio_bus.c > @@ -88,7 +88,7 @@ static struct class mdio_bus_class =3D { > .dev_release =3D mdiobus_release, > }; > =20 > -#ifdef CONFIG_OF_MDIO > +#if IS_ENABLED(CONFIG_OF_MDIO) > /* Helper function for of_mdio_find_bus */ > static int of_mdio_bus_match(struct device *dev, void *mdio_bus_np) > { --=20 ~Randy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from oproxy6-pub.bluehost.com (oproxy6.bluehost.com [IPv6:2605:dc00:100:2::a6]) by ozlabs.org (Postfix) with SMTP id 630D7B7007 for ; Sat, 12 May 2012 09:50:05 +1000 (EST) Message-ID: <4FADA5B9.1060303@xenotime.net> Date: Fri, 11 May 2012 16:50:17 -0700 From: Randy Dunlap MIME-Version: 1.0 To: =?UTF-8?B?QmrDuHJuIE1vcms=?= Subject: Re: [PATCH] net: of/phy: fix build error when phylib is built as a module References: <20120510.224352.2149006669429730060.davem@davemloft.net> <1336751221-19127-1-git-send-email-bjorn@mork.no> In-Reply-To: <1336751221-19127-1-git-send-email-bjorn@mork.no> Content-Type: text/plain; charset=UTF-8 Cc: sfr@canb.auug.org.au, david.daney@cavium.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, paul.gortmaker@windriver.com, linux-next@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Miller List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/11/2012 08:47 AM, Bjørn Mork wrote: > CONFIG_OF_MDIO is tristate and will be m if PHYLIB is m. Use > IS_ENABLED macro to prevent build error: > > ERROR: "of_mdio_find_bus" [drivers/net/phy/mdio-mux.ko] undefined! > > Reported-by: Randy Dunlap > Cc: David Daney > Signed-off-by: Bjørn Mork Acked-by: Randy Dunlap Thanks. > --- > I wonder if this could be as banal as this? Not even build tested... > > Should be wrapped into commit 25106022 if it works, to ensure > bisectability. > > > > Bjørn > > drivers/net/phy/mdio_bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > index 83d5c9f..683ef1c 100644 > --- a/drivers/net/phy/mdio_bus.c > +++ b/drivers/net/phy/mdio_bus.c > @@ -88,7 +88,7 @@ static struct class mdio_bus_class = { > .dev_release = mdiobus_release, > }; > > -#ifdef CONFIG_OF_MDIO > +#if IS_ENABLED(CONFIG_OF_MDIO) > /* Helper function for of_mdio_find_bus */ > static int of_mdio_bus_match(struct device *dev, void *mdio_bus_np) > { -- ~Randy