lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 20 Nov 2021 08:32:03 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sean Anderson <sean.anderson@...o.com>, netdev@...r.kernel.org,
        Russell King <linux@...linux.org.uk>
Cc:     kbuild-all@...ts.01.org, Heiner Kallweit <hkallweit1@...il.com>,
        Andrew Lunn <andrew@...n.ch>, linux-kernel@...r.kernel.org,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Sean Anderson <sean.anderson@...o.com>
Subject: Re: [RESEND PATCH net-next v2] net: phylink: Add helpers for c22
 registers without MDIO

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: microblaze-randconfig-m031-20211118 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.0

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

smatch warnings:
drivers/net/phy/phylink.c:2952 phylink_mii_c22_pcs_config() warn: always true condition '(adv != -22) => (0-u16max != (-22))'

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

Download attachment ".config.gz" of type "application/gzip" (38555 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