2010-10-25 14:43:23

by Arnd Hannemann

[permalink] [raw]
Subject: [PATCH] net: b43legacy: fix compile error

On todays linus tree the following compile error happened to me:

CC [M] drivers/net/wireless/b43legacy/xmit.o
In file included from include/net/dst.h:11,
from drivers/net/wireless/b43legacy/xmit.c:31:
include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
include/net/dst_ops.h: In function 'dst_entries_get_fast':
include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_get_slow':
include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_add':
include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_init':
include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_destroy':
include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
make[3]: *** [drivers/net/wireless/b43legacy] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

This patch fixes this issue by adding "linux/cache.h" as an include to
"include/net/dst_ops.h".

Signed-off-by: Arnd Hannemann <[email protected]>
---
include/net/dst_ops.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h
index 1fa5306..51665b3 100644
--- a/include/net/dst_ops.h
+++ b/include/net/dst_ops.h
@@ -2,6 +2,7 @@
#define _NET_DST_OPS_H
#include <linux/types.h>
#include <linux/percpu_counter.h>
+#include <linux/cache.h>

struct dst_entry;
struct kmem_cachep;
--
1.7.0.4



2010-10-25 15:51:56

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

Le lundi 25 octobre 2010 à 10:32 -0500, Larry Finger a écrit :
> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
> > On todays linus tree the following compile error happened to me:
> >
> > CC [M] drivers/net/wireless/b43legacy/xmit.o
> > In file included from include/net/dst.h:11,
> > from drivers/net/wireless/b43legacy/xmit.c:31:
> > include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
> > include/net/dst_ops.h: In function 'dst_entries_get_fast':
> > include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> > include/net/dst_ops.h: In function 'dst_entries_get_slow':
> > include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> > include/net/dst_ops.h: In function 'dst_entries_add':
> > include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> > include/net/dst_ops.h: In function 'dst_entries_init':
> > include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> > include/net/dst_ops.h: In function 'dst_entries_destroy':
> > include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> > make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
> > make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> > make[2]: *** [drivers/net/wireless] Error 2
> > make[1]: *** [drivers/net] Error 2
> > make: *** [drivers] Error 2
> >
> > This patch fixes this issue by adding "linux/cache.h" as an include to
> > "include/net/dst_ops.h".
>
> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.

Well, x86_64 must include cache.h, this is probably why I missed it in
my build tests.

I wonder also why #include <net/dst.h> is needed at all in this
driver...

diff --git a/drivers/net/wireless/b43legacy/xmit.c
b/drivers/net/wireless/b43legacy/xmit.c
index 7d177d9..a261aec 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -28,8 +28,6 @@

*/

-#include <net/dst.h>
-
#include "xmit.h"
#include "phy.h"
#include "dma.h"




2010-10-25 15:32:04

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
> On todays linus tree the following compile error happened to me:
>
> CC [M] drivers/net/wireless/b43legacy/xmit.o
> In file included from include/net/dst.h:11,
> from drivers/net/wireless/b43legacy/xmit.c:31:
> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
> include/net/dst_ops.h: In function 'dst_entries_get_fast':
> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> include/net/dst_ops.h: In function 'dst_entries_get_slow':
> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> include/net/dst_ops.h: In function 'dst_entries_add':
> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> include/net/dst_ops.h: In function 'dst_entries_init':
> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> include/net/dst_ops.h: In function 'dst_entries_destroy':
> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> make[2]: *** [drivers/net/wireless] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2
>
> This patch fixes this issue by adding "linux/cache.h" as an include to
> "include/net/dst_ops.h".

Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.

Larry


2010-10-25 18:11:35

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On 10/25/2010 10:51 AM, Eric Dumazet wrote:
> Le lundi 25 octobre 2010 à 10:32 -0500, Larry Finger a écrit :
>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>> On todays linus tree the following compile error happened to me:
>>>
>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>> In file included from include/net/dst.h:11,
>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>> make[2]: *** [drivers/net/wireless] Error 2
>>> make[1]: *** [drivers/net] Error 2
>>> make: *** [drivers] Error 2
>>>
>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>> "include/net/dst_ops.h".
>>
>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>
> Well, x86_64 must include cache.h, this is probably why I missed it in
> my build tests.
>
> I wonder also why #include <net/dst.h> is needed at all in this
> driver...
>
> diff --git a/drivers/net/wireless/b43legacy/xmit.c
> b/drivers/net/wireless/b43legacy/xmit.c
> index 7d177d9..a261aec 100644
> --- a/drivers/net/wireless/b43legacy/xmit.c
> +++ b/drivers/net/wireless/b43legacy/xmit.c
> @@ -28,8 +28,6 @@
>
> */
>
> -#include <net/dst.h>
> -
> #include "xmit.h"
> #include "phy.h"
> #include "dma.h"

