public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>,
	netdev@vger.kernel.org, jarkko.nikula@linux.intel.com,
	andriy.shevchenko@linux.intel.com,
	mika.westerberg@linux.intel.com, jsd@semihalf.com,
	Jose.Abreu@synopsys.com, andrew@lunn.ch, hkallweit1@gmail.com,
	linux@armlinux.org.uk
Cc: oe-kbuild-all@lists.linux.dev, linux-i2c@vger.kernel.org,
	linux-gpio@vger.kernel.org, mengyuanlou@net-swift.com,
	Jiawen Wu <jiawenwu@trustnetic.com>,
	Piotr Raczynski <piotr.raczynski@intel.com>
Subject: Re: [PATCH net-next v9 5/9] net: txgbe: Add SFP module identify
Date: Fri, 26 May 2023 19:30:45 +0800	[thread overview]
Message-ID: <202305261959.mnGUW17n-lkp@intel.com> (raw)
In-Reply-To: <20230524091722.522118-6-jiawenwu@trustnetic.com>

Hi Jiawen,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jiawen-Wu/net-txgbe-Add-software-nodes-to-support-phylink/20230524-173221
base:   net-next/main
patch link:    https://lore.kernel.org/r/20230524091722.522118-6-jiawenwu%40trustnetic.com
patch subject: [PATCH net-next v9 5/9] net: txgbe: Add SFP module identify
config: csky-randconfig-r003-20230525 (https://download.01.org/0day-ci/archive/20230526/202305261959.mnGUW17n-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/c382745a6443e8ff9b3fab9b10c90b216b2ca59b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jiawen-Wu/net-txgbe-Add-software-nodes-to-support-phylink/20230524-173221
        git checkout c382745a6443e8ff9b3fab9b10c90b216b2ca59b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=csky olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash drivers/net/phy/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305261959.mnGUW17n-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/phy/sfp.c: In function 'sfp_i2c_read':
>> drivers/net/phy/sfp.c:609:23: error: implicit declaration of function 'i2c_transfer' [-Werror=implicit-function-declaration]
     609 |                 ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
         |                       ^~~~~~~~~~~~
   drivers/net/phy/sfp.c: In function 'sfp_i2c_configure':
>> drivers/net/phy/sfp.c:653:14: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration]
     653 |         if (!i2c_check_functionality(i2c, I2C_FUNC_I2C))
         |              ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/phy/sfp.c: In function 'sfp_cleanup':
>> drivers/net/phy/sfp.c:2919:17: error: implicit declaration of function 'i2c_put_adapter' [-Werror=implicit-function-declaration]
    2919 |                 i2c_put_adapter(sfp->i2c);
         |                 ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for I2C_DESIGNWARE_PLATFORM
   Depends on [n]: I2C [=n] && HAS_IOMEM [=y] && (ACPI && COMMON_CLK [=y] || !ACPI)
   Selected by [y]:
   - TXGBE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y]
   WARNING: unmet direct dependencies detected for SFP
   Depends on [n]: NETDEVICES [=y] && PHYLIB [=y] && I2C [=n] && PHYLINK [=y] && (HWMON [=n] || HWMON [=n]=n)
   Selected by [y]:
   - TXGBE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y]


vim +/i2c_transfer +609 drivers/net/phy/sfp.c

