Re: [PATCH net-next v8 5/5] net: phy: DP83822: Add setting the fixed internal delay

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

 



Hi Dan,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Dan-Murphy/RGMII-Internal-delay-common-property/20200619-051238
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cb8e59cc87201af93dfbb6c3dccc8fcad72a09c2
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/net/phy/dp83822.c:284:7: warning: variable 'rgmii_delay' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (rx_int_delay <= 0)
^~~~~~~~~~~~~~~~~
drivers/net/phy/dp83822.c:296:7: note: uninitialized use occurs here
if (rgmii_delay) {
^~~~~~~~~~~
drivers/net/phy/dp83822.c:284:3: note: remove the 'if' if its condition is always false
if (rx_int_delay <= 0)
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/dp83822.c:276:17: note: initialize the variable 'rgmii_delay' to silence this warning
int rgmii_delay;
^
= 0
1 warning generated.

vim +284 drivers/net/phy/dp83822.c

   272	
   273	static int dp83822_config_init(struct phy_device *phydev)
   274	{
   275		struct device *dev = &phydev->mdio.dev;
   276		int rgmii_delay;
   277		s32 rx_int_delay;
   278		s32 tx_int_delay;
   279		int err = 0;
   280	
   281		if (phy_interface_is_rgmii(phydev)) {
   282			rx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0,
   283							      true);
 > 284			if (rx_int_delay <= 0)
   285				rx_int_delay = 0;
   286			else
   287				rgmii_delay = DP83822_RX_CLK_SHIFT;
   288	
   289			tx_int_delay = phy_get_internal_delay(phydev, dev, NULL, 0,
   290							      false);
   291			if (tx_int_delay <= 0)
   292				tx_int_delay = 0;
   293			else
   294				rgmii_delay |= DP83822_TX_CLK_SHIFT;
   295	
   296			if (rgmii_delay) {
   297				err = phy_set_bits_mmd(phydev, DP83822_DEVADDR,
   298						       MII_DP83822_RCSR, rgmii_delay);
   299				if (err)
   300					return err;
   301			}
   302		}
   303	
   304		return dp8382x_disable_wol(phydev);
   305	}
   306	

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