I have no idea why that header was included - likely historical in the
transformation from bcm43xx to b43legacy. For completeness, there are 2 more
places to change:

Index: linux-2.6/drivers/net/wireless/b43legacy/dma.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/b43legacy/dma.c
+++ linux-2.6/drivers/net/wireless/b43legacy/dma.c
@@ -38,7 +38,6 @@
#include <linux/delay.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
-#include <net/dst.h>

/* 32bit DMA ops. */
static
Index: linux-2.6/drivers/net/wireless/b43legacy/main.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/b43legacy/main.c
+++ linux-2.6/drivers/net/wireless/b43legacy/main.c
@@ -41,7 +41,6 @@
#include <linux/skbuff.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
-#include <net/dst.h>
#include <asm/unaligned.h>

#include "b43legacy.h"
Index: linux-2.6/drivers/net/wireless/b43legacy/xmit.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/b43legacy/xmit.c
+++ linux-2.6/drivers/net/wireless/b43legacy/xmit.c
@@ -28,8 +28,6 @@

*/

-#include <net/dst.h>
-
#include "xmit.h"
#include "phy.h"
#include "dma.h"

Will you push the complete patch to Linus or DaveM?

Larry


2010-10-25 18:44:46

by Arnd Hannemann

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

Am 25.10.2010 20:36, schrieb Larry Finger:
> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
>> Am 25.10.2010 17:32, schrieb Larry Finger:
>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>>> On todays linus tree the following compile error happened to me:
>>>>
>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>>> In file included from include/net/dst.h:11,
>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>>> make[2]: *** [drivers/net/wireless] Error 2
>>>> make[1]: *** [drivers/net] Error 2
>>>> make: *** [drivers] Error 2
>>>>
>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>>> "include/net/dst_ops.h".
>>>
>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>>
>> Exactly the same git describe here.
>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
>
> That probably makes the difference. Using Eric's fix that removes the #include
> <linux/dst.h> should be better. Does it work for you?
>
> There are probably a lot more of the system includes that may not be needed. If
> I send you a patch removing them, could you test?

As it turns out my card is not supported by b43legacy, but compilation testing,
sure I can test that.

Regards,
Arnd

2010-10-25 18:36:43

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
> Am 25.10.2010 17:32, schrieb Larry Finger:
>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>> On todays linus tree the following compile error happened to me:
>>>
>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>> In file included from include/net/dst.h:11,
>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>> make[2]: *** [drivers/net/wireless] Error 2
>>> make[1]: *** [drivers/net] Error 2
>>> make: *** [drivers] Error 2
>>>
>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>> "include/net/dst_ops.h".
>>
>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>
> Exactly the same git describe here.
> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).

That probably makes the difference. Using Eric's fix that removes the #include
<linux/dst.h> should be better. Does it work for you?

There are probably a lot more of the system includes that may not be needed. If
I send you a patch removing them, could you test?

Larry

2010-10-25 19:57:23

by Eric Dumazet

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

Le lundi 25 octobre 2010 à 13:11 -0500, Larry Finger a écrit :

> I have no idea why that header was included - likely historical in the
> transformation from bcm43xx to b43legacy. For completeness, there are 2 more
> places to change:

Anyway, Arnd patch is fine by me, I didnt want to supply an alternate
patch.

I only was wondering why the include was in this driver...


2010-10-25 18:26:15

by Arnd Hannemann

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

Am 25.10.2010 17:32, schrieb Larry Finger:
> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>> On todays linus tree the following compile error happened to me:
>>
>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>> In file included from include/net/dst.h:11,
>> from drivers/net/wireless/b43legacy/xmit.c:31:
>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>> include/net/dst_ops.h: In function 'dst_entries_add':
>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>> include/net/dst_ops.h: In function 'dst_entries_init':
>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>> make[2]: *** [drivers/net/wireless] Error 2
>> make[1]: *** [drivers/net] Error 2
>> make: *** [drivers] Error 2
>>
>> This patch fixes this issue by adding "linux/cache.h" as an include to
>> "include/net/dst_ops.h".
>
> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.

Exactly the same git describe here.
Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).

Regards
Arnd

2010-10-25 20:13:08

by Arnd Hannemann

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

