Re: [PATCH net-next v4 4/4] net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

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

 



Hi Dan,

I love your patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Dan-Murphy/DP83TD510-Single-Pair-10Mbps-Ethernet-PHY/20201118-041918
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 72308ecbf33b145641aba61071be31a85ebfd92c
config: arm-randconfig-m031-20201118 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/ec556cedbd640ecfa25713eadf48e5b7ee74fda3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dan-Murphy/DP83TD510-Single-Pair-10Mbps-Ethernet-PHY/20201118-041918
        git checkout ec556cedbd640ecfa25713eadf48e5b7ee74fda3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers/net/phy/dp83td510.c: In function 'dp83869_of_init':
>> drivers/net/phy/dp83td510.c:450:2: error: 'dp83td510' undeclared (first use in this function)
     450 |  dp83td510->hi_diff_output = DP83TD510_2_4V_P2P
         |  ^~~~~~~~~
   drivers/net/phy/dp83td510.c:450:2: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/phy/dp83td510.c:451:2: error: expected ';' before 'dp83td510'
     451 |  dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_5_B_NIB
         |  ^~~~~~~~~
   drivers/net/phy/dp83td510.c:453:1: error: no return statement in function returning non-void [-Werror=return-type]
     453 | }
         | ^
   drivers/net/phy/dp83td510.c: In function 'dp83td510_probe':
>> drivers/net/phy/dp83td510.c:468:8: error: implicit declaration of function 'dp83td510_of_init'; did you mean 'dp83td510_config_init'? [-Werror=implicit-function-declaration]
     468 |  ret = dp83td510_of_init(phydev);
         |        ^~~~~~~~~~~~~~~~~
         |        dp83td510_config_init
   At top level:
   drivers/net/phy/dp83td510.c:448:12: warning: 'dp83869_of_init' defined but not used [-Wunused-function]
     448 | static int dp83869_of_init(struct phy_device *phydev)
         |            ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/dp83td510 +450 drivers/net/phy/dp83td510.c

   390	
   391	#if IS_ENABLED(CONFIG_OF_MDIO)
   392	static int dp83td510_of_init(struct phy_device *phydev)
   393	{
   394		struct dp83td510_private *dp83td510 = phydev->priv;
   395		struct device *dev = &phydev->mdio.dev;
   396		struct device_node *of_node = dev->of_node;
   397		s32 rx_int_delay;
   398		s32 tx_int_delay;
   399		int ret;
   400	
   401		if (!of_node)
   402			return -ENODEV;
   403	
   404		ret = of_property_read_u32(phydev->mdio.dev.of_node,
   405					   "max-tx-rx-p2p-microvolt",
   406					   &dp83td510->hi_diff_output);
   407		if (ret)
   408			dp83td510->hi_diff_output = DP83TD510_2_4V_P2P;
   409	
   410		if (dp83td510->hi_diff_output != DP83TD510_2_4V_P2P &&
   411		    dp83td510->hi_diff_output != DP83TD510_1_1V_P2P)
   412			return -EINVAL;
   413	
   414		if (of_property_read_u32(phydev->mdio.dev.of_node, "tx-fifo-depth",
   415					 &dp83td510->tx_fifo_depth))
   416			dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_5_B_NIB;
   417	
   418		switch (dp83td510->tx_fifo_depth) {
   419		case 4:
   420			dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_4_B_NIB;
   421			break;
   422		case 6:
   423			dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_6_B_NIB;
   424			break;
   425		case 8:
   426			dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_8_B_NIB;
   427			break;
   428		case 5:
   429		default:
   430			dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_5_B_NIB;
   431		}
   432	
   433		rx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0, true);
   434		if (rx_int_delay <= 0)
   435			dp83td510->rgmii_delay = DP83TD510_RX_CLK_SHIFT;
   436		else
   437			dp83td510->rgmii_delay = 0;
   438	
   439		tx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0, false);
   440		if (tx_int_delay <= 0)
   441			dp83td510->rgmii_delay |= DP83TD510_TX_CLK_SHIFT;
   442		else
   443			dp83td510->rgmii_delay &= ~DP83TD510_TX_CLK_SHIFT;
   444	
   445		return 0;
   446	}
   447	#else
   448	static int dp83869_of_init(struct phy_device *phydev)
   449	{
 > 450		dp83td510->hi_diff_output = DP83TD510_2_4V_P2P
 > 451		dp83td510->tx_fifo_depth = DP83TD510_FIFO_DEPTH_5_B_NIB
   452		return 0;
   453	}
   454	#endif /* CONFIG_OF_MDIO */
   455	
   456	static int dp83td510_probe(struct phy_device *phydev)
   457	{
   458		struct dp83td510_private *dp83td510;
   459		int ret;
   460	
   461		dp83td510 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83td510),
   462					 GFP_KERNEL);
   463		if (!dp83td510)
   464			return -ENOMEM;
   465	
   466		phydev->priv = dp83td510;
   467	
 > 468		ret = dp83td510_of_init(phydev);
   469		if (ret)
   470			return ret;
   471	
   472		return dp83td510_config_init(phydev);
   473	}
   474	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux