* [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE
@ 2009-09-16 7:44 Florian Fainelli
2009-09-19 10:43 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2009-09-16 7:44 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Ralf Baechle, linux-mips
Hi David,
This is relevant for 2.6.32-rc0, thanks !
--
From: Florian Fainelli <florian@openwrt.org>
Subject: [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE
With the removal of BUS_ID_SIZE, cpmac was not fully
converted to use MII_BUS_ID_SIZE as it ought to. This
patch fixes the following cpmac build failure:
CC drivers/net/cpmac.o
drivers/net/cpmac.c: In function 'cpmac_start_xmit':
drivers/net/cpmac.c:563: warning: comparison of distinct pointer types lacks a cast
drivers/net/cpmac.c: In function 'cpmac_probe':
drivers/net/cpmac.c:1112: error: 'BUS_ID_SIZE' undeclared (first use in this function)
drivers/net/cpmac.c:1112: error: (Each undeclared identifier is reported only once
drivers/net/cpmac.c:1112: error: for each function it appears in.)
Reported-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 3e3fab8..61f9da2 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -1109,7 +1109,7 @@ static int external_switch;
static int __devinit cpmac_probe(struct platform_device *pdev)
{
int rc, phy_id;
- char mdio_bus_id[BUS_ID_SIZE];
+ char mdio_bus_id[MII_BUS_ID_SIZE];
struct resource *mem;
struct cpmac_priv *priv;
struct net_device *dev;
@@ -1118,7 +1118,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
pdata = pdev->dev.platform_data;
if (external_switch || dumb_switch) {
- strncpy(mdio_bus_id, "0", BUS_ID_SIZE); /* fixed phys bus */
+ strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
phy_id = pdev->id;
} else {
for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
@@ -1126,7 +1126,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
continue;
if (!cpmac_mii->phy_map[phy_id])
continue;
- strncpy(mdio_bus_id, cpmac_mii->id, BUS_ID_SIZE);
+ strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
break;
}
}
@@ -1167,7 +1167,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
priv->msg_enable = netif_msg_init(debug_level, 0xff);
memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
- snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
+ snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE
2009-09-16 7:44 [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE Florian Fainelli
@ 2009-09-19 10:43 ` Florian Fainelli
2009-09-22 5:38 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2009-09-19 10:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Ralf Baechle, linux-mips
David,
Ping ? This fixes a build failure. Thank you very much !
Le mercredi 16 septembre 2009 09:44:22, Florian Fainelli a écrit :
> Hi David,
>
> This is relevant for 2.6.32-rc0, thanks !
> --
> From: Florian Fainelli <florian@openwrt.org>
> Subject: [PATCH] cpmac: fix compilation errors against undeclared
> BUS_ID_SIZE
>
> With the removal of BUS_ID_SIZE, cpmac was not fully
> converted to use MII_BUS_ID_SIZE as it ought to. This
> patch fixes the following cpmac build failure:
> CC drivers/net/cpmac.o
> drivers/net/cpmac.c: In function 'cpmac_start_xmit':
> drivers/net/cpmac.c:563: warning: comparison of distinct pointer types
> lacks a cast drivers/net/cpmac.c: In function 'cpmac_probe':
> drivers/net/cpmac.c:1112: error: 'BUS_ID_SIZE' undeclared (first use in
> this function) drivers/net/cpmac.c:1112: error: (Each undeclared identifier
> is reported only once drivers/net/cpmac.c:1112: error: for each function it
> appears in.)
>
> Reported-by: Ralf Baechle <ralf@linux-mips.org>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
> index 3e3fab8..61f9da2 100644
> --- a/drivers/net/cpmac.c
> +++ b/drivers/net/cpmac.c
> @@ -1109,7 +1109,7 @@ static int external_switch;
> static int __devinit cpmac_probe(struct platform_device *pdev)
> {
> int rc, phy_id;
> - char mdio_bus_id[BUS_ID_SIZE];
> + char mdio_bus_id[MII_BUS_ID_SIZE];
> struct resource *mem;
> struct cpmac_priv *priv;
> struct net_device *dev;
> @@ -1118,7 +1118,7 @@ static int __devinit cpmac_probe(struct
> platform_device *pdev) pdata = pdev->dev.platform_data;
>
> if (external_switch || dumb_switch) {
> - strncpy(mdio_bus_id, "0", BUS_ID_SIZE); /* fixed phys bus */
> + strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
> phy_id = pdev->id;
> } else {
> for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
> @@ -1126,7 +1126,7 @@ static int __devinit cpmac_probe(struct
> platform_device *pdev) continue;
> if (!cpmac_mii->phy_map[phy_id])
> continue;
> - strncpy(mdio_bus_id, cpmac_mii->id, BUS_ID_SIZE);
> + strncpy(mdio_bus_id, cpmac_mii->id, MII_BUS_ID_SIZE);
> break;
> }
> }
> @@ -1167,7 +1167,7 @@ static int __devinit cpmac_probe(struct
> platform_device *pdev) priv->msg_enable = netif_msg_init(debug_level,
> 0xff);
> memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
>
> - snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
> + snprintf(priv->phy_name, MII_BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id,
> phy_id);
>
> priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
> PHY_INTERFACE_MODE_MII);
--
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE
2009-09-19 10:43 ` Florian Fainelli
@ 2009-09-22 5:38 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-09-22 5:38 UTC (permalink / raw)
To: florian; +Cc: netdev, ralf, linux-mips
From: Florian Fainelli <florian@openwrt.org>
Date: Sat, 19 Sep 2009 12:43:08 +0200
> David,
>
> Ping ? This fixes a build failure. Thank you very much !
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-22 5:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 7:44 [PATCH] cpmac: fix compilation errors against undeclared BUS_ID_SIZE Florian Fainelli
2009-09-19 10:43 ` Florian Fainelli
2009-09-22 5:38 ` David Miller
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).