lkml.org 
[lkml]   [2020]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v8 5/5] net: phy: DP83822: Add setting the fixed internal delay
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@intel.com>

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@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-06-19 05:34    [W:0.086 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site