Am 25.10.2010 20:59, schrieb Larry Finger:
> On 10/25/2010 01:44 PM, Arnd Hannemann wrote:
>> Am 25.10.2010 20:36, schrieb Larry Finger:
>>> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
>>>> Am 25.10.2010 17:32, schrieb Larry Finger:
>>>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>>>>> On todays linus tree the following compile error happened to me:
>>>>>>
>>>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>>>>> In file included from include/net/dst.h:11,
>>>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>>>>> make[2]: *** [drivers/net/wireless] Error 2
>>>>>> make[1]: *** [drivers/net] Error 2
>>>>>> make: *** [drivers] Error 2
>>>>>>
>>>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>>>>> "include/net/dst_ops.h".
>>>>>
>>>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>>>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>>>>
>>>> Exactly the same git describe here.
>>>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
>>>
>>> That probably makes the difference. Using Eric's fix that removes the #include
>>> <linux/dst.h> should be better. Does it work for you?
>>>
>>> There are probably a lot more of the system includes that may not be needed. If
>>> I send you a patch removing them, could you test?
>>
>> As it turns out my card is not supported by b43legacy, but compilation testing,
>> sure I can test that.
>
> If it is a Broadcom card, it is likely handled by b43.

Yes. It seems it should work with b43 (its an SDIO card) and it almost does...

> Attached is a trial removal of a number of include statements. Does it compile?

Nope:
NSTALL_MOD_PATH=/home/arnd/projekte/renesas-2/nfs modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC [M] drivers/net/wireless/b43legacy/main.o
drivers/net/wireless/b43legacy/main.c: In function 'b43legacy_upload_microcode':
drivers/net/wireless/b43legacy/main.c:1688: error: implicit declaration of function 'signal_pending'
make[4]: *** [drivers/net/wireless/b43legacy/main.o] Error 1
make[3]: *** [drivers/net/wireless/b43legacy] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

Thanks,
Arnd

2010-10-25 18:59:38

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On 10/25/2010 01:44 PM, Arnd Hannemann wrote:
> Am 25.10.2010 20:36, schrieb Larry Finger:
>> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
>>> Am 25.10.2010 17:32, schrieb Larry Finger:
>>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>>>> On todays linus tree the following compile error happened to me:
>>>>>
>>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>>>> In file included from include/net/dst.h:11,
>>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>>>> make[2]: *** [drivers/net/wireless] Error 2
>>>>> make[1]: *** [drivers/net] Error 2
>>>>> make: *** [drivers] Error 2
>>>>>
>>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>>>> "include/net/dst_ops.h".
>>>>
>>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>>>
>>> Exactly the same git describe here.
>>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
>>
>> That probably makes the difference. Using Eric's fix that removes the #include
>> <linux/dst.h> should be better. Does it work for you?
>>
>> There are probably a lot more of the system includes that may not be needed. If
>> I send you a patch removing them, could you test?
>
> As it turns out my card is not supported by b43legacy, but compilation testing,
> sure I can test that.

If it is a Broadcom card, it is likely handled by b43.

Attached is a trial removal of a number of include statements. Does it compile?

Larry


Attachments:
b43legacy_remove_dst_h (3.10 kB)

2010-11-11 17:05:58

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On 11/11/2010 10:35 AM, John W. Linville wrote:
> On Mon, Oct 25, 2010 at 10:13:06PM +0200, Arnd Hannemann wrote:
>> Am 25.10.2010 20:59, schrieb Larry Finger:
>>> On 10/25/2010 01:44 PM, Arnd Hannemann wrote:
>>>> Am 25.10.2010 20:36, schrieb Larry Finger:
>>>>> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
>>>>>> Am 25.10.2010 17:32, schrieb Larry Finger:
>>>>>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
>>>>>>>> On todays linus tree the following compile error happened to me:
>>>>>>>>
>>>>>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
>>>>>>>> In file included from include/net/dst.h:11,
>>>>>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
>>>>>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
>>>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
>>>>>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
>>>>>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>>>> include/net/dst_ops.h: In function 'dst_entries_add':
>>>>>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>>>> include/net/dst_ops.h: In function 'dst_entries_init':
>>>>>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
>>>>>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
>>>>>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
>>>>>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>>>>>>>> make[2]: *** [drivers/net/wireless] Error 2
>>>>>>>> make[1]: *** [drivers/net] Error 2
>>>>>>>> make: *** [drivers] Error 2
>>>>>>>>
>>>>>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
>>>>>>>> "include/net/dst_ops.h".
>>>>>>>
>>>>>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
>>>>>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
>>>>>>
>>>>>> Exactly the same git describe here.
>>>>>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
>>>>>
>>>>> That probably makes the difference. Using Eric's fix that removes the #include
>>>>> <linux/dst.h> should be better. Does it work for you?
>>>>>
>>>>> There are probably a lot more of the system includes that may not be needed. If
>>>>> I send you a patch removing them, could you test?
>>>>
>>>> As it turns out my card is not supported by b43legacy, but compilation testing,
>>>> sure I can test that.
>>>
>>> If it is a Broadcom card, it is likely handled by b43.
>>
>> Yes. It seems it should work with b43 (its an SDIO card) and it almost does...
>>
>>> Attached is a trial removal of a number of include statements. Does it compile?
>>
>> Nope:
>> NSTALL_MOD_PATH=/home/arnd/projekte/renesas-2/nfs modules
>> CHK include/linux/version.h
>> CHK include/generated/utsrelease.h
>> make[1]: `include/generated/mach-types.h' is up to date.
>> CALL scripts/checksyscalls.sh
>> CC [M] drivers/net/wireless/b43legacy/main.o
>> drivers/net/wireless/b43legacy/main.c: In function 'b43legacy_upload_microcode':
>> drivers/net/wireless/b43legacy/main.c:1688: error: implicit declaration of function 'signal_pending'
>> make[4]: *** [drivers/net/wireless/b43legacy/main.o] Error 1
>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
>> make[2]: *** [drivers/net/wireless] Error 2
>> make[1]: *** [drivers/net] Error 2
>> make: *** [drivers] Error 2
>
> Is this issue resolved? Should I be expecting a b43 patch?

I don't know if a similar patch for b43 is needed. I tried to set up a cross
compiler for ARM. My initial attempt failed and I did not have time to explore
the situation. If anyone has links to a cross-compiler solution for x86_64 on
openSUSE, please let me know.

Larry

2010-11-11 16:44:58

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On Mon, Oct 25, 2010 at 10:13:06PM +0200, Arnd Hannemann wrote:
> Am 25.10.2010 20:59, schrieb Larry Finger:
> > On 10/25/2010 01:44 PM, Arnd Hannemann wrote:
> >> Am 25.10.2010 20:36, schrieb Larry Finger:
> >>> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
> >>>> Am 25.10.2010 17:32, schrieb Larry Finger:
> >>>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
> >>>>>> On todays linus tree the following compile error happened to me:
> >>>>>>
> >>>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
> >>>>>> In file included from include/net/dst.h:11,
> >>>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
> >>>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
> >>>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
> >>>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
> >>>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>> include/net/dst_ops.h: In function 'dst_entries_add':
> >>>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>> include/net/dst_ops.h: In function 'dst_entries_init':
> >>>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
> >>>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
> >>>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> >>>>>> make[2]: *** [drivers/net/wireless] Error 2
> >>>>>> make[1]: *** [drivers/net] Error 2
> >>>>>> make: *** [drivers] Error 2
> >>>>>>
> >>>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
> >>>>>> "include/net/dst_ops.h".
> >>>>>
> >>>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
> >>>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
> >>>>
> >>>> Exactly the same git describe here.
> >>>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
> >>>
> >>> That probably makes the difference. Using Eric's fix that removes the #include
> >>> <linux/dst.h> should be better. Does it work for you?
> >>>
> >>> There are probably a lot more of the system includes that may not be needed. If
> >>> I send you a patch removing them, could you test?
> >>
> >> As it turns out my card is not supported by b43legacy, but compilation testing,
> >> sure I can test that.
> >
> > If it is a Broadcom card, it is likely handled by b43.
>
> Yes. It seems it should work with b43 (its an SDIO card) and it almost does...
>
> > Attached is a trial removal of a number of include statements. Does it compile?
>
> Nope:
> NSTALL_MOD_PATH=/home/arnd/projekte/renesas-2/nfs modules
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> make[1]: `include/generated/mach-types.h' is up to date.
> CALL scripts/checksyscalls.sh
> CC [M] drivers/net/wireless/b43legacy/main.o
> drivers/net/wireless/b43legacy/main.c: In function 'b43legacy_upload_microcode':
> drivers/net/wireless/b43legacy/main.c:1688: error: implicit declaration of function 'signal_pending'
> make[4]: *** [drivers/net/wireless/b43legacy/main.o] Error 1
> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> make[2]: *** [drivers/net/wireless] Error 2
> make[1]: *** [drivers/net] Error 2
> make: *** [drivers] Error 2

Is this issue resolved? Should I be expecting a b43 patch?

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-11-11 17:14:57

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] net: b43legacy: fix compile error

On Thu, Nov 11, 2010 at 11:06:32AM -0600, Larry Finger wrote:
> On 11/11/2010 10:35 AM, John W. Linville wrote:
> > On Mon, Oct 25, 2010 at 10:13:06PM +0200, Arnd Hannemann wrote:
> >> Am 25.10.2010 20:59, schrieb Larry Finger:
> >>> On 10/25/2010 01:44 PM, Arnd Hannemann wrote:
> >>>> Am 25.10.2010 20:36, schrieb Larry Finger:
> >>>>> On 10/25/2010 01:26 PM, Arnd Hannemann wrote:
> >>>>>> Am 25.10.2010 17:32, schrieb Larry Finger:
> >>>>>>> On 10/25/2010 09:41 AM, Arnd Hannemann wrote:
> >>>>>>>> On todays linus tree the following compile error happened to me:
> >>>>>>>>
> >>>>>>>> CC [M] drivers/net/wireless/b43legacy/xmit.o
> >>>>>>>> In file included from include/net/dst.h:11,
> >>>>>>>> from drivers/net/wireless/b43legacy/xmit.c:31:
> >>>>>>>> include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__' before '____cacheline_aligned_in_smp'
> >>>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_fast':
> >>>>>>>> include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>>>> include/net/dst_ops.h: In function 'dst_entries_get_slow':
> >>>>>>>> include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>>>> include/net/dst_ops.h: In function 'dst_entries_add':
> >>>>>>>> include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>>>> include/net/dst_ops.h: In function 'dst_entries_init':
> >>>>>>>> include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>>>> include/net/dst_ops.h: In function 'dst_entries_destroy':
> >>>>>>>> include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named 'pcpuc_entries'
> >>>>>>>> make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
> >>>>>>>> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> >>>>>>>> make[2]: *** [drivers/net/wireless] Error 2
> >>>>>>>> make[1]: *** [drivers/net] Error 2
> >>>>>>>> make: *** [drivers] Error 2
> >>>>>>>>
> >>>>>>>> This patch fixes this issue by adding "linux/cache.h" as an include to
> >>>>>>>> "include/net/dst_ops.h".
> >>>>>>>
> >>>>>>> Strange. Compiling b43legacy from the linux-2.6.git tree (git describe is
> >>>>>>> v2.6.36-4464-g229aebb) works fine on x86_64. I wonder what is different.
> >>>>>>
> >>>>>> Exactly the same git describe here.
> >>>>>> Maybe your arch includes cache.h already, in my case its a compile for ARM (shmobile).
> >>>>>
> >>>>> That probably makes the difference. Using Eric's fix that removes the #include
> >>>>> <linux/dst.h> should be better. Does it work for you?
> >>>>>
> >>>>> There are probably a lot more of the system includes that may not be needed. If
> >>>>> I send you a patch removing them, could you test?
> >>>>
> >>>> As it turns out my card is not supported by b43legacy, but compilation testing,
> >>>> sure I can test that.
> >>>
> >>> If it is a Broadcom card, it is likely handled by b43.
> >>
> >> Yes. It seems it should work with b43 (its an SDIO card) and it almost does...
> >>
> >>> Attached is a trial removal of a number of include statements. Does it compile?
> >>
> >> Nope:
> >> NSTALL_MOD_PATH=/home/arnd/projekte/renesas-2/nfs modules
> >> CHK include/linux/version.h
> >> CHK include/generated/utsrelease.h
> >> make[1]: `include/generated/mach-types.h' is up to date.
> >> CALL scripts/checksyscalls.sh
> >> CC [M] drivers/net/wireless/b43legacy/main.o
> >> drivers/net/wireless/b43legacy/main.c: In function 'b43legacy_upload_microcode':
> >> drivers/net/wireless/b43legacy/main.c:1688: error: implicit declaration of function 'signal_pending'
> >> make[4]: *** [drivers/net/wireless/b43legacy/main.o] Error 1
> >> make[3]: *** [drivers/net/wireless/b43legacy] Error 2
> >> make[2]: *** [drivers/net/wireless] Error 2
> >> make[1]: *** [drivers/net] Error 2
> >> make: *** [drivers] Error 2
> >
> > Is this issue resolved? Should I be expecting a b43 patch?
>
> I don't know if a similar patch for b43 is needed. I tried to set up a cross
> compiler for ARM. My initial attempt failed and I did not have time to explore
> the situation. If anyone has links to a cross-compiler solution for x86_64 on
> openSUSE, please let me know.

Sorry, I mean b43legacy -- will there be a formal patch?

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.