linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: kbuild-all@lists.01.org, linux-pci@vger.kernel.org
Subject: [helgaas-pci:for-linus 2/2] drivers/pci/controller/dwc/pcie-kirin.c:764:44: error: expected '}' before ';' token
Date: Thu, 3 Feb 2022 02:45:55 +0800	[thread overview]
Message-ID: <202202030204.2ItojgUO-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git for-linus
head:   6b85e10dcff3a98d40f9fbbefc5bb854fa6b50c1
commit: 6b85e10dcff3a98d40f9fbbefc5bb854fa6b50c1 [2/2] PCI: kirin: Add dev struct for of_device_get_match_data()
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220203/202202030204.2ItojgUO-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=6b85e10dcff3a98d40f9fbbefc5bb854fa6b50c1
        git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
        git fetch --no-tags helgaas-pci for-linus
        git checkout 6b85e10dcff3a98d40f9fbbefc5bb854fa6b50c1
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/pci/

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

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

>> drivers/pci/controller/dwc/pcie-kirin.c:764:44: error: expected '}' before ';' token
     764 |         .phy_type = PCIE_KIRIN_INTERNAL_PHY;
         |                                            ^
   drivers/pci/controller/dwc/pcie-kirin.c:763:54: note: to match this '{'
     763 | static const struct kirin_pcie_data kirin_960_data = {
         |                                                      ^
   drivers/pci/controller/dwc/pcie-kirin.c:768:44: error: expected '}' before ';' token
     768 |         .phy_type = PCIE_KIRIN_EXTERNAL_PHY;
         |                                            ^
   drivers/pci/controller/dwc/pcie-kirin.c:767:54: note: to match this '{'
     767 | static const struct kirin_pcie_data kirin_970_data = {
         |                                                      ^
   drivers/pci/controller/dwc/pcie-kirin.c: In function 'kirin_pcie_probe':
>> drivers/pci/controller/dwc/pcie-kirin.c:790:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     790 |         data = of_device_get_match_data(dev);
         |              ^


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

   762	
   763	static const struct kirin_pcie_data kirin_960_data = {
 > 764		.phy_type = PCIE_KIRIN_INTERNAL_PHY;
   765	};
   766	
   767	static const struct kirin_pcie_data kirin_970_data = {
 > 768		.phy_type = PCIE_KIRIN_EXTERNAL_PHY;
   769	};
   770	
   771	static const struct of_device_id kirin_pcie_match[] = {
   772		{ .compatible = "hisilicon,kirin960-pcie", .data = &kirin_960_data },
   773		{ .compatible = "hisilicon,kirin970-pcie", .data = &kirin_970_data },
   774		{},
   775	};
   776	
   777	static int kirin_pcie_probe(struct platform_device *pdev)
   778	{
   779		struct kirin_pcie_data *data;
   780		struct device *dev = &pdev->dev;
   781		struct kirin_pcie *kirin_pcie;
   782		struct dw_pcie *pci;
   783		int ret;
   784	
   785		if (!dev->of_node) {
   786			dev_err(dev, "NULL node\n");
   787			return -EINVAL;
   788		}
   789	
 > 790		data = of_device_get_match_data(dev);
   791		if (!data) {
   792			dev_err(dev, "OF data missing\n");
   793			return -EINVAL;
   794		}
   795	
   796		kirin_pcie = devm_kzalloc(dev, sizeof(struct kirin_pcie), GFP_KERNEL);
   797		if (!kirin_pcie)
   798			return -ENOMEM;
   799	
   800		pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
   801		if (!pci)
   802			return -ENOMEM;
   803	
   804		pci->dev = dev;
   805		pci->ops = &kirin_dw_pcie_ops;
   806		pci->pp.ops = &kirin_pcie_host_ops;
   807		kirin_pcie->pci = pci;
   808		kirin_pcie->type = data->phy_type;
   809	
   810		ret = kirin_pcie_get_resource(kirin_pcie, pdev);
   811		if (ret)
   812			return ret;
   813	
   814		platform_set_drvdata(pdev, kirin_pcie);
   815	
   816		ret = kirin_pcie_power_on(pdev, kirin_pcie);
   817		if (ret)
   818			return ret;
   819	
   820		return dw_pcie_host_init(&pci->pp);
   821	}
   822	

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

                 reply	other threads:[~2022-02-02 18:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202202030204.2ItojgUO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-pci@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).