public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* Kernel 2.6.37-git10 build failure: cassini.c
@ 2011-01-14  8:09 Anca Emanuel
  2011-01-14 16:02 ` Anca Emanuel
  2011-01-14 20:41 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Anca Emanuel @ 2011-01-14  8:09 UTC (permalink / raw)
  To: LKML
  Cc: netdev, Grant Likely, David S. Miller, Eric Dumazet, Joe Perches,
	Christoph Egger, Jiri Pirko

drivers/net/cassini.c: In function ‘cas_get_vpd_info’:
drivers/net/cassini.c:3358: error: implicit declaration of function
‘of_get_property’
drivers/net/cassini.c:3358: warning: assignment makes pointer from
integer without a cast
drivers/net/cassini.c: In function ‘cas_init_one’:
drivers/net/cassini.c:5035: error: implicit declaration of function
‘pci_device_to_OF_node’
drivers/net/cassini.c:5035: warning: assignment makes pointer from
integer without a cast
make[3]: *** [drivers/net/cassini.o] Error 1
make[2]: *** [drivers/net] Error 2


The first part can be solved with:

diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 7206ab2..fe3795e 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -94,6 +94,7 @@
 #include <linux/tcp.h>
 #include <linux/mutex.h>
 #include <linux/firmware.h>
+#include <linux/of.h>

 #include <net/checksum.h>

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

* Re: Kernel 2.6.37-git10 build failure: cassini.c
  2011-01-14  8:09 Kernel 2.6.37-git10 build failure: cassini.c Anca Emanuel
@ 2011-01-14 16:02 ` Anca Emanuel
  2011-01-14 20:41 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Anca Emanuel @ 2011-01-14 16:02 UTC (permalink / raw)
  To: LKML
  Cc: netdev, Grant Likely, David S. Miller, Eric Dumazet, Joe Perches,
	Christoph Egger, Jiri Pirko

On Fri, Jan 14, 2011 at 10:09 AM, Anca Emanuel <anca.emanuel@gmail.com> wrote:
> drivers/net/cassini.c: In function ‘cas_get_vpd_info’:
> drivers/net/cassini.c:3358: error: implicit declaration of function
> ‘of_get_property’
> drivers/net/cassini.c:3358: warning: assignment makes pointer from
> integer without a cast
> drivers/net/cassini.c: In function ‘cas_init_one’:
> drivers/net/cassini.c:5035: error: implicit declaration of function
> ‘pci_device_to_OF_node’
> drivers/net/cassini.c:5035: warning: assignment makes pointer from
> integer without a cast
> make[3]: *** [drivers/net/cassini.o] Error 1
> make[2]: *** [drivers/net] Error 2
>
>
> The first part can be solved with:
>
> diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
> index 7206ab2..fe3795e 100644
> --- a/drivers/net/cassini.c
> +++ b/drivers/net/cassini.c
> @@ -94,6 +94,7 @@
>  #include <linux/tcp.h>
>  #include <linux/mutex.h>
>  #include <linux/firmware.h>
> +#include <linux/of.h>
>
>  #include <net/checksum.h>
>

The second part it's a little bit harder, because:
http://lxr.linux.no/linux+v2.6.37/+search=pci_device_to_OF_node
there is no generic function, only microblaze, powerpc and sparc are
there as users.

Still not solved in git11.
I'm testing this from x86, Ubuntu 10.10 standard config.

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

