lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 2 Feb 2022 12:00:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bean Huo <huobean@...il.com>, songxiaowei@...ilicon.com,
        wangbinghui@...ilicon.com, lorenzo.pieralisi@....com,
        robh@...nel.org, kw@...ux.com, bhelgaas@...gle.com,
        ffclaire1224@...il.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org, beanhuo@...ron.com
Subject: Re: [PATCH] PCI: kirin: Fix kirin960-pcie probe failure issue

Hi Bean,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on v5.17-rc2 next-20220201]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bean-Huo/PCI-kirin-Fix-kirin960-pcie-probe-failure-issue/20220202-060120
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: riscv-randconfig-r001-20220130 (https://download.01.org/0day-ci/archive/20220202/202202021149.TJc443Qq-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e844b69f15bb7dffaf9365cd2b355d2eb7579)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/91a6cc1deb484e0590261edbf304784499ca1784
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Bean-Huo/PCI-kirin-Fix-kirin960-pcie-probe-failure-issue/20220202-060120
        git checkout 91a6cc1deb484e0590261edbf304784499ca1784
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/pci/controller/dwc/

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/pci/controller/dwc/pcie-kirin.c:784:13: warning: cast to smaller integer type 'enum pcie_kirin_phy_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
           phy_type = (enum pcie_kirin_phy_type)of_device_get_match_data(dev);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +784 drivers/pci/controller/dwc/pcie-kirin.c

   770	
   771	static int kirin_pcie_probe(struct platform_device *pdev)
   772	{
   773		enum pcie_kirin_phy_type phy_type;
   774		struct device *dev = &pdev->dev;
   775		struct kirin_pcie *kirin_pcie;
   776		struct dw_pcie *pci;
   777		int ret;
   778	
   779		if (!dev->of_node) {
   780			dev_err(dev, "NULL node\n");
   781			return -EINVAL;
   782		}
   783	
 > 784		phy_type = (enum pcie_kirin_phy_type)of_device_get_match_data(dev);
   785	
   786		kirin_pcie = devm_kzalloc(dev, sizeof(struct kirin_pcie), GFP_KERNEL);
   787		if (!kirin_pcie)
   788			return -ENOMEM;
   789	
   790		pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
   791		if (!pci)
   792			return -ENOMEM;
   793	
   794		pci->dev = dev;
   795		pci->ops = &kirin_dw_pcie_ops;
   796		pci->pp.ops = &kirin_pcie_host_ops;
   797		kirin_pcie->pci = pci;
   798		kirin_pcie->type = phy_type;
   799	
   800		ret = kirin_pcie_get_resource(kirin_pcie, pdev);
   801		if (ret)
   802			return ret;
   803	
   804		platform_set_drvdata(pdev, kirin_pcie);
   805	
   806		ret = kirin_pcie_power_on(pdev, kirin_pcie);
   807		if (ret)
   808			return ret;
   809	
   810		return dw_pcie_host_init(&pci->pp);
   811	}
   812	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