linux-kernel.vger.kernel.org archive mirror
 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, clang-built-linux@googlegroups.com,
	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 18:40:30 +0800	[thread overview]
Message-ID: <202007171825.od7xeSND%lkp@intel.com> (raw)
In-Reply-To: <20200716193244.31090-2-qiangqing.zhang@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 11476 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: s390-randconfig-r014-20200717 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
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 s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

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 >>):

   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x000000ffUL) << 24) |            \
                     ^
   In file included from drivers/irqchip/irq-imx-intmux.c:49:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |            \
                     ^
   In file included from drivers/irqchip/irq-imx-intmux.c:49:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |            \
                     ^
   In file included from drivers/irqchip/irq-imx-intmux.c:49:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
           ___constant_swab32(x) :                 \
                              ^
   include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
                     ^
   In file included from drivers/irqchip/irq-imx-intmux.c:49:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
                                                             ^
   include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
           __fswab32(x))
                     ^
   In file included from drivers/irqchip/irq-imx-intmux.c:49:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:72:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
                                            ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
                                            ~~~~~~~~~~ ^
   include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
>> drivers/irqchip/irq-imx-intmux.c:240:9: error: no member named 'saved_reg' in 'struct intmux_data'
                   data->saved_reg = devm_kzalloc(&pdev->dev,
                   ~~~~  ^
   drivers/irqchip/irq-imx-intmux.c:243:14: error: no member named 'saved_reg' in 'struct intmux_data'
                   if (!data->saved_reg)
                        ~~~~  ^
   20 warnings and 2 errors generated.

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

  parent reply	other threads:[~2020-07-17 11:18 UTC|newest]

Thread overview: 9+ 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  6:40   ` kernel test robot
2020-07-17  8:41   ` Marc Zyngier
2020-07-17 10:40   ` kernel test robot [this message]
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=202007171825.od7xeSND%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.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 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).