[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202105020741.3JbazS7u-lkp@intel.com>
Date: Sun, 2 May 2021 07:13:47 +0800
From: kernel test robot <lkp@...el.com>
To: Carl Huang <cjhuang@...eaurora.org>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org, Kalle Valo <kvalo@...eaurora.org>
Subject: drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to
smaller integer type 'enum ath11k_hw_rev' from 'const void *'
Hi Carl,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 10a3efd0fee5e881b1866cf45950808575cb0f24
commit: 322b60ceb0f321b4b9c41717f7306c0dbaf0279b ath11k: do not depend on ARCH_QCOM for ath11k
date: 9 months ago
config: x86_64-randconfig-a006-20210502 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=322b60ceb0f321b4b9c41717f7306c0dbaf0279b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 322b60ceb0f321b4b9c41717f7306c0dbaf0279b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void *' [-Wvoid-pointer-to-enum-cast]
ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +938 drivers/net/wireless/ath/ath11k/ahb.c
31858805f91ac7 Govind Singh 2020-05-08 903
d5c65159f28953 Kalle Valo 2019-11-23 904 static int ath11k_ahb_probe(struct platform_device *pdev)
d5c65159f28953 Kalle Valo 2019-11-23 905 {
d5c65159f28953 Kalle Valo 2019-11-23 906 struct ath11k_base *ab;
d5c65159f28953 Kalle Valo 2019-11-23 907 const struct of_device_id *of_id;
d5c65159f28953 Kalle Valo 2019-11-23 908 struct resource *mem_res;
d5c65159f28953 Kalle Valo 2019-11-23 909 void __iomem *mem;
d5c65159f28953 Kalle Valo 2019-11-23 910 int ret;
d5c65159f28953 Kalle Valo 2019-11-23 911
d5c65159f28953 Kalle Valo 2019-11-23 912 of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
d5c65159f28953 Kalle Valo 2019-11-23 913 if (!of_id) {
d5c65159f28953 Kalle Valo 2019-11-23 914 dev_err(&pdev->dev, "failed to find matching device tree id\n");
d5c65159f28953 Kalle Valo 2019-11-23 915 return -EINVAL;
d5c65159f28953 Kalle Valo 2019-11-23 916 }
d5c65159f28953 Kalle Valo 2019-11-23 917
c8ffcd12276061 Wei Yongjun 2020-05-08 918 mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 919 if (IS_ERR(mem)) {
d5c65159f28953 Kalle Valo 2019-11-23 920 dev_err(&pdev->dev, "ioremap error\n");
d5c65159f28953 Kalle Valo 2019-11-23 921 return PTR_ERR(mem);
d5c65159f28953 Kalle Valo 2019-11-23 922 }
d5c65159f28953 Kalle Valo 2019-11-23 923
d5c65159f28953 Kalle Valo 2019-11-23 924 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
d5c65159f28953 Kalle Valo 2019-11-23 925 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 926 dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
d5c65159f28953 Kalle Valo 2019-11-23 927 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 928 }
d5c65159f28953 Kalle Valo 2019-11-23 929
630ad41c195c70 Govind Singh 2020-05-08 930 ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
d5c65159f28953 Kalle Valo 2019-11-23 931 if (!ab) {
d5c65159f28953 Kalle Valo 2019-11-23 932 dev_err(&pdev->dev, "failed to allocate ath11k base\n");
d5c65159f28953 Kalle Valo 2019-11-23 933 return -ENOMEM;
d5c65159f28953 Kalle Valo 2019-11-23 934 }
d5c65159f28953 Kalle Valo 2019-11-23 935
31858805f91ac7 Govind Singh 2020-05-08 936 ab->hif.ops = &ath11k_ahb_hif_ops;
d5c65159f28953 Kalle Valo 2019-11-23 937 ab->pdev = pdev;
d5c65159f28953 Kalle Valo 2019-11-23 @938 ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
d5c65159f28953 Kalle Valo 2019-11-23 939 ab->mem = mem;
d5c65159f28953 Kalle Valo 2019-11-23 940 ab->mem_len = resource_size(mem_res);
d5c65159f28953 Kalle Valo 2019-11-23 941 platform_set_drvdata(pdev, ab);
d5c65159f28953 Kalle Valo 2019-11-23 942
d5c65159f28953 Kalle Valo 2019-11-23 943 ret = ath11k_hal_srng_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 944 if (ret)
d5c65159f28953 Kalle Valo 2019-11-23 945 goto err_core_free;
d5c65159f28953 Kalle Valo 2019-11-23 946
d5c65159f28953 Kalle Valo 2019-11-23 947 ret = ath11k_ce_alloc_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 948 if (ret) {
d5c65159f28953 Kalle Valo 2019-11-23 949 ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 950 goto err_hal_srng_deinit;
d5c65159f28953 Kalle Valo 2019-11-23 951 }
d5c65159f28953 Kalle Valo 2019-11-23 952
d5c65159f28953 Kalle Valo 2019-11-23 953 ath11k_ahb_init_qmi_ce_config(ab);
d5c65159f28953 Kalle Valo 2019-11-23 954
166e22b38aa3bc Anilkumar Kolli 2020-06-16 955 ret = ath11k_core_init(ab);
d5c65159f28953 Kalle Valo 2019-11-23 956 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 957 ath11k_err(ab, "failed to init core: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 958 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 959 }
d5c65159f28953 Kalle Valo 2019-11-23 960
166e22b38aa3bc Anilkumar Kolli 2020-06-16 961 ret = ath11k_ahb_config_irq(ab);
d5c65159f28953 Kalle Valo 2019-11-23 962 if (ret) {
166e22b38aa3bc Anilkumar Kolli 2020-06-16 963 ath11k_err(ab, "failed to configure irq: %d\n", ret);
d5c65159f28953 Kalle Valo 2019-11-23 964 goto err_ce_free;
d5c65159f28953 Kalle Valo 2019-11-23 965 }
d5c65159f28953 Kalle Valo 2019-11-23 966
d5c65159f28953 Kalle Valo 2019-11-23 967 return 0;
d5c65159f28953 Kalle Valo 2019-11-23 968
d5c65159f28953 Kalle Valo 2019-11-23 969 err_ce_free:
d5c65159f28953 Kalle Valo 2019-11-23 970 ath11k_ce_free_pipes(ab);
d5c65159f28953 Kalle Valo 2019-11-23 971
d5c65159f28953 Kalle Valo 2019-11-23 972 err_hal_srng_deinit:
d5c65159f28953 Kalle Valo 2019-11-23 973 ath11k_hal_srng_deinit(ab);
d5c65159f28953 Kalle Valo 2019-11-23 974
d5c65159f28953 Kalle Valo 2019-11-23 975 err_core_free:
d5c65159f28953 Kalle Valo 2019-11-23 976 ath11k_core_free(ab);
d5c65159f28953 Kalle Valo 2019-11-23 977 platform_set_drvdata(pdev, NULL);
d5c65159f28953 Kalle Valo 2019-11-23 978
d5c65159f28953 Kalle Valo 2019-11-23 979 return ret;
d5c65159f28953 Kalle Valo 2019-11-23 980 }
d5c65159f28953 Kalle Valo 2019-11-23 981
:::::: The code at line 938 was first introduced by commit
:::::: d5c65159f2895379e11ca13f62feabe93278985d ath11k: driver for Qualcomm IEEE 802.11ax devices
:::::: TO: Kalle Valo <kvalo@...eaurora.org>
:::::: CC: Kalle Valo <kvalo@...eaurora.org>
---
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" (35058 bytes)
Powered by blists - more mailing lists