tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: c8dbb3a6e214ad66d5d6099bf76e1f1c6eefc06f commit: a0c5bfdbc099daf30cbadb9657803f0cb3f89d0b [2544/2544] drivers: support for rnpm drivers from Mucse Technology N10/N400 config: x86_64-randconfig-123-20241205 (https://download.01.org/0day-ci/archive/20241208/202412081856.3zlECgE7-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241208/202412081856.3zlECgE7-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202412081856.3zlECgE7-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) drivers/net/ethernet/mucse/rnpm/rnpm_lib.c: note: in included file (through include/linux/string.h, include/linux/uuid.h, include/linux/mod_devicetable.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/net/ethernet/mucse/rnpm/rnpm_lib.c: note: in included file (through include/linux/kernel.h, include/asm-generic/bug.h, arch/x86/include/asm/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/net/ethernet/mucse/rnpm/rnpm_lib.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/asm-generic/bug.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:389:9: sparse: sparse: incompatible types in conditional expression (different types):
drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:389:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:389:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:747:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:747:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_lib.c:747:9: sparse: void * -- drivers/net/ethernet/mucse/rnpm/rnpm_main.c: note: in included file (through include/linux/kernel.h, include/linux/list.h, include/linux/module.h): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/net/ethernet/mucse/rnpm/rnpm_main.c: note: in included file (through include/linux/printk.h, include/linux/kernel.h, include/linux/list.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/net/ethernet/mucse/rnpm/rnpm_main.c: note: in included file (through include/linux/string.h, include/linux/bitmap.h, include/linux/cpumask.h, ...): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type drivers/net/ethernet/mucse/rnpm/rnpm_main.c: note: in included file (through include/linux/filter.h, include/net/sock.h, include/linux/tcp.h): /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: Expected ) in function call /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:44: sparse: sparse: got < /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:43: sparse: sparse: not a function <noident> /opt/cross/clang-ab51eccf88/lib/clang/19/include/stdarg.h:22:22: sparse: sparse: bad constant expression type
drivers/net/ethernet/mucse/rnpm/rnpm_main.c:296:9: sparse: sparse: incompatible types in conditional expression (different types):
drivers/net/ethernet/mucse/rnpm/rnpm_main.c:296:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:296:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2845:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2845:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2845:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2950:17: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2950:17: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2950:17: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4748:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4748:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4748:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4847:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4847:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:4847:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5069:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5069:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5069:9: sparse: void * drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5143:9: sparse: sparse: incompatible types in conditional expression (different types): drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5143:9: sparse: void drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5143:9: sparse: void *
vim +389 drivers/net/ethernet/mucse/rnpm/rnpm_lib.c
363 364 /** 365 * rnpm_alloc_q_vector - Allocate memory for a single interrupt vector 366 * @adapter: board private structure to initialize 367 * @v_count: q_vectors allocated on adapter, used for ring interleaving 368 * @v_idx: index of vector in adapter struct 369 * @txr_count: total number of Tx rings to allocate 370 * @txr_idx: index of first Tx ring to allocate 371 * @rxr_count: total number of Rx rings to allocate 372 * @rxr_idx: index of first Rx ring to allocate 373 * 374 * We allocate one q_vector. If allocation fails we return -ENOMEM. 375 **/ 376 static int rnpm_alloc_q_vector(struct rnpm_adapter *adapter, int eth_queue_idx, 377 int v_idx, int r_idx, int r_count, int step) 378 { 379 struct rnpm_q_vector *q_vector; 380 struct rnpm_ring *ring; 381 struct rnpm_hw *hw = &adapter->hw; 382 int node = NUMA_NO_NODE; 383 int cpu = -1; 384 int ring_count, size; 385 int txr_count, rxr_count, idx; 386 int rxr_idx = r_idx, txr_idx = r_idx; 387 // u8 tcs = netdev_get_num_tc(adapter->netdev); 388
389 DPRINTK(PROBE, INFO,
390 "eth_queue_idx:%d v_idx:%d(off:%d) ring:%d ring_cnt:%d step:%d\n", 391 eth_queue_idx, v_idx, adapter->vector_off, r_idx, r_count, 392 step); 393 394 txr_count = rxr_count = r_count; 395 396 ring_count = txr_count + rxr_count; 397 398 /* alloc ring memory together with q_vector */ 399 size = sizeof(struct rnpm_q_vector) + 400 (sizeof(struct rnpm_ring) * ring_count); 401 402 /* should minis adapter->vector_off */ 403 if (cpu_online(v_idx - adapter->vector_off)) { 404 /* cpu 1 - 7 */ 405 //cpu = 1 + v_idx - adapter->vector_off; 406 cpu = v_idx - adapter->vector_off; 407 node = cpu_to_node(cpu); 408 } 409 410 /* allocate q_vector and rings */ 411 q_vector = kzalloc_node(size, GFP_KERNEL, node); 412 if (!q_vector) 413 q_vector = kzalloc(size, GFP_KERNEL); 414 if (!q_vector) 415 return -ENOMEM; 416 417 cpumask_copy(&q_vector->affinity_mask, cpu_possible_mask); 418 /* setup affinity mask and node */ 419 q_vector->numa_node = node; 420 421 /* initialize timer */ 422 q_vector->irq_check_usecs = RNPM_IRQ_CHECK_USEC; 423 //q_vector->new_rx_count = RNPM_PKT_TIMEOUT; 424 //q_vector->old_rx_count = RNPM_PKT_TIMEOUT; 425 426 hrtimer_init(&q_vector->irq_miss_check_timer, CLOCK_MONOTONIC, 427 HRTIMER_MODE_REL_PINNED); 428 q_vector->irq_miss_check_timer.function = irq_miss_check; 429 430 /* initialize NAPI */ 431 netif_napi_add(adapter->netdev, &q_vector->napi, rnpm_poll, 432 adapter->napi_budge); 433 434 /* tie q_vector and adapter together */ 435 adapter->q_vector[v_idx - adapter->vector_off] = q_vector; 436 q_vector->adapter = adapter; 437 /* this indicate vector table */ 438 q_vector->v_idx = v_idx; 439 440 /* initialize work limits */ 441 q_vector->tx.work_limit = adapter->tx_work_limit; 442 443 q_vector->rx.itr = q_vector->itr = adapter->rx_frames; 444 #ifdef CONFIG_HZ 445 q_vector->factor = DIV_ROUND_UP(1000, CONFIG_HZ); 446 #else 447 q_vector->factor = 1; 448 #endif 449 450 /* initialize pointer to rings */ 451 ring = q_vector->ring; 452 453 for (idx = 0; idx < txr_count; idx++) { 454 /* assign generic ring traits */ 455 ring->dev = &adapter->pdev->dev; 456 ring->netdev = adapter->netdev; 457 458 /* configure backlink on ring */ 459 ring->q_vector = q_vector; 460 461 /* update q_vector Tx values */ 462 rnpm_add_ring(ring, &q_vector->tx); 463 464 /* apply Tx specific ring traits */ 465 ring->count = adapter->tx_ring_item_count; 466 ring->queue_index = eth_queue_idx + idx; 467 468 /* rnpm_queue_idx can be changed after */ 469 /* it is used to location hw reg */ 470 ring->rnpm_queue_idx = txr_idx; 471 ring->dma_int_stat = 472 hw->hw_addr + RNPM_DMA_INT_STAT(ring->rnpm_queue_idx); 473 ring->dma_int_mask = ring->dma_int_stat + 4; 474 ring->dma_int_clr = ring->dma_int_stat + 8; 475 ring->device_id = adapter->pdev->device; 476 ring->pfvfnum = hw->pfvfnum; 477 478 /* assign ring to adapter */ 479 adapter->tx_ring[ring->queue_index] = ring; 480 481 /* update count and index */ 482 txr_idx += step; 483 484 rnpm_dbg("\t\t%s:vector[%d] <--RNPM TxRing:%d, eth_queue:%d\n", 485 adapter->netdev->name, v_idx, ring->rnpm_queue_idx, 486 ring->queue_index); 487 488 /* push pointer to next ring */ 489 ring++; 490 } 491 492 for (idx = 0; idx < rxr_count; idx++) { 493 /* assign generic ring traits */ 494 ring->dev = &adapter->pdev->dev; 495 ring->netdev = adapter->netdev; 496 497 /* configure backlink on ring */ 498 ring->q_vector = q_vector; 499 500 /* update q_vector Rx values */ 501 rnpm_add_ring(ring, &q_vector->rx); 502 503 /* apply Rx specific ring traits */ 504 ring->count = adapter->rx_ring_item_count; 505 /* rnpm_queue_idx can be changed after */ 506 /* it is used to location hw reg */ 507 ring->queue_index = eth_queue_idx + idx; 508 ring->rnpm_queue_idx = rxr_idx; 509 ring->dma_int_stat = 510 hw->hw_addr + RNPM_DMA_INT_STAT(ring->rnpm_queue_idx); 511 ring->dma_int_mask = ring->dma_int_stat + 4; 512 ring->dma_int_clr = ring->dma_int_stat + 8; 513 ring->device_id = adapter->pdev->device; 514 ring->pfvfnum = hw->pfvfnum; 515 516 /* assign ring to adapter */ 517 adapter->rx_ring[ring->queue_index] = ring; 518 rnpm_dbg("\t\t%s:vector[%d] <--RNPM RxRing:%d, eth_queue:%d\n", 519 adapter->netdev->name, v_idx, ring->rnpm_queue_idx, 520 ring->queue_index); 521 522 /* update count and index */ 523 rxr_idx += step; 524 525 /* push pointer to next ring */ 526 ring++; 527 } 528 529 return 0; 530 } 531