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]
Message-ID: <202506120428.xh54jIu7-lkp@intel.com>
Date: Thu, 12 Jun 2025 04:56:42 +0800
From: kernel test robot <lkp@...el.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
	netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Justin Chen <justin.chen@...adcom.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: bcmasp: enable GRO software interrupt
 coalescing by default

Hi Florian,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Florian-Fainelli/net-bcmasp-Utilize-napi_complete_done-return-value/20250611-140255
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250610173835.2244404-3-florian.fainelli%40broadcom.com
patch subject: [PATCH net-next 2/2] net: bcmasp: enable GRO software interrupt coalescing by default
config: parisc-randconfig-002-20250612 (https://download.01.org/0day-ci/archive/20250612/202506120428.xh54jIu7-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250612/202506120428.xh54jIu7-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506120428.xh54jIu7-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c: In function 'bcmasp_interface_create':
>> drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c:1282:36: error: passing argument 1 of 'netdev_sw_irq_coalesce_default_on' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1282 |  netdev_sw_irq_coalesce_default_on(dev);
         |                                    ^~~
         |                                    |
         |                                    struct device *
   In file included from include/linux/etherdevice.h:21,
                    from drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c:8:
   include/linux/netdevice.h:93:59: note: expected 'struct net_device *' but argument is of type 'struct device *'
      93 | void netdev_sw_irq_coalesce_default_on(struct net_device *dev);
         |                                        ~~~~~~~~~~~~~~~~~~~^~~
   cc1: some warnings being treated as errors


vim +/netdev_sw_irq_coalesce_default_on +1282 drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

  1198	
  1199	struct bcmasp_intf *bcmasp_interface_create(struct bcmasp_priv *priv,
  1200						    struct device_node *ndev_dn, int i)
  1201	{
  1202		struct device *dev = &priv->pdev->dev;
  1203		struct bcmasp_intf *intf;
  1204		struct net_device *ndev;
  1205		int ch, port, ret;
  1206	
  1207		if (of_property_read_u32(ndev_dn, "reg", &port)) {
  1208			dev_warn(dev, "%s: invalid port number\n", ndev_dn->name);
  1209			goto err;
  1210		}
  1211	
  1212		if (of_property_read_u32(ndev_dn, "brcm,channel", &ch)) {
  1213			dev_warn(dev, "%s: invalid ch number\n", ndev_dn->name);
  1214			goto err;
  1215		}
  1216	
  1217		ndev = alloc_etherdev(sizeof(struct bcmasp_intf));
  1218		if (!ndev) {
  1219			dev_warn(dev, "%s: unable to alloc ndev\n", ndev_dn->name);
  1220			goto err;
  1221		}
  1222		intf = netdev_priv(ndev);
  1223	
  1224		intf->parent = priv;
  1225		intf->ndev = ndev;
  1226		intf->channel = ch;
  1227		intf->port = port;
  1228		intf->ndev_dn = ndev_dn;
  1229		intf->index = i;
  1230	
  1231		ret = of_get_phy_mode(ndev_dn, &intf->phy_interface);
  1232		if (ret < 0) {
  1233			dev_err(dev, "invalid PHY mode property\n");
  1234			goto err_free_netdev;
  1235		}
  1236	
  1237		if (intf->phy_interface == PHY_INTERFACE_MODE_INTERNAL)
  1238			intf->internal_phy = true;
  1239	
  1240		intf->phy_dn = of_parse_phandle(ndev_dn, "phy-handle", 0);
  1241		if (!intf->phy_dn && of_phy_is_fixed_link(ndev_dn)) {
  1242			ret = of_phy_register_fixed_link(ndev_dn);
  1243			if (ret) {
  1244				dev_warn(dev, "%s: failed to register fixed PHY\n",
  1245					 ndev_dn->name);
  1246				goto err_free_netdev;
  1247			}
  1248			intf->phy_dn = ndev_dn;
  1249		}
  1250	
  1251		/* Map resource */
  1252		bcmasp_map_res(priv, intf);
  1253	
  1254		if ((!phy_interface_mode_is_rgmii(intf->phy_interface) &&
  1255		     intf->phy_interface != PHY_INTERFACE_MODE_MII &&
  1256		     intf->phy_interface != PHY_INTERFACE_MODE_INTERNAL) ||
  1257		    (intf->port != 1 && intf->internal_phy)) {
  1258			netdev_err(intf->ndev, "invalid PHY mode: %s for port %d\n",
  1259				   phy_modes(intf->phy_interface), intf->port);
  1260			ret = -EINVAL;
  1261			goto err_free_netdev;
  1262		}
  1263	
  1264		ret = of_get_ethdev_address(ndev_dn, ndev);
  1265		if (ret) {
  1266			netdev_warn(ndev, "using random Ethernet MAC\n");
  1267			eth_hw_addr_random(ndev);
  1268		}
  1269	
  1270		SET_NETDEV_DEV(ndev, dev);
  1271		intf->ops = &bcmasp_intf_ops;
  1272		ndev->netdev_ops = &bcmasp_netdev_ops;
  1273		ndev->ethtool_ops = &bcmasp_ethtool_ops;
  1274		intf->msg_enable = netif_msg_init(-1, NETIF_MSG_DRV |
  1275						  NETIF_MSG_PROBE |
  1276						  NETIF_MSG_LINK);
  1277		ndev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_SG |
  1278				  NETIF_F_RXCSUM;
  1279		ndev->hw_features |= ndev->features;
  1280		ndev->needed_headroom += sizeof(struct bcmasp_pkt_offload);
  1281	
> 1282		netdev_sw_irq_coalesce_default_on(dev);
  1283	
  1284		return intf;
  1285	
  1286	err_free_netdev:
  1287		free_netdev(ndev);
  1288	err:
  1289		return NULL;
  1290	}
  1291	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