Re: [PATCH v3 0/7] Add RSS to DPAA 1.x Ethernet driver

From: David Miller
Date: Thu Aug 24 2017 - 14:47:51 EST


From: David Miller <davem@xxxxxxxxxxxxx>
Date: Thu, 24 Aug 2017 09:42:20 -0700 (PDT)

> From: Madalin Bucur <madalin.bucur@xxxxxxx>
> Date: Thu, 24 Aug 2017 10:28:21 +0300
>
>> This patch set introduces Receive Side Scaling for the DPAA Ethernet
>> driver. Documentation is updated with details related to the new
>> feature and limitations that apply.
>> Added also a small fix.
>>
>> v2: removed a C++ style comment
>> v3: move struct fman to header file to avoid exporting a function
>
> Series applied, thanks.

Actually I'm reverting, this doesn't even compile.

[davem@localhost net-next]$ make -s -j8
In file included from drivers/net/ethernet/freescale/fman/fman.c:35:0:
drivers/net/ethernet/freescale/fman/fman.h:286:9: error: type defaults to ʽintʼ in declaration of ʽirqreturn_tʼ [-Werror=implicit-int]
typedef irqreturn_t (fman_exceptions_cb)(struct fman *fman,
^~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.h:286:9: error: ʽirqreturn_tʼ declared as function returning a function
drivers/net/ethernet/freescale/fman/fman.h:287:12: warning: parameter names (without types) in function declaration
enum fman_exceptions exception);
^~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.h:300:22: error: ʽfman_bus_error_cbʼ declared as function returning a function
typedef irqreturn_t (fman_bus_error_cb)(struct fman *fman, u8 port_id,
^~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.h:316:18: error: field ʽmuram_resʼ has incomplete type
struct resource muram_res; /* MURAM resource */
^~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.h:330:2: error: unknown type name ʽfman_exceptions_cbʼ
fman_exceptions_cb *exception_cb;
^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.h:333:2: error: unknown type name ʽspinlock_tʼ
spinlock_t spinlock;
^~~~~~~~~~
In file included from ./include/linux/irq.h:19:0,
from ./include/linux/of_irq.h:6,
from drivers/net/ethernet/freescale/fman/fman.c:46:
./include/linux/irqreturn.h:16:24: error: conflicting types for ʽirqreturn_tʼ
typedef enum irqreturn irqreturn_t;
^~~~~~~~~~~
In file included from drivers/net/ethernet/freescale/fman/fman.c:35:0:
drivers/net/ethernet/freescale/fman/fman.h:286:9: note: previous declaration of ʽirqreturn_tʼ was here
typedef irqreturn_t (fman_exceptions_cb)(struct fman *fman,
^~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽbmi_err_eventʼ:
drivers/net/ethernet/freescale/fman/fman.c:1237:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_BMI_STORAGE_PROFILE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1239:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_BMI_LIST_RAM_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1241:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_BMI_STATISTICS_RAM_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1243:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_BMI_DISPATCH_RAM_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽqmi_err_eventʼ:
drivers/net/ethernet/freescale/fman/fman.c:1266:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_QMI_DOUBLE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1268:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman,
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽdma_err_eventʼ:
drivers/net/ethernet/freescale/fman/fman.c:1317:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_DMA_SINGLE_PORT_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1319:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_DMA_READ_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1321:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_DMA_SYSTEM_WRITE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1323:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_DMA_FM_WRITE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽfpm_err_eventʼ:
drivers/net/ethernet/freescale/fman/fman.c:1340:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_FPM_DOUBLE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1342:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_FPM_STALL_ON_TASKS);
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1345:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_FPM_SINGLE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽmuram_err_intrʼ:
drivers/net/ethernet/freescale/fman/fman.c:1363:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_MURAM_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽqmi_eventʼ:
drivers/net/ethernet/freescale/fman/fman.c:1385:9: error: called object is not a function or function pointer
ret = fman->exception_cb(fman, FMAN_EX_QMI_SINGLE_ECC);
^~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽfman_configʼ:
drivers/net/ethernet/freescale/fman/fman.c:1735:21: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
fman->exception_cb = fman_exceptions;
^
drivers/net/ethernet/freescale/fman/fman.c:1736:21: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
fman->bus_error_cb = fman_bus_error;
^
In file included from ./include/linux/mmzone.h:7:0,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from drivers/net/ethernet/freescale/fman/fman.c:40:
drivers/net/ethernet/freescale/fman/fman.c:1745:17: error: passing argument 1 of ʽspinlock_checkʼ from incompatible pointer type [-Werror=incompatible-pointer-types]
spin_lock_init(&fman->spinlock);
^
./include/linux/spinlock.h:293:17: note: in definition of macro ʽspin_lock_initʼ
spinlock_check(_lock); \
^~~~~
./include/linux/spinlock.h:286:40: note: expected ʽspinlock_t * {aka struct spinlock *}ʼ but argument is of type ʽint *ʼ
static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^~~~~~~~~~~~~~
In file included from ./include/linux/mmzone.h:7:0,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from drivers/net/ethernet/freescale/fman/fman.c:40:
./include/linux/spinlock.h:294:29: error: request for member ʽrlockʼ in something not a structure or union
raw_spin_lock_init(&(_lock)->rlock); \
^
./include/linux/spinlock.h:99:24: note: in definition of macro ʽraw_spin_lock_initʼ
__raw_spin_lock_init((lock), #lock, &__key); \
^~~~
drivers/net/ethernet/freescale/fman/fman.c:1745:2: note: in expansion of macro ʽspin_lock_initʼ
spin_lock_init(&fman->spinlock);
^~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.c: In function ʽfman_set_port_paramsʼ:
drivers/net/ethernet/freescale/fman/fman.c:2123:20: error: passing argument 1 of ʽspinlock_checkʼ from incompatible pointer type [-Werror=incompatible-pointer-types]
spin_lock_irqsave(&fman->spinlock, flags);
^
./include/linux/spinlock.h:205:34: note: in definition of macro ʽraw_spin_lock_irqsaveʼ
flags = _raw_spin_lock_irqsave(lock); \
^~~~
drivers/net/ethernet/freescale/fman/fman.c:2123:2: note: in expansion of macro ʽspin_lock_irqsaveʼ
spin_lock_irqsave(&fman->spinlock, flags);
^~~~~~~~~~~~~~~~~
In file included from ./include/linux/mmzone.h:7:0,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from drivers/net/ethernet/freescale/fman/fman.c:40:
./include/linux/spinlock.h:286:40: note: expected ʽspinlock_t * {aka struct spinlock *}ʼ but argument is of type ʽint *ʼ
static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
^~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.c:2201:25: error: passing argument 1 of ʽspin_unlock_irqrestoreʼ from incompatible pointer type [-Werror=incompatible-pointer-types]
spin_unlock_irqrestore(&fman->spinlock, flags);
^
In file included from ./include/linux/mmzone.h:7:0,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from drivers/net/ethernet/freescale/fman/fman.c:40:
./include/linux/spinlock.h:352:29: note: expected ʽspinlock_t * {aka struct spinlock *}ʼ but argument is of type ʽint *ʼ
static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/fman/fman.c:2206:25: error: passing argument 1 of ʽspin_unlock_irqrestoreʼ from incompatible pointer type [-Werror=incompatible-pointer-types]
spin_unlock_irqrestore(&fman->spinlock, flags);
^
In file included from ./include/linux/mmzone.h:7:0,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from drivers/net/ethernet/freescale/fman/fman.c:40:
./include/linux/spinlock.h:352:29: note: expected ʽspinlock_t * {aka struct spinlock *}ʼ but argument is of type ʽint *ʼ
static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[5]: *** [scripts/Makefile.build:302: drivers/net/ethernet/freescale/fman/fman.o] Error 1
make[4]: *** [scripts/Makefile.build:561: drivers/net/ethernet/freescale/fman] Error 2
make[3]: *** [scripts/Makefile.build:561: drivers/net/ethernet/freescale] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:561: drivers/net/ethernet] Error 2
make[1]: *** [scripts/Makefile.build:561: drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1019: drivers] Error 2