* Re: Kernel 2.6.37-git10 build failure: cassini.c
  2011-01-14  8:09 Kernel 2.6.37-git10 build failure: cassini.c Anca Emanuel
  2011-01-14 16:02 ` Anca Emanuel
@ 2011-01-14 20:41 ` David Miller
  2011-01-14 21:01   ` Grant Likely
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2011-01-14 20:41 UTC (permalink / raw)
  To: anca.emanuel
  Cc: linux-kernel, netdev, grant.likely, eric.dumazet, joe, siccegge,
	jpirko

From: Anca Emanuel <anca.emanuel@gmail.com>
Date: Fri, 14 Jan 2011 10:09:43 +0200

> drivers/net/cassini.c: In function ‘cas_get_vpd_info’:
> drivers/net/cassini.c:3358: error: implicit declaration of function
> ‘of_get_property’
> drivers/net/cassini.c:3358: warning: assignment makes pointer from
> integer without a cast
> drivers/net/cassini.c: In function ‘cas_init_one’:
> drivers/net/cassini.c:5035: error: implicit declaration of function
> ‘pci_device_to_OF_node’
> drivers/net/cassini.c:5035: warning: assignment makes pointer from
> integer without a cast
> make[3]: *** [drivers/net/cassini.o] Error 1
> make[2]: *** [drivers/net] Error 2

This is the fix I'll be using:

--------------------
cassini: Fix build bustage on x86.

Unfortunately, not all CONFIG_OF platforms provide
pci_device_to_OF_node().

Change the test to CONFIG_SPARC for now to deal with
the build regressions.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/cassini.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 7206ab2..3437613 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -3203,7 +3203,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
 	int phy_type = CAS_PHY_MII_MDIO0; /* default phy type */
 	int mac_off  = 0;
 
-#if defined(CONFIG_OF)
+#if defined(CONFIG_SPARC)
 	const unsigned char *addr;
 #endif
 
@@ -3354,7 +3354,7 @@ use_random_mac_addr:
 	if (found & VPD_FOUND_MAC)
 		goto done;
 
-#if defined(CONFIG_OF)
+#if defined(CONFIG_SPARC)
 	addr = of_get_property(cp->of_node, "local-mac-address", NULL);
 	if (addr != NULL) {
 		memcpy(dev_addr, addr, 6);
@@ -5031,7 +5031,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
 	cp->msg_enable = (cassini_debug < 0) ? CAS_DEF_MSG_ENABLE :
 	  cassini_debug;
 
-#if defined(CONFIG_OF)
+#if defined(CONFIG_SPARC)
 	cp->of_node = pci_device_to_OF_node(pdev);
 #endif
 
-- 
1.7.3.4


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

* Re: Kernel 2.6.37-git10 build failure: cassini.c
  2011-01-14 20:41 ` David Miller
@ 2011-01-14 21:01   ` Grant Likely
  0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2011-01-14 21:01 UTC (permalink / raw)
  To: David Miller
  Cc: anca.emanuel, linux-kernel, netdev, eric.dumazet, joe, siccegge,
	jpirko

2011/1/14 David Miller <davem@davemloft.net>:
> From: Anca Emanuel <anca.emanuel@gmail.com>
> Date: Fri, 14 Jan 2011 10:09:43 +0200
>
>> drivers/net/cassini.c: In function ‘cas_get_vpd_info’:
>> drivers/net/cassini.c:3358: error: implicit declaration of function
>> ‘of_get_property’
>> drivers/net/cassini.c:3358: warning: assignment makes pointer from
>> integer without a cast
>> drivers/net/cassini.c: In function ‘cas_init_one’:
>> drivers/net/cassini.c:5035: error: implicit declaration of function
>> ‘pci_device_to_OF_node’
>> drivers/net/cassini.c:5035: warning: assignment makes pointer from
>> integer without a cast
>> make[3]: *** [drivers/net/cassini.o] Error 1
>> make[2]: *** [drivers/net] Error 2
>
> This is the fix I'll be using:
>
> --------------------
> cassini: Fix build bustage on x86.
>
> Unfortunately, not all CONFIG_OF platforms provide
> pci_device_to_OF_node().
>
> Change the test to CONFIG_SPARC for now to deal with
> the build regressions.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

pci_device_to_OF_node() will probably become available for all
CONFIG_OF users in 2.6.39.  In the meantime, I agree with this
solution.

g.

> ---
>  drivers/net/cassini.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
> index 7206ab2..3437613 100644
> --- a/drivers/net/cassini.c
> +++ b/drivers/net/cassini.c
> @@ -3203,7 +3203,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
>        int phy_type = CAS_PHY_MII_MDIO0; /* default phy type */
>        int mac_off  = 0;
>
> -#if defined(CONFIG_OF)
> +#if defined(CONFIG_SPARC)
>        const unsigned char *addr;
>  #endif
>
> @@ -3354,7 +3354,7 @@ use_random_mac_addr:
>        if (found & VPD_FOUND_MAC)
>                goto done;
>
> -#if defined(CONFIG_OF)
> +#if defined(CONFIG_SPARC)
>        addr = of_get_property(cp->of_node, "local-mac-address", NULL);
>        if (addr != NULL) {
>                memcpy(dev_addr, addr, 6);
> @@ -5031,7 +5031,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
>        cp->msg_enable = (cassini_debug < 0) ? CAS_DEF_MSG_ENABLE :
>          cassini_debug;
>
> -#if defined(CONFIG_OF)
> +#if defined(CONFIG_SPARC)
>        cp->of_node = pci_device_to_OF_node(pdev);
>  #endif
>
> --
> 1.7.3.4
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

end of thread, other threads:[~2011-01-14 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14  8:09 Kernel 2.6.37-git10 build failure: cassini.c Anca Emanuel
2011-01-14 16:02 ` Anca Emanuel
2011-01-14 20:41 ` David Miller
2011-01-14 21:01   ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox