linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-arm-kernel@lists.infradead.org,
	Michal Simek <monstr@monstr.eu>
Subject: [xlnx:xlnx_rebase_v5.10 137/1761] drivers/misc/xilinx_flex_pm.c:235:53: error: too many arguments to function call, expected 2, have 3
Date: Thu, 12 Aug 2021 16:04:54 +0800	[thread overview]
Message-ID: <202108121652.OOehWY7B-lkp@intel.com> (raw)

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

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head:   e14d4574ca81a569ee6d07e03271f2ae2dad38e4
commit: a488ba0fdc7388872e2b5ae378612d4e7ea70cb0 [137/1761] misc: xilinx_flex: Add support for the flex noc Performance Monitor
config: s390-randconfig-r012-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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
        # https://github.com/Xilinx/linux-xlnx/commit/a488ba0fdc7388872e2b5ae378612d4e7ea70cb0
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.10
        git checkout a488ba0fdc7388872e2b5ae378612d4e7ea70cb0
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/crypto/xilinx/ drivers/fpga/ drivers/media/i2c/ drivers/misc/ drivers/net/ethernet/xilinx/ drivers/regulator/ drivers/s390/net/ drivers/s390/scsi/ drivers/staging/

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

   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__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:19:12: note: expanded from macro '___constant_swab32'
           (((__u32)(x) & (__u32)0x000000ffUL) << 24) |            \
                     ^
   In file included from drivers/misc/xilinx_flex_pm.c:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__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/misc/xilinx_flex_pm.c:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__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/misc/xilinx_flex_pm.c:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__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/misc/xilinx_flex_pm.c:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:80:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__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/misc/xilinx_flex_pm.c:10:
   In file included from include/linux/io.h:13:
   In file included from arch/s390/include/asm/io.h:80:
   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:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)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/misc/xilinx_flex_pm.c:235:53: error: too many arguments to function call, expected 2, have 3
                           ret = zynqmp_pm_probe_counter_write(domain, reg, val);
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ^~~
   include/linux/firmware/xlnx-zynqmp.h:914:19: note: 'zynqmp_pm_probe_counter_write' declared here
   static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
                     ^
   drivers/misc/xilinx_flex_pm.c:252:53: error: too many arguments to function call, expected 2, have 3
                           ret = zynqmp_pm_probe_counter_write(domain, reg, val);
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ^~~
   include/linux/firmware/xlnx-zynqmp.h:914:19: note: 'zynqmp_pm_probe_counter_write' declared here
   static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
                     ^
   20 warnings and 2 errors generated.


