All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>,
	netdev@vger.kernel.org, linux@armlinux.org.uk
Cc: llvm@lists.linux.dev, 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>
Subject: Re: [PATCH net-next v2 5/6] net: txgbe: Implement phylink pcs
Date: Mon, 17 Apr 2023 22:47:27 +0800	[thread overview]
Message-ID: <202304172223.PoHEDYCs-lkp@intel.com> (raw)
In-Reply-To: <20230411092725.104992-6-jiawenwu@trustnetic.com>

Hi Jiawen,

kernel test robot noticed the following build warnings:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Jiawen-Wu/net-txgbe-Add-software-nodes-to-support-phylink/20230411-173314
patch link:    https://lore.kernel.org/r/20230411092725.104992-6-jiawenwu%40trustnetic.com
patch subject: [PATCH net-next v2 5/6] net: txgbe: Implement phylink pcs
config: riscv-randconfig-r042-20230417 (https://download.01.org/0day-ci/archive/20230417/202304172223.PoHEDYCs-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 9638da200e00bd069e6dd63604e14cbafede9324)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/5903347a21d42b4f2d632e08e04890d7f638a947
        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/20230411-173314
        git checkout 5903347a21d42b4f2d632e08e04890d7f638a947
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/net/ethernet/wangxun/txgbe/

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c:269:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (interface == txgbe->interface)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c:325:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c:269:2: note: remove the 'if' if its condition is always false
           if (interface == txgbe->interface)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c:267:9: note: initialize the variable 'ret' to silence this warning
           int ret, val;
                  ^
                   = 0
   1 warning generated.


vim +269 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c

   259	
   260	static int txgbe_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
   261				    phy_interface_t interface,
   262				    const unsigned long *advertising,
   263				    bool permit_pause_to_mac)
   264	{
   265		struct txgbe *txgbe = container_of(pcs, struct txgbe, pcs);
   266		struct wx *wx = txgbe->wx;
   267		int ret, val;
   268	
 > 269		if (interface == txgbe->interface)
   270			goto out;
   271	
   272		/* Wait xpcs power-up good */
   273		ret = read_poll_timeout(pcs_read, val,
   274					(val & TXGBE_PCS_DIG_STS_PSEQ_ST) ==
   275					TXGBE_PCS_DIG_STS_PSEQ_ST_GOOD,
   276					10000, 1000000, false,
   277					txgbe, MDIO_MMD_PCS, TXGBE_PCS_DIG_STS);
   278		if (ret < 0) {
   279			wx_err(wx, "xpcs power-up timeout.\n");
   280			return ret;
   281		}
   282	
   283		/* Disable xpcs AN-73 */
   284		pcs_write(txgbe, MDIO_MMD_AN, MDIO_CTRL1, 0);
   285	
   286		/* Disable PHY MPLLA for eth mode change(after ECO) */
   287		txgbe_ephy_write(txgbe, TXGBE_SUP_DIG_MPLLA_OVRD_IN_0, 0x243A);
   288		WX_WRITE_FLUSH(wx);
   289		usleep_range(1000, 2000);
   290	
   291		/* Set the eth change_mode bit first in mis_rst register
   292		 * for corresponding LAN port
   293		 */
   294		wr32(wx, TXGBE_MIS_RST, TXGBE_MIS_RST_LAN_ETH_MODE(wx->bus.func));
   295	
   296		switch (interface) {
   297		case PHY_INTERFACE_MODE_10GBASER:
   298			txgbe_pma_config_10gbaser(txgbe);
   299			break;
   300		case PHY_INTERFACE_MODE_1000BASEX:
   301			txgbe_pma_config_1000basex(txgbe);
   302			break;
   303		default:
   304			break;
   305		}
   306	
   307		pcs_write(txgbe, MDIO_MMD_PCS, TXGBE_PCS_DIG_CTRL1,
   308			  TXGBE_PCS_DIG_CTRL1_VR_RST | TXGBE_PCS_DIG_CTRL1_EN_VSMMD1);
   309		/* wait phy initialization done */
   310		ret = read_poll_timeout(pcs_read, val,
   311					!(val & TXGBE_PCS_DIG_CTRL1_VR_RST),
   312					100000, 10000000, false,
   313					txgbe, MDIO_MMD_PCS, TXGBE_PCS_DIG_CTRL1);
   314		if (ret < 0)
   315			wx_err(wx, "PHY initialization timeout.\n");
   316	
   317		txgbe->interface = interface;
   318	
   319	out:
   320		if (interface == PHY_INTERFACE_MODE_1000BASEX) {
   321			txgbe_setup_adv(txgbe, interface, advertising);
   322			txgbe_set_an37_ability(txgbe);
   323		}
   324	
   325		return ret;
   326	}
   327	

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

  parent reply	other threads:[~2023-04-17 14:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11  9:27 [PATCH net-next v2 0/6] TXGBE PHYLINK support Jiawen Wu
2023-04-11  9:27 ` [PATCH net-next v2 1/6] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-04-11 12:51   ` Andrew Lunn
2023-04-11  9:27 ` [PATCH net-next v2 2/6] net: txgbe: Implement I2C bus master driver Jiawen Wu
2023-04-11  9:32   ` Jiawen Wu
2023-04-11 10:08     ` Jarkko Nikula
2023-04-13 16:28       ` Wolfram Sang
2023-04-14 11:04         ` Jiawen Wu
2023-04-15 15:11           ` Andrew Lunn
2023-04-17  1:46             ` Jiawen Wu
2023-04-17  3:17           ` Jiawen Wu
2023-04-11  9:27 ` [PATCH net-next v2 3/6] net: txgbe: Add SFP module identify Jiawen Wu
2023-04-11 12:52   ` Andrew Lunn
2023-04-11  9:27 ` [PATCH net-next v2 4/6] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-04-11  9:27 ` [PATCH net-next v2 5/6] net: txgbe: Implement phylink pcs Jiawen Wu
2023-04-11 10:36   ` Russell King (Oracle)
2023-04-11 11:03   ` Simon Horman
2023-04-17 14:47   ` kernel test robot [this message]
2023-04-11  9:27 ` [PATCH net-next v2 6/6] net: txgbe: Support phylink MAC layer Jiawen Wu
2023-04-11 10:44   ` Russell King (Oracle)
2023-04-11 12:43     ` Andrew Lunn

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=202304172223.PoHEDYCs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.