[xlnx:master 11929/12313] drivers/usb/dwc3/dwc3-xilinx.c:202:12: error: too many arguments to function call, expected 2, have 3

kernel test robot lkp at intel.com
Thu Jul 1 08:04:01 PDT 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   190ba47825b71dd7abeca27b890f1dd5bd5eb781
commit: d547e47f6e3cce45a3aa7f7d477558ba2cd77387 [11929/12313] usb: dwc3: Add power management support in DWC3 Xilinx driver
config: arm64-randconfig-r011-20210630 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e7e71e9454ed76c1b3d8140170b5333c28bef1be)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/Xilinx/linux-xlnx/commit/d547e47f6e3cce45a3aa7f7d477558ba2cd77387
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout d547e47f6e3cce45a3aa7f7d477558ba2cd77387
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/xlnx/ drivers/usb/dwc3/

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

>> drivers/usb/dwc3/dwc3-xilinx.c:202:12: error: too many arguments to function call, expected 2, have 3
                                                 DWC3_PWR_STATE_RETRIES *
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/dwc3-xilinx.c:50:34: note: expanded from macro 'DWC3_PWR_STATE_RETRIES'
   #define DWC3_PWR_STATE_RETRIES                  1000
                                                   ^
   include/linux/firmware/xlnx-zynqmp.h:835:19: note: 'zynqmp_pm_usb_set_state' declared here
   static inline int zynqmp_pm_usb_set_state(u32 state, u32 value)
                     ^
   drivers/usb/dwc3/dwc3-xilinx.c:217:12: error: too many arguments to function call, expected 2, have 3
                                                 DWC3_PWR_STATE_RETRIES *
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/usb/dwc3/dwc3-xilinx.c:50:34: note: expanded from macro 'DWC3_PWR_STATE_RETRIES'
   #define DWC3_PWR_STATE_RETRIES                  1000
                                                   ^
   include/linux/firmware/xlnx-zynqmp.h:835:19: note: 'zynqmp_pm_usb_set_state' declared here
   static inline int zynqmp_pm_usb_set_state(u32 state, u32 value)
                     ^
   drivers/usb/dwc3/dwc3-xilinx.c:282:5: warning: no previous prototype for function 'dwc3_xlnx_register_regulator' [-Wmissing-prototypes]
   int dwc3_xlnx_register_regulator(struct device *dev,
       ^
   drivers/usb/dwc3/dwc3-xilinx.c:282:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int dwc3_xlnx_register_regulator(struct device *dev,
   ^
   static 
   1 warning and 2 errors generated.


vim +202 drivers/usb/dwc3/dwc3-xilinx.c

   180	
   181	static int dwc3_versal_power_req(struct device *dev, bool on)
   182	{
   183		int ret;
   184		struct dwc3_xlnx *priv_data;
   185	
   186		priv_data = dev_get_drvdata(dev);
   187	
   188		if (on) {
   189			dev_dbg(dev, "%s:Trying to set power state to D0....\n",
   190				 __func__);
   191	
   192			if (priv_data->pmu_state == D0_STATE)
   193				return 0;
   194	
   195			ret = zynqmp_pm_reset_assert(VERSAL_USB_RESET_ID,
   196						     PM_RESET_ACTION_RELEASE);
   197			if (ret < 0)
   198				dev_err(priv_data->dev, "failed to De-assert Reset\n");
   199	
   200			ret = zynqmp_pm_usb_set_state(VERSAL_USB_NODE_ID,
   201						      XLNX_REQ_PWR_STATE_D0,
 > 202						      DWC3_PWR_STATE_RETRIES *
   203						      DWC3_PWR_TIMEOUT);
   204			if (ret < 0)
   205				dev_err(priv_data->dev, "failed to enter D0 state\n");
   206	
   207			priv_data->pmu_state = D0_STATE;
   208		} else {
   209			dev_dbg(dev, "%s:Trying to set power state to D3...\n",
   210				__func__);
   211	
   212			if (priv_data->pmu_state == D3_STATE)
   213				return 0;
   214	
   215			ret = zynqmp_pm_usb_set_state(VERSAL_USB_NODE_ID,
   216						      XLNX_REQ_PWR_STATE_D3,
   217						      DWC3_PWR_STATE_RETRIES *
   218						      DWC3_PWR_TIMEOUT);
   219			if (ret < 0)
   220				dev_err(priv_data->dev, "failed to enter D3 state\n");
   221	
   222			ret = zynqmp_pm_reset_assert(VERSAL_USB_RESET_ID,
   223						     PM_RESET_ACTION_ASSERT);
   224			if (ret < 0)
   225				dev_err(priv_data->dev, "failed to assert Reset\n");
   226	
   227			priv_data->pmu_state = D3_STATE;
   228		}
   229	
   230		return ret;
   231	}
   232	

---
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: 36233 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210701/40b019e6/attachment-0001.gz>


More information about the linux-arm-kernel mailing list