All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joakim Zhang <qiangqing.zhang@nxp.com>,
	tglx@linutronix.de, jason@lakedaemon.net, maz@kernel.org,
	shawnguo@kernel.org, s.hauer@pengutronix.de
Cc: kbuild-all@lists.01.org, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.or
Subject: Re: [PATCH 1/2] irqchip: imx-intmux: add system PM support
Date: Fri, 17 Jul 2020 14:40:36 +0800	[thread overview]
Message-ID: <202007171437.eqoY08Yn%lkp@intel.com> (raw)
In-Reply-To: <20200716193244.31090-2-qiangqing.zhang@nxp.com>

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

Hi Joakim,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/irq/core]
[also build test ERROR on linux/master linus/master v5.8-rc5 next-20200716]
[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/Joakim-Zhang/irqchip-imx-intmux-add-PM-support/20200716-193311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 8fa88a88d573093868565a1afba43b5ae5b3a316
config: c6x-randconfig-r011-20200717 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

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

All errors (new ones prefixed by >>):

   drivers/irqchip/irq-imx-intmux.c: In function 'imx_intmux_probe':
>> drivers/irqchip/irq-imx-intmux.c:240:7: error: 'struct intmux_data' has no member named 'saved_reg'
     240 |   data->saved_reg = devm_kzalloc(&pdev->dev,
         |       ^~
   drivers/irqchip/irq-imx-intmux.c:243:12: error: 'struct intmux_data' has no member named 'saved_reg'
     243 |   if (!data->saved_reg)
         |            ^~
   At top level:
   drivers/irqchip/irq-imx-intmux.c:351:32: warning: 'imx_intmux_pm_ops' defined but not used [-Wunused-const-variable=]
     351 | static const struct dev_pm_ops imx_intmux_pm_ops = {
         |                                ^~~~~~~~~~~~~~~~~

vim +240 drivers/irqchip/irq-imx-intmux.c

   198	
   199	static int imx_intmux_probe(struct platform_device *pdev)
   200	{
   201		struct device_node *np = pdev->dev.of_node;
   202		struct irq_domain *domain;
   203		struct intmux_data *data;
   204		int channum;
   205		int i, ret;
   206	
   207		channum = platform_irq_count(pdev);
   208		if (channum == -EPROBE_DEFER) {
   209			return -EPROBE_DEFER;
   210		} else if (channum > CHAN_MAX_NUM) {
   211			dev_err(&pdev->dev, "supports up to %d multiplex channels\n",
   212				CHAN_MAX_NUM);
   213			return -EINVAL;
   214		}
   215	
   216		data = devm_kzalloc(&pdev->dev, sizeof(*data) +
   217				    channum * sizeof(data->irqchip_data[0]), GFP_KERNEL);
   218		if (!data)
   219			return -ENOMEM;
   220	
   221		data->regs = devm_platform_ioremap_resource(pdev, 0);
   222		if (IS_ERR(data->regs)) {
   223			dev_err(&pdev->dev, "failed to initialize reg\n");
   224			return PTR_ERR(data->regs);
   225		}
   226	
   227		data->ipg_clk = devm_clk_get(&pdev->dev, "ipg");
   228		if (IS_ERR(data->ipg_clk)) {
   229			ret = PTR_ERR(data->ipg_clk);
   230			if (ret != -EPROBE_DEFER)
   231				dev_err(&pdev->dev, "failed to get ipg clk: %d\n", ret);
   232			return ret;
   233		}
   234	
   235		data->channum = channum;
   236		raw_spin_lock_init(&data->lock);
   237	
   238		if (IS_ENABLED(CONFIG_PM)) {
   239			/* save CHANIER register */
 > 240			data->saved_reg = devm_kzalloc(&pdev->dev,
   241						       sizeof(unsigned int) * channum,
   242						       GFP_KERNEL);
   243			if (!data->saved_reg)
   244				return -ENOMEM;
   245		}
   246	
   247		ret = clk_prepare_enable(data->ipg_clk);
   248		if (ret) {
   249			dev_err(&pdev->dev, "failed to enable ipg clk: %d\n", ret);
   250			return ret;
   251		}
   252	
   253		for (i = 0; i < channum; i++) {
   254			data->irqchip_data[i].chanidx = i;
   255	
   256			data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
   257			if (data->irqchip_data[i].irq <= 0) {
   258				ret = -EINVAL;
   259				dev_err(&pdev->dev, "failed to get irq\n");
   260				goto out;
   261			}
   262	
   263			domain = irq_domain_add_linear(np, 32, &imx_intmux_domain_ops,
   264						       &data->irqchip_data[i]);
   265			if (!domain) {
   266				ret = -ENOMEM;
   267				dev_err(&pdev->dev, "failed to create IRQ domain\n");
   268				goto out;
   269			}
   270			data->irqchip_data[i].domain = domain;
   271	
   272			/* disable all interrupt sources of this channel firstly */
   273			writel_relaxed(0, data->regs + CHANIER(i));
   274	
   275			irq_set_chained_handler_and_data(data->irqchip_data[i].irq,
   276							 imx_intmux_irq_handler,
   277							 &data->irqchip_data[i]);
   278		}
   279	
   280		platform_set_drvdata(pdev, data);
   281	
   282		return 0;
   283	out:
   284		clk_disable_unprepare(data->ipg_clk);
   285		return ret;
   286	}
   287	

---
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: 27604 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/2] irqchip: imx-intmux: add system PM support
Date: Fri, 17 Jul 2020 14:40:36 +0800	[thread overview]
Message-ID: <202007171437.eqoY08Yn%lkp@intel.com> (raw)
In-Reply-To: <20200716193244.31090-2-qiangqing.zhang@nxp.com>

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

Hi Joakim,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/irq/core]
[also build test ERROR on linux/master linus/master v5.8-rc5 next-20200716]
[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/Joakim-Zhang/irqchip-imx-intmux-add-PM-support/20200716-193311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 8fa88a88d573093868565a1afba43b5ae5b3a316
config: c6x-randconfig-r011-20200717 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x 

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

All errors (new ones prefixed by >>):

   drivers/irqchip/irq-imx-intmux.c: In function 'imx_intmux_probe':
>> drivers/irqchip/irq-imx-intmux.c:240:7: error: 'struct intmux_data' has no member named 'saved_reg'
     240 |   data->saved_reg = devm_kzalloc(&pdev->dev,
         |       ^~
   drivers/irqchip/irq-imx-intmux.c:243:12: error: 'struct intmux_data' has no member named 'saved_reg'
     243 |   if (!data->saved_reg)
         |            ^~
   At top level:
   drivers/irqchip/irq-imx-intmux.c:351:32: warning: 'imx_intmux_pm_ops' defined but not used [-Wunused-const-variable=]
     351 | static const struct dev_pm_ops imx_intmux_pm_ops = {
         |                                ^~~~~~~~~~~~~~~~~

vim +240 drivers/irqchip/irq-imx-intmux.c

   198	
   199	static int imx_intmux_probe(struct platform_device *pdev)
   200	{
   201		struct device_node *np = pdev->dev.of_node;
   202		struct irq_domain *domain;
   203		struct intmux_data *data;
   204		int channum;
   205		int i, ret;
   206	
   207		channum = platform_irq_count(pdev);
   208		if (channum == -EPROBE_DEFER) {
   209			return -EPROBE_DEFER;
   210		} else if (channum > CHAN_MAX_NUM) {
   211			dev_err(&pdev->dev, "supports up to %d multiplex channels\n",
   212				CHAN_MAX_NUM);
   213			return -EINVAL;
   214		}
   215	
   216		data = devm_kzalloc(&pdev->dev, sizeof(*data) +
   217				    channum * sizeof(data->irqchip_data[0]), GFP_KERNEL);
   218		if (!data)
   219			return -ENOMEM;
   220	
   221		data->regs = devm_platform_ioremap_resource(pdev, 0);
   222		if (IS_ERR(data->regs)) {
   223			dev_err(&pdev->dev, "failed to initialize reg\n");
   224			return PTR_ERR(data->regs);
   225		}
   226	
   227		data->ipg_clk = devm_clk_get(&pdev->dev, "ipg");
   228		if (IS_ERR(data->ipg_clk)) {
   229			ret = PTR_ERR(data->ipg_clk);
   230			if (ret != -EPROBE_DEFER)
   231				dev_err(&pdev->dev, "failed to get ipg clk: %d\n", ret);
   232			return ret;
   233		}
   234	
   235		data->channum = channum;
   236		raw_spin_lock_init(&data->lock);
   237	
   238		if (IS_ENABLED(CONFIG_PM)) {
   239			/* save CHANIER register */
 > 240			data->saved_reg = devm_kzalloc(&pdev->dev,
   241						       sizeof(unsigned int) * channum,
   242						       GFP_KERNEL);
   243			if (!data->saved_reg)
   244				return -ENOMEM;
   245		}
   246	
   247		ret = clk_prepare_enable(data->ipg_clk);
   248		if (ret) {
   249			dev_err(&pdev->dev, "failed to enable ipg clk: %d\n", ret);
   250			return ret;
   251		}
   252	
   253		for (i = 0; i < channum; i++) {
   254			data->irqchip_data[i].chanidx = i;
   255	
   256			data->irqchip_data[i].irq = irq_of_parse_and_map(np, i);
   257			if (data->irqchip_data[i].irq <= 0) {
   258				ret = -EINVAL;
   259				dev_err(&pdev->dev, "failed to get irq\n");
   260				goto out;
   261			}
   262	
   263			domain = irq_domain_add_linear(np, 32, &imx_intmux_domain_ops,
   264						       &data->irqchip_data[i]);
   265			if (!domain) {
   266				ret = -ENOMEM;
   267				dev_err(&pdev->dev, "failed to create IRQ domain\n");
   268				goto out;
   269			}
   270			data->irqchip_data[i].domain = domain;
   271	
   272			/* disable all interrupt sources of this channel firstly */
   273			writel_relaxed(0, data->regs + CHANIER(i));
   274	
   275			irq_set_chained_handler_and_data(data->irqchip_data[i].irq,
   276							 imx_intmux_irq_handler,
   277							 &data->irqchip_data[i]);
   278		}
   279	
   280		platform_set_drvdata(pdev, data);
   281	
   282		return 0;
   283	out:
   284		clk_disable_unprepare(data->ipg_clk);
   285		return ret;
   286	}
   287	

---
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: 27604 bytes --]

  parent reply	other threads:[~2020-07-17  6:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 19:32 [PATCH 0/2] irqchip: imx-intmux: add PM support Joakim Zhang
2020-07-16 19:32 ` [PATCH 1/2] irqchip: imx-intmux: add system " Joakim Zhang
2020-07-17  1:27   ` kernel test robot
2020-07-17  1:27     ` kernel test robot
2020-07-17  6:40   ` kernel test robot [this message]
2020-07-17  6:40     ` kernel test robot
2020-07-17  8:41   ` Marc Zyngier
2020-07-17 10:40   ` kernel test robot
2020-07-17 10:40     ` kernel test robot
2020-07-16 19:32 ` [PATCH 2/2] irqchip: imx-intmux: add runtime " Joakim Zhang
2020-07-17  8:58   ` Marc Zyngier
2020-07-17 10:48     ` Joakim Zhang

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=202007171437.eqoY08Yn%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=festevam@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.or \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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 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.