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>] [day] [month] [year] [list]
Message-ID: <20200602034843.GC32005@intel.com>
Date:   Tue, 2 Jun 2020 11:48:43 +0800
From:   kbuild test robot <lkp@...el.com>
To:     "Andrew, Lunn," <andrew@...n.ch>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/staging/netlogic/xlr_net.c:832:20: error: assignment to
 expression with array type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3c1bcc8614db10803f1f57ef0295363917448cb2 net: ethernet: Convert phydev advertize and supported from u32 to link mode
config: mips-randconfig-r016-20200601 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
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
        git checkout 3c1bcc8614db10803f1f57ef0295363917448cb2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

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

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

drivers/staging/netlogic/xlr_net.c: In function 'xlr_gmac_link_adjust':
drivers/staging/netlogic/xlr_net.c:801:6: warning: variable 'intreg' set but not used [-Wunused-but-set-variable]
801 |  u32 intreg;
|      ^~~~~~
drivers/staging/netlogic/xlr_net.c: In function 'xlr_mii_probe':
>> drivers/staging/netlogic/xlr_net.c:832:20: error: assignment to expression with array type
832 |  phydev->supported &= (ADVERTISED_10baseT_Full
|                    ^~
drivers/staging/netlogic/xlr_net.c:840:22: error: assignment to expression with array type
840 |  phydev->advertising = phydev->supported;
|                      ^

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3c1bcc8614db10803f1f57ef0295363917448cb2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3c1bcc8614db10803f1f57ef0295363917448cb2
vim +832 drivers/staging/netlogic/xlr_net.c

6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  796  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  797  static void xlr_gmac_link_adjust(struct net_device *ndev)
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  798  {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  799  	struct xlr_net_priv *priv = netdev_priv(ndev);
3fe01e2406ead2 Andrew Lunn        2016-01-11  800  	struct phy_device *phydev = xlr_get_phydev(priv);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06 @801  	u32 intreg;
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  802  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  803  	intreg = xlr_nae_rdreg(priv->base_addr, R_INTREG);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  804  	if (phydev->link) {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  805  		if (phydev->speed != priv->phy_speed) {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  806  			xlr_set_gmac_speed(priv);
f8397bc69095f6 Ganesan Ramalingam 2014-08-21  807  			pr_info("gmac%d : Link up\n", priv->port_id);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  808  		}
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  809  	} else {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  810  		xlr_set_gmac_speed(priv);
f8397bc69095f6 Ganesan Ramalingam 2014-08-21  811  		pr_info("gmac%d : Link down\n", priv->port_id);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  812  	}
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  813  }
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  814  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  815  static int xlr_mii_probe(struct xlr_net_priv *priv)
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  816  {
3fe01e2406ead2 Andrew Lunn        2016-01-11  817  	struct phy_device *phydev = xlr_get_phydev(priv);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  818  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  819  	if (!phydev) {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  820  		pr_err("no PHY found on phy_addr %d\n", priv->phy_addr);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  821  		return -ENODEV;
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  822  	}
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  823  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  824  	/* Attach MAC to PHY */
84eff6d194df44 Andrew Lunn        2016-01-06  825  	phydev = phy_connect(priv->ndev, phydev_name(phydev),
968b4e6bd3b00c Sandhya Bankar     2016-03-19  826  			     xlr_gmac_link_adjust, priv->nd->phy_interface);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  827  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  828  	if (IS_ERR(phydev)) {
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  829  		pr_err("could not attach PHY\n");
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  830  		return PTR_ERR(phydev);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  831  	}
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06 @832  	phydev->supported &= (ADVERTISED_10baseT_Full
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  833  				| ADVERTISED_10baseT_Half
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  834  				| ADVERTISED_100baseT_Full
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  835  				| ADVERTISED_100baseT_Half
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  836  				| ADVERTISED_1000baseT_Full
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  837  				| ADVERTISED_Autoneg
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  838  				| ADVERTISED_MII);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  839  
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  840  	phydev->advertising = phydev->supported;
2220943a21e26d Andrew Lunn        2016-01-06  841  	phy_attached_info(phydev);
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  842  	return 0;
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  843  }
6f98b1a250cb60 Ganesan Ramalingam 2013-03-06  844  

:::::: The code at line 832 was first introduced by commit
:::::: 6f98b1a250cb6055ab5dde41a181b2c9cf026bc9 Staging: Netlogic XLR/XLS GMAC driver

:::::: TO: Ganesan Ramalingam <ganesanr@...adcom.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
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" (22874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