73970055450eeb Russell King  2017-07-25  583  
3bb35261c74e39 Jon Nettleton 2018-02-27  584  static int sfp_i2c_read(struct sfp *sfp, bool a2, u8 dev_addr, void *buf,
3bb35261c74e39 Jon Nettleton 2018-02-27  585  			size_t len)
73970055450eeb Russell King  2017-07-25  586  {
73970055450eeb Russell King  2017-07-25  587  	struct i2c_msg msgs[2];
426c6cbc409cbd Pali Rohár    2021-01-25  588  	u8 bus_addr = a2 ? 0x51 : 0x50;
426c6cbc409cbd Pali Rohár    2021-01-25  589  	size_t block_size = sfp->i2c_block_size;
28e74a7cfd6403 Russell King  2019-06-02  590  	size_t this_len;
73970055450eeb Russell King  2017-07-25  591  	int ret;
73970055450eeb Russell King  2017-07-25  592  
73970055450eeb Russell King  2017-07-25  593  	msgs[0].addr = bus_addr;
73970055450eeb Russell King  2017-07-25  594  	msgs[0].flags = 0;
73970055450eeb Russell King  2017-07-25  595  	msgs[0].len = 1;
73970055450eeb Russell King  2017-07-25  596  	msgs[0].buf = &dev_addr;
73970055450eeb Russell King  2017-07-25  597  	msgs[1].addr = bus_addr;
73970055450eeb Russell King  2017-07-25  598  	msgs[1].flags = I2C_M_RD;
73970055450eeb Russell King  2017-07-25  599  	msgs[1].len = len;
73970055450eeb Russell King  2017-07-25  600  	msgs[1].buf = buf;
73970055450eeb Russell King  2017-07-25  601  
28e74a7cfd6403 Russell King  2019-06-02  602  	while (len) {
28e74a7cfd6403 Russell King  2019-06-02  603  		this_len = len;
0d035bed2a4a6c Russell King  2020-12-09  604  		if (this_len > block_size)
0d035bed2a4a6c Russell King  2020-12-09  605  			this_len = block_size;
28e74a7cfd6403 Russell King  2019-06-02  606  
28e74a7cfd6403 Russell King  2019-06-02  607  		msgs[1].len = this_len;
28e74a7cfd6403 Russell King  2019-06-02  608  
3bb35261c74e39 Jon Nettleton 2018-02-27 @609  		ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
73970055450eeb Russell King  2017-07-25  610  		if (ret < 0)
73970055450eeb Russell King  2017-07-25  611  			return ret;
73970055450eeb Russell King  2017-07-25  612  
28e74a7cfd6403 Russell King  2019-06-02  613  		if (ret != ARRAY_SIZE(msgs))
28e74a7cfd6403 Russell King  2019-06-02  614  			break;
28e74a7cfd6403 Russell King  2019-06-02  615  
28e74a7cfd6403 Russell King  2019-06-02  616  		msgs[1].buf += this_len;
28e74a7cfd6403 Russell King  2019-06-02  617  		dev_addr += this_len;
28e74a7cfd6403 Russell King  2019-06-02  618  		len -= this_len;
28e74a7cfd6403 Russell King  2019-06-02  619  	}
28e74a7cfd6403 Russell King  2019-06-02  620  
28e74a7cfd6403 Russell King  2019-06-02  621  	return msgs[1].buf - (u8 *)buf;
73970055450eeb Russell King  2017-07-25  622  }
73970055450eeb Russell King  2017-07-25  623  
3bb35261c74e39 Jon Nettleton 2018-02-27  624  static int sfp_i2c_write(struct sfp *sfp, bool a2, u8 dev_addr, void *buf,
73970055450eeb Russell King  2017-07-25  625  	size_t len)
73970055450eeb Russell King  2017-07-25  626  {
3bb35261c74e39 Jon Nettleton 2018-02-27  627  	struct i2c_msg msgs[1];
3bb35261c74e39 Jon Nettleton 2018-02-27  628  	u8 bus_addr = a2 ? 0x51 : 0x50;
3bb35261c74e39 Jon Nettleton 2018-02-27  629  	int ret;
3bb35261c74e39 Jon Nettleton 2018-02-27  630  
3bb35261c74e39 Jon Nettleton 2018-02-27  631  	msgs[0].addr = bus_addr;
3bb35261c74e39 Jon Nettleton 2018-02-27  632  	msgs[0].flags = 0;
3bb35261c74e39 Jon Nettleton 2018-02-27  633  	msgs[0].len = 1 + len;
3bb35261c74e39 Jon Nettleton 2018-02-27  634  	msgs[0].buf = kmalloc(1 + len, GFP_KERNEL);
3bb35261c74e39 Jon Nettleton 2018-02-27  635  	if (!msgs[0].buf)
3bb35261c74e39 Jon Nettleton 2018-02-27  636  		return -ENOMEM;
3bb35261c74e39 Jon Nettleton 2018-02-27  637  
3bb35261c74e39 Jon Nettleton 2018-02-27  638  	msgs[0].buf[0] = dev_addr;
3bb35261c74e39 Jon Nettleton 2018-02-27  639  	memcpy(&msgs[0].buf[1], buf, len);
3bb35261c74e39 Jon Nettleton 2018-02-27  640  
3bb35261c74e39 Jon Nettleton 2018-02-27  641  	ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
3bb35261c74e39 Jon Nettleton 2018-02-27  642  
3bb35261c74e39 Jon Nettleton 2018-02-27  643  	kfree(msgs[0].buf);
3bb35261c74e39 Jon Nettleton 2018-02-27  644  
3bb35261c74e39 Jon Nettleton 2018-02-27  645  	if (ret < 0)
3bb35261c74e39 Jon Nettleton 2018-02-27  646  		return ret;
3bb35261c74e39 Jon Nettleton 2018-02-27  647  
3bb35261c74e39 Jon Nettleton 2018-02-27  648  	return ret == ARRAY_SIZE(msgs) ? len : 0;
73970055450eeb Russell King  2017-07-25  649  }
73970055450eeb Russell King  2017-07-25  650  
73970055450eeb Russell King  2017-07-25  651  static int sfp_i2c_configure(struct sfp *sfp, struct i2c_adapter *i2c)
73970055450eeb Russell King  2017-07-25  652  {
73970055450eeb Russell King  2017-07-25 @653  	if (!i2c_check_functionality(i2c, I2C_FUNC_I2C))
73970055450eeb Russell King  2017-07-25  654  		return -EINVAL;
73970055450eeb Russell King  2017-07-25  655  
73970055450eeb Russell King  2017-07-25  656  	sfp->i2c = i2c;
73970055450eeb Russell King  2017-07-25  657  	sfp->read = sfp_i2c_read;
3bb35261c74e39 Jon Nettleton 2018-02-27  658  	sfp->write = sfp_i2c_write;
73970055450eeb Russell King  2017-07-25  659  
e85b1347ace677 Marek Behún   2022-09-30  660  	return 0;
e85b1347ace677 Marek Behún   2022-09-30  661  }
e85b1347ace677 Marek Behún   2022-09-30  662  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-05-26 11:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:17 [PATCH net-next v9 0/9] TXGBE PHYLINK support Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 1/9] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-05-27  8:44   ` Andy Shevchenko
2023-05-30  6:11     ` Jiawen Wu
2023-05-30 10:45       ` andy.shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 2/9] i2c: designware: Add driver support for Wangxun 10Gb NIC Jiawen Wu
2023-05-27  8:36   ` Andy Shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 3/9] net: txgbe: Register fixed rate clock Jiawen Wu
2023-05-24 12:17   ` Andrew Lunn
2023-05-24  9:17 ` [PATCH net-next v9 4/9] net: txgbe: Register I2C platform device Jiawen Wu
2023-05-26  9:35   ` kernel test robot
2023-05-27  8:38   ` Andy Shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 5/9] net: txgbe: Add SFP module identify Jiawen Wu
2023-05-26 11:30   ` kernel test robot [this message]
2023-05-26 11:36     ` Russell King (Oracle)
2023-05-29  2:06       ` Jiawen Wu
2023-05-30  8:40         ` Jiawen Wu
2023-05-31  9:19           ` Jiawen Wu
2023-05-31  9:47           ` Russell King (Oracle)
2023-05-31 10:11             ` Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 6/9] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-05-24 12:51   ` Andrew Lunn
2023-05-24 13:07     ` Russell King (Oracle)
2023-05-24  9:17 ` [PATCH net-next v9 7/9] net: pcs: Add 10GBASE-R mode for Synopsys Designware XPCS Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 8/9] net: txgbe: Implement phylink pcs Jiawen Wu
2023-05-24 12:53   ` Andrew Lunn
2023-05-26  4:14   ` Jakub Kicinski
2023-05-26  6:21     ` Jiawen Wu
2023-05-26  8:43       ` Russell King (Oracle)
2023-05-26  9:01         ` Jiawen Wu
2023-05-26  9:07           ` Russell King (Oracle)
2023-05-26  9:22             ` Jiawen Wu
2023-05-26  9:37               ` Russell King (Oracle)
2023-05-26 10:42                 ` Russell King (Oracle)
2023-05-29  1:57                   ` Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 9/9] net: txgbe: Support phylink MAC layer Jiawen Wu

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=202305261959.mnGUW17n-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hkallweit1@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jsd@semihalf.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=piotr.raczynski@intel.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