vim +235 drivers/misc/xilinx_flex_pm.c

   152	
   153	/**
   154	 * xflex_sysfs_cmd - Implements sysfs operations
   155	 * @dev: Device structure
   156	 * @buf: Value to write
   157	 * @cmd: sysfs cmd
   158	 *
   159	 * Return: value read from the sysfs cmd on success and negative error code
   160	 *		otherwise.
   161	 */
   162	static int xflex_sysfs_cmd(struct device *dev, const char *buf,
   163				   enum xflex_sysfs_cmd_codes cmd)
   164	{
   165		struct xflex_dev_info *flexpm = to_xflex_dev_info(dev);
   166		u32 domain, src, offset, reg, val, counter;
   167		int ret;
   168		u32 pm_api_ret[4] = {0, 0, 0, 0};
   169	
   170		mutex_lock(&flexpm->mutex);
   171	
   172		switch (cmd) {
   173		case XFLEX_GET_COUNTER_LPD_WRRSP:
   174			reg = flexpm->counterid_lpd | FPM_WRRSP_L | FPM_VAL;
   175			domain = FPM_LPD;
   176	
   177			break;
   178	
   179		case XFLEX_GET_COUNTER_LPD_WRREQ:
   180			reg = flexpm->counterid_lpd | FPM_WRRSP_L | FPM_VAL;
   181			domain = FPM_LPD;
   182	
   183			break;
   184	
   185		case XFLEX_GET_COUNTER_LPD_RDRSP:
   186			reg = flexpm->counterid_lpd | FPM_RDRSP_L | FPM_VAL;
   187			domain = FPM_LPD;
   188	
   189			break;
   190	
   191		case XFLEX_GET_COUNTER_LPD_RDREQ:
   192			reg = flexpm->counterid_lpd | FPM_RDREQ_L | FPM_VAL;
   193			domain = FPM_LPD;
   194	
   195			break;
   196	
   197		case XFLEX_SET_COUNTER_LPD:
   198			ret = kstrtou32(buf, 0, &val);
   199			if (ret < 0)
   200				goto exit_unlock;
   201	
   202			flexpm->counterid_lpd = val;
   203			reset_default(dev, val, FPM_LPD);
   204			break;
   205	
   206		case XFLEX_SET_PORT_COUNTER_FPD:
   207			ret = kstrtou32(buf, 0, &val);
   208			if (ret < 0)
   209				goto exit_unlock;
   210	
   211			counter = flexpm->counterid_fpd * FPM_COUNTER_OFFSET;
   212			offset = FPM_PORT_SEL_OFFSET + counter * FPM_COUNTER_OFFSET;
   213			fpm_reg(flexpm->basefpd, val, offset);
   214			break;
   215	
   216		case XFLEX_SET_PORT_COUNTER_LPD:
   217			ret = kstrtou32(buf, 0, &val);
   218			if (ret < 0)
   219				goto exit_unlock;
   220	
   221			counter = flexpm->counterid_lpd * FPM_COUNTER_OFFSET;
   222			offset = FPM_PORT_SEL_OFFSET + counter * FPM_COUNTER_OFFSET;
   223			fpm_reg(flexpm->baselpd, val, offset);
   224			break;
   225	
   226		case XFLEX_SET_SRC_COUNTER_LPD:
   227			reg = flexpm->counterid_lpd;
   228			domain = FPM_LPD;
   229			ret = kstrtou32(buf, 0, &val);
   230			if (ret < 0)
   231				goto exit_unlock;
   232	
   233			for (src = 0; src < FPM_NUM_COUNTERS; src++) {
   234				reg = reg | FPM_SRC | (src << FPM_PROBE_SHIFT);
 > 235				ret = zynqmp_pm_probe_counter_write(domain, reg, val);
   236				if (ret < 0) {
   237					dev_err(dev, "Counter write error %d\n", ret);
   238					goto exit_unlock;
   239				}
   240			}
   241			break;
   242	
   243		case XFLEX_SET_SRC_COUNTER_FPD:
   244			reg = flexpm->counterid_fpd;
   245			domain = FPM_FPD;
   246			ret = kstrtou32(buf, 0, &val);
   247			if (ret < 0)
   248				goto exit_unlock;
   249	
   250			for (src = 0; src < FPM_NUM_COUNTERS; src++) {
   251				reg = reg | FPM_SRC | (src << FPM_PROBE_SHIFT);
   252				ret = zynqmp_pm_probe_counter_write(domain, reg, val);
   253				if (ret < 0) {
   254					dev_err(dev, "Counter write error %d\n", ret);
   255					goto exit_unlock;
   256				}
   257			}
   258			break;
   259	
   260		case XFLEX_SET_COUNTER_FPD:
   261			ret = kstrtou32(buf, 0, &val);
   262			if (ret < 0)
   263				goto exit_unlock;
   264	
   265			flexpm->counterid_fpd = val;
   266			reset_default(dev, val, FPM_FPD);
   267			break;
   268	
   269		case XFLEX_GET_COUNTER_FPD_WRRSP:
   270			reg = flexpm->counterid_fpd | FPM_WRRSP_L | FPM_VAL;
   271			domain = FPM_FPD;
   272	
   273			break;
   274	
   275		case XFLEX_GET_COUNTER_FPD_WRREQ:
   276			reg = flexpm->counterid_fpd | FPM_WRREQ_L | FPM_VAL;
   277			domain = FPM_FPD;
   278	
   279			break;
   280	
   281		case XFLEX_GET_COUNTER_FPD_RDRSP:
   282			reg = flexpm->counterid_fpd | FPM_RDRSP_L | FPM_VAL;
   283			domain = FPM_FPD;
   284	
   285			break;
   286	
   287		case XFLEX_GET_COUNTER_FPD_RDREQ:
   288			reg = flexpm->counterid_fpd | FPM_RDREQ_L | FPM_VAL;
   289			domain = FPM_FPD;
   290	
   291			break;
   292	
   293		default:
   294			dev_err(dev, "Invalid option\n");
   295			break;
   296		}
   297	
   298		ret = zynqmp_pm_probe_counter_read(domain, reg, &pm_api_ret[0]);
   299	
   300		if (ret < 0) {
   301			dev_err(dev, "Counter read error %d\n", ret);
   302			return ret;
   303		}
   304		mutex_unlock(&flexpm->mutex);
   305		return pm_api_ret[1];
   306	
   307	exit_unlock:
   308		mutex_unlock(&flexpm->mutex);
   309		return ret;
   310	}
   311	

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2021-08-12  8:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202108121652.OOehWY7B-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=shubhrajyoti.datta@xilinx.com \
    /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).