All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it.
@ 2012-05-15 20:46 David Daney
  2012-05-15 21:32 ` Paul Gortmaker
  0 siblings, 1 reply; 3+ messages in thread
From: David Daney @ 2012-05-15 20:46 UTC (permalink / raw)
  To: David S. Miller, netdev; +Cc: linux-kernel, Paul Gortmaker, David Daney

From: David Daney <david.daney@cavium.com>

This function is only referenced from within phy_device.c, so there is
no reason to export it.  In fact, we can make it static.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 drivers/net/phy/phy_device.c |    3 +--
 include/linux/phy.h          |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e8c42d6..de86a55 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -207,7 +207,7 @@ static struct phy_device* phy_device_create(struct mii_bus *bus,
  * Description: Reads the ID registers of the PHY at @addr on the
  *   @bus, stores it in @phy_id and returns zero on success.
  */
-int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
+static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
 {
 	int phy_reg;
 
@@ -230,7 +230,6 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
 
 	return 0;
 }
-EXPORT_SYMBOL(get_phy_id);
 
 /**
  * get_phy_device - reads the specified PHY device and returns its @phy_device struct
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 6fe0a37..9039009 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -477,7 +477,6 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val)
 	return mdiobus_write(phydev->bus, phydev->addr, regnum, val);
 }
 
-int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id);
 struct phy_device* get_phy_device(struct mii_bus *bus, int addr);
 int phy_device_register(struct phy_device *phy);
 int phy_init_hw(struct phy_device *phydev);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it.
  2012-05-15 20:46 [PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it David Daney
@ 2012-05-15 21:32 ` Paul Gortmaker
  2012-05-16  4:59   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Gortmaker @ 2012-05-15 21:32 UTC (permalink / raw)
  To: David Daney; +Cc: David S. Miller, netdev, linux-kernel, David Daney

[[PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it.] On 15/05/2012 (Tue 13:46) David Daney wrote:

> From: David Daney <david.daney@cavium.com>
> 
> This function is only referenced from within phy_device.c, so there is
> no reason to export it.  In fact, we can make it static.

I did a bit of data mining to remind myself why it was exported.  Back
in a01b3d766c (v2.6.26) gianfar_mii was using it.  That then got merged
into fsl_pq_mdio.c and gianfar_mii was deleted.  Then finally in commit
28d8ea2d568 (v3.2) the one instance of code that was using it got
removed.  So, I think this should be OK (but for net-next, though).

Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Paul.
--

> 
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
>  drivers/net/phy/phy_device.c |    3 +--
>  include/linux/phy.h          |    1 -
>  2 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index e8c42d6..de86a55 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -207,7 +207,7 @@ static struct phy_device* phy_device_create(struct mii_bus *bus,
>   * Description: Reads the ID registers of the PHY at @addr on the
>   *   @bus, stores it in @phy_id and returns zero on success.
>   */
> -int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
> +static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
>  {
>  	int phy_reg;
>  
> @@ -230,7 +230,6 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL(get_phy_id);
>  
>  /**
>   * get_phy_device - reads the specified PHY device and returns its @phy_device struct
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 6fe0a37..9039009 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -477,7 +477,6 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val)
>  	return mdiobus_write(phydev->bus, phydev->addr, regnum, val);
>  }
>  
> -int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id);
>  struct phy_device* get_phy_device(struct mii_bus *bus, int addr);
>  int phy_device_register(struct phy_device *phy);
>  int phy_init_hw(struct phy_device *phydev);
> -- 
> 1.7.2.3
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it.
  2012-05-15 21:32 ` Paul Gortmaker
@ 2012-05-16  4:59   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-05-16  4:59 UTC (permalink / raw)
  To: paul.gortmaker; +Cc: ddaney.cavm, netdev, linux-kernel, david.daney

From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Tue, 15 May 2012 17:32:08 -0400

> [[PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it.] On 15/05/2012 (Tue 13:46) David Daney wrote:
> 
>> From: David Daney <david.daney@cavium.com>
>> 
>> This function is only referenced from within phy_device.c, so there is
>> no reason to export it.  In fact, we can make it static.
> 
> I did a bit of data mining to remind myself why it was exported.  Back
> in a01b3d766c (v2.6.26) gianfar_mii was using it.  That then got merged
> into fsl_pq_mdio.c and gianfar_mii was deleted.  Then finally in commit
> 28d8ea2d568 (v3.2) the one instance of code that was using it got
> removed.  So, I think this should be OK (but for net-next, though).
> 
> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-16  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 20:46 [PATCH] netdev/phy: Make get_phy_id() static and quit EXPORTing it David Daney
2012-05-15 21:32 ` Paul Gortmaker
2012-05-16  4:59   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.