Hi Antoine,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on robh/for-next net/master linus/master v5.6-rc3 next-20200227]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Antoine-Tenart/net-phy-mscc-add-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
2b99e54b30ed56201dedd91e6049ed83aa9d2302
config: arc-randconfig-a001-20200228 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/firmware.h:6,
from drivers/net/phy/mscc.c:10:
drivers/net/phy/mscc.c: In function 'vsc8584_config_init':
drivers/net/phy/mscc.c:2838:23: error: 'dev' undeclared (first use in this
function); did you mean 'cdev'?
2838 | if (of_find_property(dev->of_node, "vsc8584,rgmii-skew-rx", NULL)
||
| ^~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
| ^~~~
> drivers/net/phy/mscc.c:2838:2: note: in expansion of macro
'if'
2838 | if (of_find_property(dev->of_node,
"vsc8584,rgmii-skew-rx", NULL) ||
| ^~
drivers/net/phy/mscc.c:2838:23: note: each undeclared identifier is reported only once
for each function it appears in
2838 | if (of_find_property(dev->of_node, "vsc8584,rgmii-skew-rx", NULL)
||
| ^~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
| ^~~~
> drivers/net/phy/mscc.c:2838:2: note: in expansion of macro
'if'
2838 | if (of_find_property(dev->of_node,
"vsc8584,rgmii-skew-rx", NULL) ||
| ^~
vim +/if +2838 drivers/net/phy/mscc.c
2825
2826 phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD);
2827
2828 val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1);
2829 val &= ~(MEDIA_OP_MODE_MASK | VSC8584_MAC_IF_SELECTION_MASK);
2830 val |= (MEDIA_OP_MODE_COPPER << MEDIA_OP_MODE_POS) |
2831 (VSC8584_MAC_IF_SELECTION_SGMII << VSC8584_MAC_IF_SELECTION_POS);
2832 ret = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, val);
2833
2834 ret = genphy_soft_reset(phydev);
2835 if (ret)
2836 return ret;
2837
2838 if (of_find_property(dev->of_node,
"vsc8584,rgmii-skew-rx", NULL) ||
2839
of_find_property(dev->of_node, "vsc8584,rgmii-skew-tx", NULL)) {
2840 of_property_read_u32(dev->of_node, "vsc8584,rgmii-skew-rx",
&skew_rx);
2841 of_property_read_u32(dev->of_node, "vsc8584,rgmii-skew-tx",
&skew_tx);
2842
2843 phy_modify_paged(phydev, MSCC_PHY_PAGE_EXTENDED_2,
2844 MSCC_PHY_RGMII_SETTINGS,
2845 (0x7 << RGMII_SKEW_RX_POS) |
2846 (0x7 << RGMII_SKEW_TX_POS),
2847 (skew_rx << RGMII_SKEW_RX_POS) |
2848 (skew_tx << RGMII_SKEW_TX_POS));
2849 }
2850
2851 for (i = 0; i < vsc8531->nleds; i++) {
2852 ret = vsc85xx_led_cntl_set(phydev, i, vsc8531->leds_mode[i]);
2853 if (ret)
2854 return ret;
2855 }
2856
2857 return 0;
2858
2859 err:
2860 mutex_unlock(&phydev->mdio.bus->mdio_lock);
2861 return ret;
2862 }
2863
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org