Re: [PATCH 3/3] remoteproc: Add AVM WASP driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on remoteproc/rproc-next]
[also build test WARNING on robh/for-next v5.17-rc5 next-20220217]
[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/Daniel-Kestrel/Add-support-for-WASP-SoC-on-AVM-router-boards/20220221-215619
base:   git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220222/202202220129.7LjlrUsi-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/76e19a3c7ae383687205d7be3ac6224253d97704
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Daniel-Kestrel/Add-support-for-WASP-SoC-on-AVM-router-boards/20220221-215619
        git checkout 76e19a3c7ae383687205d7be3ac6224253d97704
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/remoteproc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/remoteproc/avm_wasp.c:150:5: warning: no previous prototype for 'avm_wasp_netboot_mdio_read' [-Wmissing-prototypes]
     150 | int avm_wasp_netboot_mdio_read(struct avm_wasp_rproc *avmwasp,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/remoteproc/avm_wasp.c:176:6: warning: no previous prototype for 'avm_wasp_netboot_mdio_write' [-Wmissing-prototypes]
     176 | void avm_wasp_netboot_mdio_write(struct avm_wasp_rproc *avmwasp,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/remoteproc/avm_wasp.c:197:6: warning: no previous prototype for 'avm_wasp_netboot_mdio_write_u32_split' [-Wmissing-prototypes]
     197 | void avm_wasp_netboot_mdio_write_u32_split(struct avm_wasp_rproc *avmwasp,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/remoteproc/avm_wasp.c:380:5: warning: no previous prototype for 'avm_wasp_netboot_load_firmware' [-Wmissing-prototypes]
     380 | int avm_wasp_netboot_load_firmware(struct avm_wasp_rproc *avmwasp)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/remoteproc/avm_wasp.c:569:5: warning: no previous prototype for 'avm_wasp_load_initramfs_image' [-Wmissing-prototypes]
     569 | int avm_wasp_load_initramfs_image(struct avm_wasp_rproc *avmwasp)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/avm_wasp_netboot_mdio_read +150 drivers/remoteproc/avm_wasp.c

   138	
   139	/**
   140	 * avm_wasp_netboot_mdio_read() - read with gswip mdio bus
   141	 * @avmwasp: pointer to drivers private avm_wasp_rproc structure
   142	 * @location: register number of the m_regs_wasp register array
   143	 *
   144	 * Reads a value from the specified register for the mdio address
   145	 * that is used for the connection to the WASP SoC
   146	 * Mutex on mdio_lock is required to serialize access on bus
   147	 *
   148	 * Return: Value that was read from the specified register
   149	 */
 > 150	int avm_wasp_netboot_mdio_read(struct avm_wasp_rproc *avmwasp,
   151				       int location)
   152	{
   153		int value;
   154	
   155		if (location > M_REGS_WASP_INDEX_MAX || location < 0)
   156			return 0;
   157		mutex_lock(&avmwasp->mdio_bus->mdio_lock);
   158		value = avmwasp->mdio_bus->read(avmwasp->mdio_bus,
   159				WASP_ADDR, m_regs_wasp[location]);
   160		mutex_unlock(&avmwasp->mdio_bus->mdio_lock);
   161		return value;
   162	}
   163	
   164	/**
   165	 * avm_wasp_netboot_mdio_write() - write with gswip mdio bus
   166	 * @avmwasp: pointer to drivers private avm_wasp_rproc structure
   167	 * @location: register number of the m_regs_wasp register array
   168	 * @value: value to be written to the register
   169	 *
   170	 * Writes a value to the specified register for the mdio address
   171	 * that is used for the connection to the WASP SoC
   172	 * Mutex on mdio_lock is required to serialize access on bus
   173	 * Makes sure not to write to invalid registers as this can have
   174	 * unpredictable results
   175	 */
 > 176	void avm_wasp_netboot_mdio_write(struct avm_wasp_rproc *avmwasp,
   177					 int location, int value)
   178	{
   179		if (location > M_REGS_WASP_INDEX_MAX || location < 0)
   180			return;
   181		mutex_lock(&avmwasp->mdio_bus->mdio_lock);
   182		avmwasp->mdio_bus->write(avmwasp->mdio_bus, WASP_ADDR,
   183				m_regs_wasp[location], value);
   184		mutex_unlock(&avmwasp->mdio_bus->mdio_lock);
   185	}
   186	
   187	/**
   188	 * avm_wasp_netboot_mdio_write_u32_split() - write 32bit value
   189	 * @avmwasp: pointer to drivers private avm_wasp_rproc structure
   190	 * @location: register number of the m_regs_wasp register array
   191	 * @value: value to be written to the register
   192	 *
   193	 * As the mdio registers are 16bit, this function writes a 32bit value
   194	 * to two subsequent registers starting with the specified register
   195	 * for the mdio address that is used for the connection to the WASP SoC
   196	 */
 > 197	void avm_wasp_netboot_mdio_write_u32_split(struct avm_wasp_rproc *avmwasp,
   198						   int location, const u32 value)
   199	{
   200		avm_wasp_netboot_mdio_write(avmwasp, location,
   201					    ((value & 0xffff0000) >> 16));
   202		avm_wasp_netboot_mdio_write(avmwasp, location + 1,
   203					    (value & 0x0000ffff));
   204	}
   205	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux