[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202006161449.jaRms2Ih%lkp@intel.com>
Date: Tue, 16 Jun 2020 14:47:38 +0800
From: kernel test robot <lkp@...el.com>
To: yunaixin03610@....com, netdev@...r.kernel.org
Cc: kbuild-all@...ts.01.org, yunaixin <yunaixin@...wei.com>
Subject: Re: [PATCH 3/5] Huawei BMA: Adding Huawei BMA driver: host_veth_drv
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc1 next-20200616]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/yunaixin03610-163-com/Adding-Huawei-BMA-drivers/20200616-102318
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:37:
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.h:334:2: error: unknown type name '__kernel_time_t'
334 | __kernel_time_t init_time;
| ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.h:393: warning: "DMA_MAPPING_ERROR" redefined
393 | #define DMA_MAPPING_ERROR(device, dma) dma_mapping_error(device, dma)
|
In file included from include/linux/pci-dma-compat.h:8,
from include/linux/pci.h:2415,
from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:19:
include/linux/dma-mapping.h:134: note: this is the location of the previous definition
134 | #define DMA_MAPPING_ERROR (~(dma_addr_t)0)
|
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: In function 'veth_param_get_statics':
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:174:2: error: unknown type name '__kernel_time_t'; did you mean '__kernel_timer_t'?
174 | __kernel_time_t running_time = 0;
| ^~~~~~~~~~~~~~~
| __kernel_timer_t
In file included from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.h:28,
from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:37:
>> drivers/net/ethernet/huawei/bma/veth_drv/../edma_drv/bma_include.h:109:19: error: storage size of 'uptime' isn't known
109 | struct timespec uptime; | ^~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:179:2: note: in expansion of macro 'GET_SYS_SECONDS'
179 | GET_SYS_SECONDS(running_time);
| ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/../edma_drv/bma_include.h:110:3: error: implicit declaration of function 'get_monotonic_boottime' [-Werror=implicit-function-declaration]
110 | get_monotonic_boottime(&uptime); | ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:179:2: note: in expansion of macro 'GET_SYS_SECONDS'
179 | GET_SYS_SECONDS(running_time);
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/../edma_drv/bma_include.h:109:19: warning: unused variable 'uptime' [-Wunused-variable]
109 | struct timespec uptime; | ^~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:179:2: note: in expansion of macro 'GET_SYS_SECONDS'
179 | GET_SYS_SECONDS(running_time);
| ^~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:188:46: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
188 | len += sprintf(buf + len, "[running_time]:%luD %02lu:%02lu:%02lun",
| ~~^
| |
| long unsigned int
| %u
189 | running_time / (SECONDS_PER_DAY),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:188:53: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'int' [-Wformat=]
188 | len += sprintf(buf + len, "[running_time]:%luD %02lu:%02lu:%02lun",
| ~~~~^
| |
| long unsigned int
| %02u
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:188:59: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
188 | len += sprintf(buf + len, "[running_time]:%luD %02lu:%02lu:%02lun",
| ~~~~^
| |
| long unsigned int
| %02u
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:188:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'int' [-Wformat=]
188 | len += sprintf(buf + len, "[running_time]:%luD %02lu:%02lu:%02lun",
| ~~~~^
| |
| long unsigned int
| %02u
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: At top level:
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:394:5: warning: no previous prototype for 'bspveth_setup_tx_resources' [-Wmissing-prototypes]
394 | s32 bspveth_setup_tx_resources(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:18:
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: In function 'bspveth_setup_tx_resources':
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:427:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
427 | ptx_queue->pbdbase_p = (u8 *)(__pa((BSP_VETH_T)(ptx_queue->pbdbase_v)));
| ^
arch/x86/include/asm/page.h:42:46: note: in definition of macro '__pa'
42 | #define __pa(x) __phys_addr((unsigned long)(x))
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: At top level:
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:443:6: warning: no previous prototype for 'bspveth_free_tx_resources' [-Wmissing-prototypes]
443 | void bspveth_free_tx_resources(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:485:5: warning: no previous prototype for 'bspveth_setup_all_tx_resources' [-Wmissing-prototypes]
485 | s32 bspveth_setup_all_tx_resources(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: In function 'bspveth_setup_all_tx_resources':
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:514:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
514 | (struct bspveth_dma_shmbd *)((BSP_VETH_T)(shmq_head)
| ^
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:514:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
514 | (struct bspveth_dma_shmbd *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:517:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
517 | (u8 *)((BSP_VETH_T)(shmq_head_p)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:517:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
517 | (u8 *)((BSP_VETH_T)(shmq_head_p)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:520:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
520 | (struct bspveth_dmal *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:520:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
520 | (struct bspveth_dmal *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:523:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
523 | (u8 *)(u64)(VETH_SHAREPOOL_BASE_INBMC +
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: At top level:
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:554:6: warning: no previous prototype for 'bspveth_free_all_tx_resources' [-Wmissing-prototypes]
554 | void bspveth_free_all_tx_resources(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:571:5: warning: no previous prototype for 'veth_alloc_one_rx_skb' [-Wmissing-prototypes]
571 | s32 veth_alloc_one_rx_skb(struct bspveth_rxtx_q *prx_queue, int idx)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:616:5: warning: no previous prototype for 'veth_refill_rxskb' [-Wmissing-prototypes]
616 | s32 veth_refill_rxskb(struct bspveth_rxtx_q *prx_queue, int queue)
| ^~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:654:5: warning: no previous prototype for 'bspveth_setup_rx_skb' [-Wmissing-prototypes]
654 | s32 bspveth_setup_rx_skb(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:685:6: warning: no previous prototype for 'bspveth_free_rx_skb' [-Wmissing-prototypes]
685 | void bspveth_free_rx_skb(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:718:5: warning: no previous prototype for 'bspveth_setup_all_rx_skb' [-Wmissing-prototypes]
718 | s32 bspveth_setup_all_rx_skb(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:746:6: warning: no previous prototype for 'bspveth_free_all_rx_skb' [-Wmissing-prototypes]
746 | void bspveth_free_all_rx_skb(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:758:5: warning: no previous prototype for 'bspveth_setup_rx_resources' [-Wmissing-prototypes]
758 | s32 bspveth_setup_rx_resources(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:18:
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: In function 'bspveth_setup_rx_resources':
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:792:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
792 | prx_queue->pbdbase_p = (u8 *)__pa((BSP_VETH_T) (prx_queue->pbdbase_v));
| ^
arch/x86/include/asm/page.h:42:46: note: in definition of macro '__pa'
42 | #define __pa(x) __phys_addr((unsigned long)(x))
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: At top level:
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:809:6: warning: no previous prototype for 'bspveth_free_rx_resources' [-Wmissing-prototypes]
809 | void bspveth_free_rx_resources(struct bspveth_device *pvethdev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:841:5: warning: no previous prototype for 'bspveth_setup_all_rx_resources' [-Wmissing-prototypes]
841 | s32 bspveth_setup_all_rx_resources(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: In function 'bspveth_setup_all_rx_resources':
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:871:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
871 | (struct bspveth_dma_shmbd *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:871:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
871 | (struct bspveth_dma_shmbd *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:874:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
874 | (u8 *)((BSP_VETH_T)(shmq_head_p)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:874:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
874 | (u8 *)((BSP_VETH_T)(shmq_head_p)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:877:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
877 | (struct bspveth_dmal *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:877:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
877 | (struct bspveth_dmal *)((BSP_VETH_T)(shmq_head)
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:880:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
880 | (u8 *)(u64)(VETH_SHAREPOOL_BASE_INBMC
| ^
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c: At top level:
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:908:6: warning: no previous prototype for 'bspveth_free_all_rx_resources' [-Wmissing-prototypes]
908 | void bspveth_free_all_rx_resources(struct bspveth_device *pvethdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:926:5: warning: no previous prototype for 'bspveth_dev_install' [-Wmissing-prototypes]
926 | s32 bspveth_dev_install(void)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:961:5: warning: no previous prototype for 'bspveth_dev_uninstall' [-Wmissing-prototypes]
961 | s32 bspveth_dev_uninstall(void)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:979:5: warning: no previous prototype for 'veth_open' [-Wmissing-prototypes]
979 | s32 veth_open(struct net_device *pstr_dev)
| ^~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1028:5: warning: no previous prototype for 'veth_close' [-Wmissing-prototypes]
1028 | s32 veth_close(struct net_device *pstr_dev)
| ^~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1046:5: warning: no previous prototype for 'veth_config' [-Wmissing-prototypes]
1046 | s32 veth_config(struct net_device *pstr_dev, struct ifmap *pstr_map)
| ^~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1063:6: warning: no previous prototype for 'bspveth_initstatis' [-Wmissing-prototypes]
1063 | void bspveth_initstatis(void)
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1088:5: warning: no previous prototype for 'veth_ioctl' [-Wmissing-prototypes]
1088 | s32 veth_ioctl(struct net_device *pstr_dev, struct ifreq *pifr, s32 l_cmd)
| ^~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1093:26: warning: no previous prototype for 'veth_stats' [-Wmissing-prototypes]
1093 | struct net_device_stats *veth_stats(struct net_device *pstr_dev)
| ^~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1098:5: warning: no previous prototype for 'veth_mac_set' [-Wmissing-prototypes]
1098 | s32 veth_mac_set(struct net_device *pstr_dev, void *p_mac)
| ^~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1119:6: warning: no previous prototype for 'veth_tx_timeout' [-Wmissing-prototypes]
1119 | void veth_tx_timeout(struct net_device *pstr_dev)
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1237:20: error: initialization of 'void (*)(struct net_device *, unsigned int)' from incompatible pointer type 'void (*)(struct net_device *)' [-Werror=incompatible-pointer-types]
1237 | .ndo_tx_timeout = veth_tx_timeout,
| ^~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1237:20: note: (near initialization for 'veth_ops.ndo_tx_timeout')
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1240:6: warning: no previous prototype for 'veth_netdev_func_init' [-Wmissing-prototypes]
1240 | void veth_netdev_func_init(struct net_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.c:1274:5: warning: no previous prototype for 'veth_send_one_pkt' [-Wmissing-prototypes]
1274 | s32 veth_send_one_pkt(struct sk_buff *skb, int queue)
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
vim +/__kernel_time_t +334 drivers/net/ethernet/huawei/bma/veth_drv/veth_hb.h
308
309 struct bspveth_device {
310 struct bspveth_rxtx_q *ptx_queue[MAX_QUEUE_NUM];
311 struct bspveth_rxtx_q *prx_queue[MAX_QUEUE_NUM];
312 struct net_device *pnetdev;
313 char name[NET_NAME_LEN];
314
315 struct pci_dev *ppcidev;
316 u8 *phostrtc_p;
317 u8 *phostrtc_v;
318
319 u8 *psysctl_v;
320 u8 *ppcie1_v;
321
322 u8 *pshmpool_p;
323 u8 *pshmpool_v;
324 u32 shmpoolsize;
325
326 u32 recv_int;
327 u32 tobmc_int;
328 u32 tohost_int;
329 u32 run_dma_tx_task;
330 u32 run_dma_rx_task;
331 u32 run_skb_rx_task;
332 u32 run_skb_fr_task;
333 u32 shutdown_cnt;
> 334 __kernel_time_t init_time;
335
336 /* spinlock for register */
337 spinlock_t reg_lock;
338 #ifndef USE_TASKLET
339 struct timer_list skbtrtimer;
340 struct timer_list dmatimer;
341 #else
342 struct tasklet_struct skb_task;
343 struct tasklet_struct dma_task;
344 #endif
345
346 struct net_device_stats stats;
347 struct work_struct shutdown_task;
348 #ifdef DEP_BMA
349 struct bma_priv_data_s *bma_priv;
350 #else
351 void *edma_priv;
352 #endif
353 };
354
355 struct tag_pcie_comm_priv {
356 char net_type[NET_TYPE_LEN];
357 struct net_device_stats stats;
358 int status;
359 int irq_enable;
360 int pcie_comm_rx_flag;
361 spinlock_t lock; /* spinlock for priv data */
362 };
363
364 #define QUEUE_MASK(p) ((p) & (BSPVETH_POINT_MASK))
365
366 #define CHECK_ADDR_ALIGN(addr, statis)\
367 do { \
368 if ((addr) & 0x3) \
369 statis;\
370 } while (0)
371
372 #define PROC_P_STATIS(name, statis)\
373 PROC_DPRINTK("[%10s]:\t0x%llx", #name, statis)
374
375 #define INC_STATIS_RXTX(queue, name, count, type) \
376 do { \
377 if (type == BSPVETH_RX)\
378 g_bspveth_dev.prx_queue[queue]->s.name += count;\
379 else\
380 g_bspveth_dev.ptx_queue[queue]->s.name += count;\
381 } while (0)
382
383 #define PROC_DPRINTK(fmt, args...) (len += sprintf(buf + len, fmt, ##args))
384
385 #define JUDGE_TX_QUEUE_SPACE(head, tail, len) \
386 (((BSPVETH_MAX_QUE_DEEP + (tail) - (head) - 1) \
387 & BSPVETH_POINT_MASK) >= (len))
388
389 #define JUDGE_RX_QUEUE_SPACE(head, tail, len) \
390 (((BSPVETH_MAX_QUE_DEEP + (tail) - (head)) \
391 & BSPVETH_POINT_MASK) > (len))
392
> 393 #define DMA_MAPPING_ERROR(device, dma) dma_mapping_error(device, dma)
394
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (73467 bytes)
Powered by blists - more mailing lists