[xlnx:master 10656/12130] drivers/misc/xilinx_flex_pm.c:235:10: error: too many arguments to function 'zynqmp_pm_probe_counter_write'

kernel test robot lkp at intel.com
Thu Apr 22 02:31:28 BST 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   0605a36e057480f3a83ae401e7ff59739da78e82
commit: 4700c4290e778cd3547e1240e1e9562e8197a2fc [10656/12130] misc: xilinx_flex: Add support for the flex noc Performance Monitor
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/Xilinx/linux-xlnx/commit/4700c4290e778cd3547e1240e1e9562e8197a2fc
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout 4700c4290e778cd3547e1240e1e9562e8197a2fc
        # save the attached .config to linux build tree
        make W=1 W=1 ARCH=um 

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

All errors (new ones prefixed by >>):

   cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
   drivers/misc/xilinx_flex_pm.c: In function 'xflex_sysfs_cmd':
>> drivers/misc/xilinx_flex_pm.c:235:10: error: too many arguments to function 'zynqmp_pm_probe_counter_write'
     235 |    ret = zynqmp_pm_probe_counter_write(domain, reg, val);
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/misc/xilinx_flex_pm.c:7:
   include/linux/firmware/xlnx-zynqmp.h:914:19: note: declared here
     914 | static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/misc/xilinx_flex_pm.c:252:10: error: too many arguments to function 'zynqmp_pm_probe_counter_write'
     252 |    ret = zynqmp_pm_probe_counter_write(domain, reg, val);
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/misc/xilinx_flex_pm.c:7:
   include/linux/firmware/xlnx-zynqmp.h:914:19: note: declared here
     914 | static inline int zynqmp_pm_probe_counter_write(u32 reg, u32 value)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for MFD_CORE
   Depends on HAS_IOMEM
   Selected by
   - MFD_HI6421_SPMI && STAGING && OF && SPMI


vim +/zynqmp_pm_probe_counter_write +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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 23475 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210422/9522a9d0/attachment-0001.gz>


More information about the linux-arm-kernel mailing list