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] [thread-next>] [day] [month] [year] [list]
Message-ID: <201901220016.Jto7LOw1%fengguang.wu@intel.com>
Date:   Tue, 22 Jan 2019 00:56:21 +0800
From:   kbuild test robot <lkp@...el.com>
To:     gerg@...nel.org
Cc:     kbuild-all@...org, sean.wang@...iatek.com, bjorn@...k.no,
        andrew@...n.ch, vivien.didelot@...oirfairelinux.com,
        f.fainelli@...il.com, netdev@...r.kernel.org, rene@...rst.com,
        john@...ozen.org, neil@...wn.name, Greg Ungerer <gerg@...nel.org>
Subject: Re: [PATCHv3 2/3] net: dsa: mt7530: support the 7530 switch on the
 Mediatek MT7621 SoC

Hi Greg,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]
[also build test WARNING on v5.0-rc2 next-20190116]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/gerg-kernel-org/net-ethernet-mediatek-support-MT7621-SoC-ethernet-hardware/20190121-223911
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 8.2.0-11) 8.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=8.2.0 make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   drivers/net//dsa/mt7530.c: In function 'mt7530_probe':
>> drivers/net//dsa/mt7530.c:1380:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     priv->id = (unsigned int)of_id->data;
                ^

vim +1380 drivers/net//dsa/mt7530.c

  1344	
  1345	static int
  1346	mt7530_probe(struct mdio_device *mdiodev)
  1347	{
  1348		const struct of_device_id *of_id;
  1349		struct mt7530_priv *priv;
  1350		struct device_node *dn;
  1351	
  1352		dn = mdiodev->dev.of_node;
  1353	
  1354		priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
  1355		if (!priv)
  1356			return -ENOMEM;
  1357	
  1358		priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS);
  1359		if (!priv->ds)
  1360			return -ENOMEM;
  1361	
  1362		/* Use medatek,mcm property to distinguish hardware type that would
  1363		 * casues a little bit differences on power-on sequence.
  1364		 */
  1365		priv->mcm = of_property_read_bool(dn, "mediatek,mcm");
  1366		if (priv->mcm) {
  1367			dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n");
  1368	
  1369			priv->rstc = devm_reset_control_get(&mdiodev->dev, "mcm");
  1370			if (IS_ERR(priv->rstc)) {
  1371				dev_err(&mdiodev->dev, "Couldn't get our reset line\n");
  1372				return PTR_ERR(priv->rstc);
  1373			}
  1374		}
  1375	
  1376		/* Get the hardware identifier from the devicetree node.
  1377		 * We will need it for some of the clock and regulator setup.
  1378		 */
  1379		of_id = of_match_node(mt7530_of_match, dn);
> 1380		priv->id = (unsigned int)of_id->data;
  1381	
  1382		if (priv->id == ID_MT7530) {
  1383			priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core");
  1384			if (IS_ERR(priv->core_pwr))
  1385				return PTR_ERR(priv->core_pwr);
  1386	
  1387			priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io");
  1388			if (IS_ERR(priv->io_pwr))
  1389				return PTR_ERR(priv->io_pwr);
  1390		}
  1391	
  1392		/* Not MCM that indicates switch works as the remote standalone
  1393		 * integrated circuit so the GPIO pin would be used to complete
  1394		 * the reset, otherwise memory-mapped register accessing used
  1395		 * through syscon provides in the case of MCM.
  1396		 */
  1397		if (!priv->mcm) {
  1398			priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  1399							      GPIOD_OUT_LOW);
  1400			if (IS_ERR(priv->reset)) {
  1401				dev_err(&mdiodev->dev, "Couldn't get our reset line\n");
  1402				return PTR_ERR(priv->reset);
  1403			}
  1404		}
  1405	
  1406		priv->bus = mdiodev->bus;
  1407		priv->dev = &mdiodev->dev;
  1408		priv->ds->priv = priv;
  1409		priv->ds->ops = &mt7530_switch_ops;
  1410		mutex_init(&priv->reg_mutex);
  1411		dev_set_drvdata(&mdiodev->dev, priv);
  1412	
  1413		return dsa_register_switch(priv->ds);
  1414	}
  1415	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