linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shawn Guo <shawn.guo@linaro.org>, Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Loic Poulain <loic.poulain@linaro.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [PATCH v2 2/2] irqchip: Add Qualcomm MPM controller driver
Date: Sat, 27 Nov 2021 15:49:53 +0800	[thread overview]
Message-ID: <202111271507.zYc4AvpT-lkp@intel.com> (raw)
In-Reply-To: <20211126093529.31661-3-shawn.guo@linaro.org>

Hi Shawn,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tip/irq/core]
[also build test WARNING on robh/for-next v5.16-rc2 next-20211126]
[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/Shawn-Guo/Add-Qualcomm-MPM-irqchip-driver-support/20211126-174350
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2258a6fc33d56227a981a45069fc651d85a0076f
config: arm64-buildonly-randconfig-r006-20211126 (https://download.01.org/0day-ci/archive/20211127/202111271507.zYc4AvpT-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/c6f0c60a2d210e09a08be7a8f6e64d291fc708fd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Shawn-Guo/Add-Qualcomm-MPM-irqchip-driver-support/20211126-174350
        git checkout c6f0c60a2d210e09a08be7a8f6e64d291fc708fd
        # 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=arm64 SHELL=/bin/bash drivers/iio/ drivers/irqchip/ drivers/spi/

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/irqchip/qcom-mpm.c:389:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!mpm_gpio_domain) {
               ^~~~~~~~~~~~~~~~
   drivers/irqchip/qcom-mpm.c:422:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/irqchip/qcom-mpm.c:389:2: note: remove the 'if' if its condition is always false
           if (!mpm_gpio_domain) {
           ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/irqchip/qcom-mpm.c:343:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +389 drivers/irqchip/qcom-mpm.c

   333	
   334	static int qcom_mpm_probe(struct platform_device *pdev)
   335	{
   336		struct irq_domain *parent_domain, *mpm_gic_domain, *mpm_gpio_domain;
   337		struct device *dev = &pdev->dev;
   338		struct device_node *np = dev->of_node;
   339		struct device_node *parent = of_irq_find_parent(np);
   340		struct qcom_mpm_priv *priv;
   341		unsigned int pin_num;
   342		int irq;
   343		int ret;
   344	
   345		/* See comments in platform_irqchip_probe() */
   346		if (parent && !irq_find_matching_host(parent, DOMAIN_BUS_ANY))
   347			return -EPROBE_DEFER;
   348	
   349		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   350		if (!priv)
   351			return -ENOMEM;
   352	
   353		priv->data = of_device_get_match_data(dev);
   354		if (!priv->data)
   355			return -ENODEV;
   356	
   357		pin_num = priv->data->pin_num;
   358		priv->pin_to_irq = devm_kcalloc(dev, pin_num, sizeof(*priv->pin_to_irq),
   359						GFP_KERNEL);
   360		if (!priv)
   361			return -ENOMEM;
   362	
   363		priv->reg_stride = DIV_ROUND_UP(pin_num, 32);
   364		spin_lock_init(&priv->lock);
   365	
   366		priv->base = devm_platform_ioremap_resource(pdev, 0);
   367		if (!priv->base)
   368			return PTR_ERR(priv->base);
   369	
   370		irq = platform_get_irq(pdev, 0);
   371		if (irq < 0)
   372			return irq;
   373	
   374		parent_domain = irq_find_host(parent);
   375		if (!parent_domain) {
   376			dev_err(dev, "failed to find MPM parent domain\n");
   377			return -ENXIO;
   378		}
   379	
   380		mpm_gic_domain = irq_domain_create_hierarchy(parent_domain, 0, pin_num,
   381					of_node_to_fwnode(np), &qcom_mpm_gic_ops, priv);
   382		if (!mpm_gic_domain) {
   383			dev_err(dev, "failed to create GIC domain\n");
   384			return -ENOMEM;
   385		}
   386	
   387		mpm_gpio_domain = irq_domain_create_linear(of_node_to_fwnode(np),
   388					pin_num, &qcom_mpm_gpio_ops, priv);
 > 389		if (!mpm_gpio_domain) {
   390			dev_err(dev, "failed to create GPIO domain\n");
   391			goto remove_gic_domain;
   392		}
   393	
   394		irq_domain_update_bus_token(mpm_gpio_domain, DOMAIN_BUS_WAKEUP);
   395	
   396		priv->mbox_client.dev = dev;
   397		priv->mbox_chan = mbox_request_channel(&priv->mbox_client, 0);
   398		if (IS_ERR(priv->mbox_chan)) {
   399			ret = PTR_ERR(priv->mbox_chan);
   400			dev_err(dev, "failed to acquire IPC channel: %d\n", ret);
   401			goto remove_gpio_domain;
   402		}
   403	
   404		ret = devm_request_irq(dev, irq, qcom_mpm_handler,
   405				       IRQF_TRIGGER_RISING | IRQF_NO_SUSPEND,
   406				       "qcom_mpm", priv);
   407		if (ret) {
   408			dev_err(dev, "failed to request irq: %d\n", ret);
   409			goto free_mbox;
   410		}
   411	
   412		dev_set_drvdata(dev, priv);
   413	
   414		return 0;
   415	
   416	free_mbox:
   417		mbox_free_channel(priv->mbox_chan);
   418	remove_gpio_domain:
   419		irq_domain_remove(mpm_gpio_domain);
   420	remove_gic_domain:
   421		irq_domain_remove(mpm_gic_domain);
   422		return ret;
   423	}
   424	

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

  parent reply	other threads:[~2021-11-27  7:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26  9:35 [PATCH v2 0/2] Add Qualcomm MPM irqchip driver support Shawn Guo
2021-11-26  9:35 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: Add Qualcomm MPM support Shawn Guo
2021-12-01 23:02   ` Rob Herring
2021-11-26  9:35 ` [PATCH v2 2/2] irqchip: Add Qualcomm MPM controller driver Shawn Guo
2021-11-26 15:13   ` Marc Zyngier
2021-11-26 19:19   ` Marc Zyngier
2021-11-29 13:33     ` Shawn Guo
2021-11-29 15:24       ` Marc Zyngier
2021-11-30  2:31         ` Shawn Guo
2021-11-30  8:42           ` Marc Zyngier
2021-11-30  9:17             ` Shawn Guo
2021-11-30 10:44               ` Marc Zyngier
2021-12-01  7:36                 ` Shawn Guo
     [not found]           ` <2e821841-a921-3fda-9ee6-3d5127653033@quicinc.com>
2021-11-30  8:31             ` Shawn Guo
2021-11-30  8:52               ` Marc Zyngier
2021-11-30  8:54               ` Maulik Shah
2021-11-30  8:47             ` Marc Zyngier
2021-11-27  7:49   ` kernel test robot [this message]
2021-11-29  7:23   ` Maulik Shah
2021-11-29 13:45     ` Shawn Guo
2021-11-30  8:26       ` Maulik Shah
2021-11-30  8:44         ` Shawn Guo
2021-11-30  9:04           ` Maulik Shah
2021-11-30  9:26             ` Shawn Guo

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=202111271507.zYc4AvpT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=loic.poulain@linaro.org \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=tglx@linutronix.de \
    /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).