[kvalo-ath:pending 53/57] drivers/net/wireless/ath/ath10k/core.c:2689:11: error: implicit declaration of function 'ath10k_coredump_get_hw_mem_layout'; did you mean 'ath10k_coredump_get_mem_layout'?

kernel test robot lkp at intel.com
Thu Oct 7 01:07:52 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head:   e658ceaa2a194c73c4fdc4dbaef873f06d1424b9
commit: 22e486a609f4dc381e88058d292d6d33117cc2bf [53/57] ath10k: Fix device boot error
config: i386-randconfig-a014-20211004 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=22e486a609f4dc381e88058d292d6d33117cc2bf
        git remote add kvalo-ath https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
        git fetch --no-tags kvalo-ath pending
        git checkout 22e486a609f4dc381e88058d292d6d33117cc2bf
        # 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 at intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_copy_target_iram':
>> drivers/net/wireless/ath/ath10k/core.c:2689:11: error: implicit declaration of function 'ath10k_coredump_get_hw_mem_layout'; did you mean 'ath10k_coredump_get_mem_layout'? [-Werror=implicit-function-declaration]
    2689 |  hw_mem = ath10k_coredump_get_hw_mem_layout(ar);
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |           ath10k_coredump_get_mem_layout
>> drivers/net/wireless/ath/ath10k/core.c:2689:9: warning: assignment to 'const struct ath10k_hw_mem_layout *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2689 |  hw_mem = ath10k_coredump_get_hw_mem_layout(ar);
         |         ^
   cc1: some warnings being treated as errors


vim +2689 drivers/net/wireless/ath/ath10k/core.c

  2678	
  2679	static int ath10k_core_copy_target_iram(struct ath10k *ar)
  2680	{
  2681		const struct ath10k_hw_mem_layout *hw_mem;
  2682		const struct ath10k_mem_region *tmp, *mem_region = NULL;
  2683		dma_addr_t paddr;
  2684		void *vaddr = NULL;
  2685		u8 num_read_itr;
  2686		int i, ret;
  2687		u32 len, remaining_len;
  2688	
> 2689		hw_mem = ath10k_coredump_get_hw_mem_layout(ar);
  2690		if (!hw_mem)
  2691			return -ENOMEM;
  2692	
  2693		for (i = 0; i < hw_mem->region_table.size; i++) {
  2694			tmp = &hw_mem->region_table.regions[i];
  2695			if (tmp->type == ATH10K_MEM_REGION_TYPE_REG) {
  2696				mem_region = tmp;
  2697				break;
  2698			}
  2699		}
  2700	
  2701		if (!mem_region)
  2702			return -ENOMEM;
  2703	
  2704		for (i = 0; i < ar->wmi.num_mem_chunks; i++) {
  2705			if (ar->wmi.mem_chunks[i].req_id ==
  2706			    WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID) {
  2707				vaddr = ar->wmi.mem_chunks[i].vaddr;
  2708				len = ar->wmi.mem_chunks[i].len;
  2709				break;
  2710			}
  2711		}
  2712	
  2713		if (!vaddr || !len) {
  2714			ath10k_warn(ar, "No allocated memory for IRAM back up");
  2715			return -ENOMEM;
  2716		}
  2717	
  2718		len = (len < mem_region->len) ? len : mem_region->len;
  2719		paddr = mem_region->start;
  2720		num_read_itr = len / TGT_IRAM_READ_PER_ITR;
  2721		remaining_len = len % TGT_IRAM_READ_PER_ITR;
  2722		for (i = 0; i < num_read_itr; i++) {
  2723			ret = ath10k_hif_diag_read(ar, paddr, vaddr,
  2724						   TGT_IRAM_READ_PER_ITR);
  2725			if (ret) {
  2726				ath10k_warn(ar, "failed to copy firmware IRAM contents: %d",
  2727					    ret);
  2728				return ret;
  2729			}
  2730	
  2731			paddr += TGT_IRAM_READ_PER_ITR;
  2732			vaddr += TGT_IRAM_READ_PER_ITR;
  2733		}
  2734	
  2735		if (remaining_len) {
  2736			ret = ath10k_hif_diag_read(ar, paddr, vaddr, remaining_len);
  2737			if (ret) {
  2738				ath10k_warn(ar, "failed to copy firmware IRAM contents: %d",
  2739					    ret);
  2740				return ret;
  2741			}
  2742		}
  2743	
  2744		ath10k_dbg(ar, ATH10K_DBG_BOOT, "target IRAM back up completed\n");
  2745	
  2746		return 0;
  2747	}
  2748	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38732 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/ath10k/attachments/20211007/f41e3e9a/attachment-0001.gz>


More information about the ath10k mailing list