All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Carl Huang <cjhuang@codeaurora.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>
Subject: drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void
Date: Sun, 27 Dec 2020 02:42:49 +0800	[thread overview]
Message-ID: <202012270241.goAjPPmY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7625 bytes --]

Hi Carl,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   40f78232f97344afbbeb5b0008615f17c4b93466
commit: 322b60ceb0f321b4b9c41717f7306c0dbaf0279b ath11k: do not depend on ARCH_QCOM for ath11k
date:   4 months ago
config: x86_64-randconfig-a014-20201227 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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

31858805f91ac79 Govind Singh    2020-05-08  903  
d5c65159f289537 Kalle Valo      2019-11-23  904  static int ath11k_ahb_probe(struct platform_device *pdev)
d5c65159f289537 Kalle Valo      2019-11-23  905  {
d5c65159f289537 Kalle Valo      2019-11-23  906  	struct ath11k_base *ab;
d5c65159f289537 Kalle Valo      2019-11-23  907  	const struct of_device_id *of_id;
d5c65159f289537 Kalle Valo      2019-11-23  908  	struct resource *mem_res;
d5c65159f289537 Kalle Valo      2019-11-23  909  	void __iomem *mem;
d5c65159f289537 Kalle Valo      2019-11-23  910  	int ret;
d5c65159f289537 Kalle Valo      2019-11-23  911  
d5c65159f289537 Kalle Valo      2019-11-23  912  	of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
d5c65159f289537 Kalle Valo      2019-11-23  913  	if (!of_id) {
d5c65159f289537 Kalle Valo      2019-11-23  914  		dev_err(&pdev->dev, "failed to find matching device tree id\n");
d5c65159f289537 Kalle Valo      2019-11-23  915  		return -EINVAL;
d5c65159f289537 Kalle Valo      2019-11-23  916  	}
d5c65159f289537 Kalle Valo      2019-11-23  917  
c8ffcd122760612 Wei Yongjun     2020-05-08  918  	mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
d5c65159f289537 Kalle Valo      2019-11-23  919  	if (IS_ERR(mem)) {
d5c65159f289537 Kalle Valo      2019-11-23  920  		dev_err(&pdev->dev, "ioremap error\n");
d5c65159f289537 Kalle Valo      2019-11-23  921  		return PTR_ERR(mem);
d5c65159f289537 Kalle Valo      2019-11-23  922  	}
d5c65159f289537 Kalle Valo      2019-11-23  923  
d5c65159f289537 Kalle Valo      2019-11-23  924  	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
d5c65159f289537 Kalle Valo      2019-11-23  925  	if (ret) {
d5c65159f289537 Kalle Valo      2019-11-23  926  		dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
d5c65159f289537 Kalle Valo      2019-11-23  927  		return ret;
d5c65159f289537 Kalle Valo      2019-11-23  928  	}
d5c65159f289537 Kalle Valo      2019-11-23  929  
630ad41c195c706 Govind Singh    2020-05-08  930  	ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
d5c65159f289537 Kalle Valo      2019-11-23  931  	if (!ab) {
d5c65159f289537 Kalle Valo      2019-11-23  932  		dev_err(&pdev->dev, "failed to allocate ath11k base\n");
d5c65159f289537 Kalle Valo      2019-11-23  933  		return -ENOMEM;
d5c65159f289537 Kalle Valo      2019-11-23  934  	}
d5c65159f289537 Kalle Valo      2019-11-23  935  
31858805f91ac79 Govind Singh    2020-05-08  936  	ab->hif.ops = &ath11k_ahb_hif_ops;
d5c65159f289537 Kalle Valo      2019-11-23  937  	ab->pdev = pdev;
d5c65159f289537 Kalle Valo      2019-11-23 @938  	ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
d5c65159f289537 Kalle Valo      2019-11-23  939  	ab->mem = mem;
d5c65159f289537 Kalle Valo      2019-11-23  940  	ab->mem_len = resource_size(mem_res);
d5c65159f289537 Kalle Valo      2019-11-23  941  	platform_set_drvdata(pdev, ab);
d5c65159f289537 Kalle Valo      2019-11-23  942  
d5c65159f289537 Kalle Valo      2019-11-23  943  	ret = ath11k_hal_srng_init(ab);
d5c65159f289537 Kalle Valo      2019-11-23  944  	if (ret)
d5c65159f289537 Kalle Valo      2019-11-23  945  		goto err_core_free;
d5c65159f289537 Kalle Valo      2019-11-23  946  
d5c65159f289537 Kalle Valo      2019-11-23  947  	ret = ath11k_ce_alloc_pipes(ab);
d5c65159f289537 Kalle Valo      2019-11-23  948  	if (ret) {
d5c65159f289537 Kalle Valo      2019-11-23  949  		ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  950  		goto err_hal_srng_deinit;
d5c65159f289537 Kalle Valo      2019-11-23  951  	}
d5c65159f289537 Kalle Valo      2019-11-23  952  
d5c65159f289537 Kalle Valo      2019-11-23  953  	ath11k_ahb_init_qmi_ce_config(ab);
d5c65159f289537 Kalle Valo      2019-11-23  954  
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  955  	ret = ath11k_core_init(ab);
d5c65159f289537 Kalle Valo      2019-11-23  956  	if (ret) {
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  957  		ath11k_err(ab, "failed to init core: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  958  		goto err_ce_free;
d5c65159f289537 Kalle Valo      2019-11-23  959  	}
d5c65159f289537 Kalle Valo      2019-11-23  960  
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  961  	ret = ath11k_ahb_config_irq(ab);
d5c65159f289537 Kalle Valo      2019-11-23  962  	if (ret) {
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  963  		ath11k_err(ab, "failed to configure irq: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  964  		goto err_ce_free;
d5c65159f289537 Kalle Valo      2019-11-23  965  	}
d5c65159f289537 Kalle Valo      2019-11-23  966  
d5c65159f289537 Kalle Valo      2019-11-23  967  	return 0;
d5c65159f289537 Kalle Valo      2019-11-23  968  
d5c65159f289537 Kalle Valo      2019-11-23  969  err_ce_free:
d5c65159f289537 Kalle Valo      2019-11-23  970  	ath11k_ce_free_pipes(ab);
d5c65159f289537 Kalle Valo      2019-11-23  971  
d5c65159f289537 Kalle Valo      2019-11-23  972  err_hal_srng_deinit:
d5c65159f289537 Kalle Valo      2019-11-23  973  	ath11k_hal_srng_deinit(ab);
d5c65159f289537 Kalle Valo      2019-11-23  974  
d5c65159f289537 Kalle Valo      2019-11-23  975  err_core_free:
d5c65159f289537 Kalle Valo      2019-11-23  976  	ath11k_core_free(ab);
d5c65159f289537 Kalle Valo      2019-11-23  977  	platform_set_drvdata(pdev, NULL);
d5c65159f289537 Kalle Valo      2019-11-23  978  
d5c65159f289537 Kalle Valo      2019-11-23  979  	return ret;
d5c65159f289537 Kalle Valo      2019-11-23  980  }
d5c65159f289537 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@codeaurora.org>
:::::: CC: Kalle Valo <kvalo@codeaurora.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40513 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void
Date: Sun, 27 Dec 2020 02:42:49 +0800	[thread overview]
Message-ID: <202012270241.goAjPPmY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7751 bytes --]

Hi Carl,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   40f78232f97344afbbeb5b0008615f17c4b93466
commit: 322b60ceb0f321b4b9c41717f7306c0dbaf0279b ath11k: do not depend on ARCH_QCOM for ath11k
date:   4 months ago
config: x86_64-randconfig-a014-20201227 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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

31858805f91ac79 Govind Singh    2020-05-08  903  
d5c65159f289537 Kalle Valo      2019-11-23  904  static int ath11k_ahb_probe(struct platform_device *pdev)
d5c65159f289537 Kalle Valo      2019-11-23  905  {
d5c65159f289537 Kalle Valo      2019-11-23  906  	struct ath11k_base *ab;
d5c65159f289537 Kalle Valo      2019-11-23  907  	const struct of_device_id *of_id;
d5c65159f289537 Kalle Valo      2019-11-23  908  	struct resource *mem_res;
d5c65159f289537 Kalle Valo      2019-11-23  909  	void __iomem *mem;
d5c65159f289537 Kalle Valo      2019-11-23  910  	int ret;
d5c65159f289537 Kalle Valo      2019-11-23  911  
d5c65159f289537 Kalle Valo      2019-11-23  912  	of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
d5c65159f289537 Kalle Valo      2019-11-23  913  	if (!of_id) {
d5c65159f289537 Kalle Valo      2019-11-23  914  		dev_err(&pdev->dev, "failed to find matching device tree id\n");
d5c65159f289537 Kalle Valo      2019-11-23  915  		return -EINVAL;
d5c65159f289537 Kalle Valo      2019-11-23  916  	}
d5c65159f289537 Kalle Valo      2019-11-23  917  
c8ffcd122760612 Wei Yongjun     2020-05-08  918  	mem = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
d5c65159f289537 Kalle Valo      2019-11-23  919  	if (IS_ERR(mem)) {
d5c65159f289537 Kalle Valo      2019-11-23  920  		dev_err(&pdev->dev, "ioremap error\n");
d5c65159f289537 Kalle Valo      2019-11-23  921  		return PTR_ERR(mem);
d5c65159f289537 Kalle Valo      2019-11-23  922  	}
d5c65159f289537 Kalle Valo      2019-11-23  923  
d5c65159f289537 Kalle Valo      2019-11-23  924  	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
d5c65159f289537 Kalle Valo      2019-11-23  925  	if (ret) {
d5c65159f289537 Kalle Valo      2019-11-23  926  		dev_err(&pdev->dev, "failed to set 32-bit consistent dma\n");
d5c65159f289537 Kalle Valo      2019-11-23  927  		return ret;
d5c65159f289537 Kalle Valo      2019-11-23  928  	}
d5c65159f289537 Kalle Valo      2019-11-23  929  
630ad41c195c706 Govind Singh    2020-05-08  930  	ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
d5c65159f289537 Kalle Valo      2019-11-23  931  	if (!ab) {
d5c65159f289537 Kalle Valo      2019-11-23  932  		dev_err(&pdev->dev, "failed to allocate ath11k base\n");
d5c65159f289537 Kalle Valo      2019-11-23  933  		return -ENOMEM;
d5c65159f289537 Kalle Valo      2019-11-23  934  	}
d5c65159f289537 Kalle Valo      2019-11-23  935  
31858805f91ac79 Govind Singh    2020-05-08  936  	ab->hif.ops = &ath11k_ahb_hif_ops;
d5c65159f289537 Kalle Valo      2019-11-23  937  	ab->pdev = pdev;
d5c65159f289537 Kalle Valo      2019-11-23 @938  	ab->hw_rev = (enum ath11k_hw_rev)of_id->data;
d5c65159f289537 Kalle Valo      2019-11-23  939  	ab->mem = mem;
d5c65159f289537 Kalle Valo      2019-11-23  940  	ab->mem_len = resource_size(mem_res);
d5c65159f289537 Kalle Valo      2019-11-23  941  	platform_set_drvdata(pdev, ab);
d5c65159f289537 Kalle Valo      2019-11-23  942  
d5c65159f289537 Kalle Valo      2019-11-23  943  	ret = ath11k_hal_srng_init(ab);
d5c65159f289537 Kalle Valo      2019-11-23  944  	if (ret)
d5c65159f289537 Kalle Valo      2019-11-23  945  		goto err_core_free;
d5c65159f289537 Kalle Valo      2019-11-23  946  
d5c65159f289537 Kalle Valo      2019-11-23  947  	ret = ath11k_ce_alloc_pipes(ab);
d5c65159f289537 Kalle Valo      2019-11-23  948  	if (ret) {
d5c65159f289537 Kalle Valo      2019-11-23  949  		ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  950  		goto err_hal_srng_deinit;
d5c65159f289537 Kalle Valo      2019-11-23  951  	}
d5c65159f289537 Kalle Valo      2019-11-23  952  
d5c65159f289537 Kalle Valo      2019-11-23  953  	ath11k_ahb_init_qmi_ce_config(ab);
d5c65159f289537 Kalle Valo      2019-11-23  954  
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  955  	ret = ath11k_core_init(ab);
d5c65159f289537 Kalle Valo      2019-11-23  956  	if (ret) {
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  957  		ath11k_err(ab, "failed to init core: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  958  		goto err_ce_free;
d5c65159f289537 Kalle Valo      2019-11-23  959  	}
d5c65159f289537 Kalle Valo      2019-11-23  960  
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  961  	ret = ath11k_ahb_config_irq(ab);
d5c65159f289537 Kalle Valo      2019-11-23  962  	if (ret) {
166e22b38aa3bcd Anilkumar Kolli 2020-06-16  963  		ath11k_err(ab, "failed to configure irq: %d\n", ret);
d5c65159f289537 Kalle Valo      2019-11-23  964  		goto err_ce_free;
d5c65159f289537 Kalle Valo      2019-11-23  965  	}
d5c65159f289537 Kalle Valo      2019-11-23  966  
d5c65159f289537 Kalle Valo      2019-11-23  967  	return 0;
d5c65159f289537 Kalle Valo      2019-11-23  968  
d5c65159f289537 Kalle Valo      2019-11-23  969  err_ce_free:
d5c65159f289537 Kalle Valo      2019-11-23  970  	ath11k_ce_free_pipes(ab);
d5c65159f289537 Kalle Valo      2019-11-23  971  
d5c65159f289537 Kalle Valo      2019-11-23  972  err_hal_srng_deinit:
d5c65159f289537 Kalle Valo      2019-11-23  973  	ath11k_hal_srng_deinit(ab);
d5c65159f289537 Kalle Valo      2019-11-23  974  
d5c65159f289537 Kalle Valo      2019-11-23  975  err_core_free:
d5c65159f289537 Kalle Valo      2019-11-23  976  	ath11k_core_free(ab);
d5c65159f289537 Kalle Valo      2019-11-23  977  	platform_set_drvdata(pdev, NULL);
d5c65159f289537 Kalle Valo      2019-11-23  978  
d5c65159f289537 Kalle Valo      2019-11-23  979  	return ret;
d5c65159f289537 Kalle Valo      2019-11-23  980  }
d5c65159f289537 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@codeaurora.org>
:::::: CC: Kalle Valo <kvalo@codeaurora.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40513 bytes --]

             reply	other threads:[~2020-12-26 18:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 18:42 kernel test robot [this message]
2020-12-26 18:42 ` drivers/net/wireless/ath/ath11k/ahb.c:938:15: warning: cast to smaller integer type 'enum ath11k_hw_rev' from 'const void kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-01-29  8:57 kernel test robot
2020-11-28 16:05 kernel test robot
2020-11-28 16:05 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012270241.goAjPPmY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cjhuang@codeaurora.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.