tree: https://github.com/ammarfaizi2/linux-block kvalo/ath/pending head: 84730e8a58684fbe42373b9d8aba7e88f2bb0396 commit: d889913205cf7ebda905b1e62c5867ed4e39f6c2 [18/27] wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices config: i386-allmodconfig compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/ammarfaizi2/linux-block/commit/d889913205cf7ebda905b1e62c5867ed4e39f6c2 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block kvalo/ath/pending git checkout d889913205cf7ebda905b1e62c5867ed4e39f6c2 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/mellanox/mlx5/core/ drivers/net/wireless/ath/ath12k/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/net/wireless/ath/ath12k/mac.c:1076:8: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (!ar->monitor_vdev_created) ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/mac.c:1087:9: note: uninitialized use occurs here return ret; ^~~ drivers/net/wireless/ath/ath12k/mac.c:1076:4: note: remove the 'if' if its condition is always false if (!ar->monitor_vdev_created) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/mac.c:1067:8: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (ar->monitor_vdev_created) ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/mac.c:1087:9: note: uninitialized use occurs here return ret; ^~~ drivers/net/wireless/ath/ath12k/mac.c:1067:4: note: remove the 'if' if its condition is always false if (ar->monitor_vdev_created) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/wireless/ath/ath12k/mac.c:1064:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (changed & IEEE80211_CONF_CHANGE_MONITOR) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/mac.c:1087:9: note: uninitialized use occurs here return ret; ^~~ drivers/net/wireless/ath/ath12k/mac.c:1064:2: note: remove the 'if' if its condition is always true if (changed & IEEE80211_CONF_CHANGE_MONITOR) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/mac.c:1060:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 3 warnings generated. -- >> drivers/net/wireless/ath/ath12k/dp_rx.c:2690:34: warning: variable 'i' is uninitialized when used here [-Wuninitialized] ath12k_dp_rx_bufs_replenish(ab, i, rx_ring, num_buffs_reaped, ^ drivers/net/wireless/ath/ath12k/dp_rx.c:2585:7: note: initialize the variable 'i' to silence this warning int i; ^ = 0 1 warning generated. -- >> drivers/net/wireless/ath/ath12k/dbring.c:272:7: warning: variable 'ring' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case WMI_DIRECT_BUF_SPECTRAL: ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/dbring.c:281:7: note: uninitialized use occurs here if (!ring) { ^~~~ drivers/net/wireless/ath/ath12k/dbring.c:233:28: note: initialize the variable 'ring' to silence this warning struct ath12k_dbring *ring; ^ = NULL 1 warning generated. -- drivers/net/wireless/ath/ath12k/dp_mon.c:623:3: warning: array index 6 is past the end of the array (which contains 6 elements) [-Warray-bounds] info[6] = __le32_to_cpu(eu_stats->info6); ^ ~ drivers/net/wireless/ath/ath12k/dp_mon.c:591:2: note: array 'info' declared here u32 info[6]; ^ drivers/net/wireless/ath/ath12k/dp_mon.c:630:21: warning: array index 6 is past the end of the array (which contains 6 elements) [-Warray-bounds] ffs(u32_get_bits(info[6], ^ ~ arch/x86/include/asm/bitops.h:346:38: note: expanded from macro 'ffs' #define ffs(x) (__builtin_constant_p(x) ? __builtin_ffs(x) : variable_ffs(x)) ^ drivers/net/wireless/ath/ath12k/dp_mon.c:591:2: note: array 'info' declared here u32 info[6]; ^ drivers/net/wireless/ath/ath12k/dp_mon.c:630:21: warning: array index 6 is past the end of the array (which contains 6 elements) [-Warray-bounds] ffs(u32_get_bits(info[6], ^ ~ arch/x86/include/asm/bitops.h:346:75: note: expanded from macro 'ffs' #define ffs(x) (__builtin_constant_p(x) ? __builtin_ffs(x) : variable_ffs(x)) ^ drivers/net/wireless/ath/ath12k/dp_mon.c:591:2: note: array 'info' declared here u32 info[6]; ^ >> drivers/net/wireless/ath/ath12k/dp_mon.c:2138:18: warning: variable 'rx_buf_sz' is uninitialized when used here [-Wuninitialized] log_type, rx_buf_sz); ^~~~~~~~~ drivers/net/wireless/ath/ath12k/dp_mon.c:2079:15: note: initialize the variable 'rx_buf_sz' to silence this warning u32 rx_buf_sz; ^ = 0 4 warnings generated. vim +/i +2690 drivers/net/wireless/ath/ath12k/dp_rx.c 2569 2570 int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id, 2571 struct napi_struct *napi, int budget) 2572 { 2573 struct ath12k_rx_desc_info *desc_info; 2574 struct ath12k_dp *dp = &ab->dp; 2575 struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring; 2576 struct hal_reo_dest_ring *desc; 2577 int num_buffs_reaped = 0; 2578 struct sk_buff_head msdu_list; 2579 struct ath12k_skb_rxcb *rxcb; 2580 int total_msdu_reaped = 0; 2581 struct hal_srng *srng; 2582 struct sk_buff *msdu; 2583 bool done = false; 2584 int mac_id; 2585 int i; 2586 u64 desc_va; 2587 2588 __skb_queue_head_init(&msdu_list); 2589 2590 srng = &ab->hal.srng_list[dp->reo_dst_ring[ring_id].ring_id]; 2591 2592 spin_lock_bh(&srng->lock); 2593 2594 try_again: 2595 ath12k_hal_srng_access_begin(ab, srng); 2596 2597 while ((desc = ath12k_hal_srng_dst_get_next_entry(ab, srng))) { 2598 enum hal_reo_dest_ring_push_reason push_reason; 2599 u32 cookie; 2600 2601 cookie = le32_get_bits(desc->buf_addr_info.info1, 2602 BUFFER_ADDR_INFO1_SW_COOKIE); 2603 2604 mac_id = le32_get_bits(desc->info0, 2605 HAL_REO_DEST_RING_INFO0_SRC_LINK_ID); 2606 2607 desc_va = ((u64)le32_to_cpu(desc->buf_va_hi) << 32 | 2608 le32_to_cpu(desc->buf_va_lo)); 2609 desc_info = (struct ath12k_rx_desc_info *)((unsigned long)desc_va); 2610 2611 /* retry manual desc retrieval */ 2612 if (!desc_info) { 2613 desc_info = ath12k_dp_get_rx_desc(ab, cookie); 2614 if (!desc_info) { 2615 ath12k_warn(ab, "Invalid cookie in manual desc retrival"); 2616 continue; 2617 } 2618 } 2619 2620 if (desc_info->magic != ATH12K_DP_RX_DESC_MAGIC) 2621 ath12k_warn(ab, "Check HW CC implementation"); 2622 2623 msdu = desc_info->skb; 2624 desc_info->skb = NULL; 2625 2626 spin_lock_bh(&dp->rx_desc_lock); 2627 list_move_tail(&desc_info->list, &dp->rx_desc_free_list); 2628 spin_unlock_bh(&dp->rx_desc_lock); 2629 2630 rxcb = ATH12K_SKB_RXCB(msdu); 2631 dma_unmap_single(ab->dev, rxcb->paddr, 2632 msdu->len + skb_tailroom(msdu), 2633 DMA_FROM_DEVICE); 2634 2635 num_buffs_reaped++; 2636 2637 push_reason = le32_get_bits(desc->info0, 2638 HAL_REO_DEST_RING_INFO0_PUSH_REASON); 2639 if (push_reason != 2640 HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION) { 2641 dev_kfree_skb_any(msdu); 2642 ab->soc_stats.hal_reo_error[dp->reo_dst_ring[ring_id].ring_id]++; 2643 continue; 2644 } 2645 2646 rxcb->is_first_msdu = !!(le32_to_cpu(desc->rx_msdu_info.info0) & 2647 RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU); 2648 rxcb->is_last_msdu = !!(le32_to_cpu(desc->rx_msdu_info.info0) & 2649 RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU); 2650 rxcb->is_continuation = !!(le32_to_cpu(desc->rx_msdu_info.info0) & 2651 RX_MSDU_DESC_INFO0_MSDU_CONTINUATION); 2652 rxcb->mac_id = mac_id; 2653 rxcb->peer_id = le32_get_bits(desc->rx_mpdu_info.peer_meta_data, 2654 RX_MPDU_DESC_META_DATA_PEER_ID); 2655 rxcb->tid = le32_get_bits(desc->rx_mpdu_info.info0, 2656 RX_MPDU_DESC_INFO0_TID); 2657 2658 __skb_queue_tail(&msdu_list, msdu); 2659 2660 if (!rxcb->is_continuation) { 2661 total_msdu_reaped++; 2662 done = true; 2663 } else { 2664 done = false; 2665 } 2666 2667 if (total_msdu_reaped >= budget) 2668 break; 2669 } 2670 2671 /* Hw might have updated the head pointer after we cached it. 2672 * In this case, even though there are entries in the ring we'll 2673 * get rx_desc NULL. Give the read another try with updated cached 2674 * head pointer so that we can reap complete MPDU in the current 2675 * rx processing. 2676 */ 2677 if (!done && ath12k_hal_srng_dst_num_free(ab, srng, true)) { 2678 ath12k_hal_srng_access_end(ab, srng); 2679 goto try_again; 2680 } 2681 2682 ath12k_hal_srng_access_end(ab, srng); 2683 2684 spin_unlock_bh(&srng->lock); 2685 2686 if (!total_msdu_reaped) 2687 goto exit; 2688 2689 /* TODO: Move to implicit BM? */ > 2690 ath12k_dp_rx_bufs_replenish(ab, i, rx_ring, num_buffs_reaped, 2691 ab->hw_params->hal_params->rx_buf_rbm, true); 2692 2693 ath12k_dp_rx_process_received_packets(ab, napi, &msdu_list, 2694 ring_id); 2695 2696 exit: 2697 return total_msdu_reaped; 2698 } 2699 -- 0-DAY CI Kernel Test Service https://01.org/lkp