public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: shao.mingyin@zte.com.cn, jonnyc@amazon.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	lpieralisi@kernel.org, kw@linux.com,
	manivannan.sadhasivam@linaro.org, robh@kernel.org,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, yang.yang29@zte.com.cn,
	xu.xin16@zte.com.cn, ye.xingchen@zte.com.cn
Subject: Re: [PATCH] PCI: al: Use devm_platform_ioremap_resource_byname
Date: Fri, 4 Apr 2025 03:57:06 +0800	[thread overview]
Message-ID: <202504040353.k5kLpniy-lkp@intel.com> (raw)
In-Reply-To: <20250403154833001aNpIIRBQWEw67Oo8nChch@zte.com.cn>

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.14 next-20250403]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/shao-mingyin-zte-com-cn/PCI-al-Use-devm_platform_ioremap_resource_byname/20250403-155111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20250403154833001aNpIIRBQWEw67Oo8nChch%40zte.com.cn
patch subject: [PATCH] PCI: al: Use devm_platform_ioremap_resource_byname
config: s390-randconfig-002-20250404 (https://download.01.org/0day-ci/archive/20250404/202504040353.k5kLpniy-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250404/202504040353.k5kLpniy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504040353.k5kLpniy-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/pci/controller/dwc/pcie-al.c:359:4: warning: variable 'controller_res' is uninitialized when used here [-Wuninitialized]
     359 |                         controller_res);
         |                         ^~~~~~~~~~~~~~
   include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
     154 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                                        ^~~~~~~~~~~
   include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                                     ^~~~~~~~~~~
   drivers/pci/controller/dwc/pcie-al.c:330:33: note: initialize the variable 'controller_res' to silence this warning
     330 |         struct resource *controller_res;
         |                                        ^
         |                                         = NULL
   1 warning generated.


vim +/controller_res +359 drivers/pci/controller/dwc/pcie-al.c

a8daea94754989 Jonathan Chocron 2019-09-12  326  
a8daea94754989 Jonathan Chocron 2019-09-12  327  static int al_pcie_probe(struct platform_device *pdev)
a8daea94754989 Jonathan Chocron 2019-09-12  328  {
a8daea94754989 Jonathan Chocron 2019-09-12  329  	struct device *dev = &pdev->dev;
a8daea94754989 Jonathan Chocron 2019-09-12  330  	struct resource *controller_res;
a8daea94754989 Jonathan Chocron 2019-09-12  331  	struct resource *ecam_res;
a8daea94754989 Jonathan Chocron 2019-09-12  332  	struct al_pcie *al_pcie;
a8daea94754989 Jonathan Chocron 2019-09-12  333  	struct dw_pcie *pci;
a8daea94754989 Jonathan Chocron 2019-09-12  334  
a8daea94754989 Jonathan Chocron 2019-09-12  335  	al_pcie = devm_kzalloc(dev, sizeof(*al_pcie), GFP_KERNEL);
a8daea94754989 Jonathan Chocron 2019-09-12  336  	if (!al_pcie)
a8daea94754989 Jonathan Chocron 2019-09-12  337  		return -ENOMEM;
a8daea94754989 Jonathan Chocron 2019-09-12  338  
a8daea94754989 Jonathan Chocron 2019-09-12  339  	pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
a8daea94754989 Jonathan Chocron 2019-09-12  340  	if (!pci)
a8daea94754989 Jonathan Chocron 2019-09-12  341  		return -ENOMEM;
a8daea94754989 Jonathan Chocron 2019-09-12  342  
a8daea94754989 Jonathan Chocron 2019-09-12  343  	pci->dev = dev;
60f5b73fa0f298 Rob Herring      2020-11-05  344  	pci->pp.ops = &al_pcie_host_ops;
a8daea94754989 Jonathan Chocron 2019-09-12  345  
a8daea94754989 Jonathan Chocron 2019-09-12  346  	al_pcie->pci = pci;
a8daea94754989 Jonathan Chocron 2019-09-12  347  	al_pcie->dev = dev;
a8daea94754989 Jonathan Chocron 2019-09-12  348  
a8daea94754989 Jonathan Chocron 2019-09-12  349  	ecam_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "config");
a8daea94754989 Jonathan Chocron 2019-09-12  350  	if (!ecam_res) {
a8daea94754989 Jonathan Chocron 2019-09-12  351  		dev_err(dev, "couldn't find 'config' reg in DT\n");
a8daea94754989 Jonathan Chocron 2019-09-12  352  		return -ENOENT;
a8daea94754989 Jonathan Chocron 2019-09-12  353  	}
a8daea94754989 Jonathan Chocron 2019-09-12  354  	al_pcie->ecam_size = resource_size(ecam_res);
a8daea94754989 Jonathan Chocron 2019-09-12  355  
99f4e0afd9fbe4 Xie Ludan        2025-04-03  356  	al_pcie->controller_base = devm_platform_ioremap_resource_byname(pdev, "controller");
a8daea94754989 Jonathan Chocron 2019-09-12  357  	if (IS_ERR(al_pcie->controller_base)) {
a8daea94754989 Jonathan Chocron 2019-09-12  358  		dev_err(dev, "couldn't remap controller base %pR\n",
a8daea94754989 Jonathan Chocron 2019-09-12 @359  			controller_res);
a8daea94754989 Jonathan Chocron 2019-09-12  360  		return PTR_ERR(al_pcie->controller_base);
a8daea94754989 Jonathan Chocron 2019-09-12  361  	}
a8daea94754989 Jonathan Chocron 2019-09-12  362  
a0fd361db8e508 Rob Herring      2020-11-05  363  	dev_dbg(dev, "From DT: controller_base: %pR\n", controller_res);
a8daea94754989 Jonathan Chocron 2019-09-12  364  
a8daea94754989 Jonathan Chocron 2019-09-12  365  	platform_set_drvdata(pdev, al_pcie);
a8daea94754989 Jonathan Chocron 2019-09-12  366  
60f5b73fa0f298 Rob Herring      2020-11-05  367  	return dw_pcie_host_init(&pci->pp);
a8daea94754989 Jonathan Chocron 2019-09-12  368  }
a8daea94754989 Jonathan Chocron 2019-09-12  369  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2025-04-03 19:57 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20250403154833001aNpIIRBQWEw67Oo8nChch@zte.com.cn>]

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=202504040353.k5kLpniy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bhelgaas@google.com \
    --cc=jonnyc@amazon.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=shao.mingyin@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=ye.xingchen@zte.com.cn \
    /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