lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 17 Jul 2020 18:40:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Joakim Zhang <qiangqing.zhang@....com>, tglx@...utronix.de,
        jason@...edaemon.net, maz@...nel.org, shawnguo@...nel.org,
        s.hauer@...gutronix.de
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        kernel@...gutronix.de, festevam@...il.com, linux-imx@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.or
Subject: Re: [PATCH 1/2] irqchip: imx-intmux: add system PM support

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (35935 bytes)

Powered by blists - more mailing lists