* Re: [RESEND PATCH net-next v2] net: phylink: Add helpers for c22 registers without MDIO [not found] <20211118161430.2547168-1-sean.anderson@seco.com> @ 2021-11-18 21:07 ` kernel test robot 2021-11-18 21:16 ` Sean Anderson 0 siblings, 1 reply; 2+ messages in thread From: kernel test robot @ 2021-11-18 21:07 UTC (permalink / raw) To: Sean Anderson, netdev, Russell King Cc: llvm, kbuild-all, Heiner Kallweit, Andrew Lunn, linux-kernel, David S . Miller, Jakub Kicinski, Sean Anderson [-- Attachment #1: Type: text/plain, Size: 3298 bytes --] Hi Sean, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Sean-Anderson/net-phylink-Add-helpers-for-c22-registers-without-MDIO/20211119-002726 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bb8cecf8ba127abca8ccd102207a59c55fdae515 config: hexagon-randconfig-r045-20211118 (attached as .config) 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/1af77aa70fbd03602e8db3d621fdaf4e8a301e98 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sean-Anderson/net-phylink-Add-helpers-for-c22-registers-without-MDIO/20211119-002726 git checkout 1af77aa70fbd03602e8db3d621fdaf4e8a301e98 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon 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 >>): >> drivers/net/phy/phylink.c:2952:10: warning: result of comparison of constant -22 with expression of type 'u16' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare] if (adv != -EINVAL) { ~~~ ^ ~~~~~~~ 1 warning generated. vim +2952 drivers/net/phy/phylink.c 2930 2931 /** 2932 * phylink_mii_c22_pcs_config() - configure clause 22 PCS 2933 * @pcs: a pointer to a &struct mdio_device. 2934 * @mode: link autonegotiation mode 2935 * @interface: the PHY interface mode being configured 2936 * @advertising: the ethtool advertisement mask 2937 * 2938 * Configure a Clause 22 PCS PHY with the appropriate negotiation 2939 * parameters for the @mode, @interface and @advertising parameters. 2940 * Returns negative error number on failure, zero if the advertisement 2941 * has not changed, or positive if there is a change. 2942 */ 2943 int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode, 2944 phy_interface_t interface, 2945 const unsigned long *advertising) 2946 { 2947 bool changed = 0; 2948 u16 adv, bmcr; 2949 int ret; 2950 2951 adv = phylink_mii_c22_pcs_encode_advertisement(interface, advertising); > 2952 if (adv != -EINVAL) { 2953 ret = mdiobus_modify_changed(pcs->bus, pcs->addr, 2954 MII_ADVERTISE, 0xffff, adv); 2955 if (ret < 0) 2956 return ret; 2957 changed = ret; 2958 } 2959 2960 /* Ensure ISOLATE bit is disabled */ 2961 if (mode == MLO_AN_INBAND && 2962 linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising)) 2963 bmcr = BMCR_ANENABLE; 2964 else 2965 bmcr = 0; 2966 2967 ret = mdiodev_modify(pcs, MII_BMCR, BMCR_ANENABLE | BMCR_ISOLATE, bmcr); 2968 if (ret < 0) 2969 return ret; 2970 2971 return changed; 2972 } 2973 EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_config); 2974 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 26052 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH net-next v2] net: phylink: Add helpers for c22 registers without MDIO 2021-11-18 21:07 ` [RESEND PATCH net-next v2] net: phylink: Add helpers for c22 registers without MDIO kernel test robot @ 2021-11-18 21:16 ` Sean Anderson 0 siblings, 0 replies; 2+ messages in thread From: Sean Anderson @ 2021-11-18 21:16 UTC (permalink / raw) To: kernel test robot, netdev, Russell King Cc: llvm, kbuild-all, Heiner Kallweit, Andrew Lunn, linux-kernel, David S . Miller, Jakub Kicinski On 11/18/21 4:07 PM, kernel test robot wrote: > Hi Sean, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on net-next/master] > > url: https://github.com/0day-ci/linux/commits/Sean-Anderson/net-phylink-Add-helpers-for-c22-registers-without-MDIO/20211119-002726 > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bb8cecf8ba127abca8ccd102207a59c55fdae515 > config: hexagon-randconfig-r045-20211118 (attached as .config) > 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/1af77aa70fbd03602e8db3d621fdaf4e8a301e98 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Sean-Anderson/net-phylink-Add-helpers-for-c22-registers-without-MDIO/20211119-002726 > git checkout 1af77aa70fbd03602e8db3d621fdaf4e8a301e98 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon > > 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 >>): > >>> drivers/net/phy/phylink.c:2952:10: warning: result of comparison of constant -22 with expression of type 'u16' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare] > if (adv != -EINVAL) { > ~~~ ^ ~~~~~~~ > 1 warning generated. Hmm, looks like this should be ret = phylink_mii_c22_pcs_encode_advertisement(); if (ret > 0) { ... } and just eliminate adv --Sean > > vim +2952 drivers/net/phy/phylink.c > > 2930 > 2931 /** > 2932 * phylink_mii_c22_pcs_config() - configure clause 22 PCS > 2933 * @pcs: a pointer to a &struct mdio_device. > 2934 * @mode: link autonegotiation mode > 2935 * @interface: the PHY interface mode being configured > 2936 * @advertising: the ethtool advertisement mask > 2937 * > 2938 * Configure a Clause 22 PCS PHY with the appropriate negotiation > 2939 * parameters for the @mode, @interface and @advertising parameters. > 2940 * Returns negative error number on failure, zero if the advertisement > 2941 * has not changed, or positive if there is a change. > 2942 */ > 2943 int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode, > 2944 phy_interface_t interface, > 2945 const unsigned long *advertising) > 2946 { > 2947 bool changed = 0; > 2948 u16 adv, bmcr; > 2949 int ret; > 2950 > 2951 adv = phylink_mii_c22_pcs_encode_advertisement(interface, advertising); >> 2952 if (adv != -EINVAL) { > 2953 ret = mdiobus_modify_changed(pcs->bus, pcs->addr, > 2954 MII_ADVERTISE, 0xffff, adv); > 2955 if (ret < 0) > 2956 return ret; > 2957 changed = ret; > 2958 } > 2959 > 2960 /* Ensure ISOLATE bit is disabled */ > 2961 if (mode == MLO_AN_INBAND && > 2962 linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising)) > 2963 bmcr = BMCR_ANENABLE; > 2964 else > 2965 bmcr = 0; > 2966 > 2967 ret = mdiodev_modify(pcs, MII_BMCR, BMCR_ANENABLE | BMCR_ISOLATE, bmcr); > 2968 if (ret < 0) > 2969 return ret; > 2970 > 2971 return changed; > 2972 } > 2973 EXPORT_SYMBOL_GPL(phylink_mii_c22_pcs_config); > 2974 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-18 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211118161430.2547168-1-sean.anderson@seco.com>
2021-11-18 21:07 ` [RESEND PATCH net-next v2] net: phylink: Add helpers for c22 registers without MDIO kernel test robot
2021-11-18 21:16 ` Sean Anderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox