mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Golle <daniel@makrotopia.org>,
	Hauke Mehrtens <hauke@hauke-m.de>, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
	Andreas Schirm <andreas.schirm@siemens.com>,
	Lukas Stockmann <lukas.stockmann@siemens.com>,
	Alexander Sverdlin <alexander.sverdlin@siemens.com>,
	Peter Christen <peter.christen@siemens.com>,
	Avinash Jayaraman <ajayaraman@maxlinear.com>,
	Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
	Juraj Povazanec <jpovazanec@maxlinear.com>,
	"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
	"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
	"Livia M. Rosu" <lrosu@maxlinear.com>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v2 7/8] net: dsa: lantiq_gswip: store switch API version in priv
Date: Wed, 20 Aug 2025 02:54:39 +0800	[thread overview]
Message-ID: <202508200254.WPms5O1T-lkp@intel.com> (raw)
In-Reply-To: <56f6b06e22b3b6dbfb45ef04a43bac13a8cb02e5.1755564606.git.daniel@makrotopia.org>

Hi Daniel,

kernel test robot noticed the following build warnings:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/net-dsa-lantiq_gswip-deduplicate-dsa_switch_ops/20250819-094007
base:   net-next/main
patch link:    https://lore.kernel.org/r/56f6b06e22b3b6dbfb45ef04a43bac13a8cb02e5.1755564606.git.daniel%40makrotopia.org
patch subject: [PATCH net-next v2 7/8] net: dsa: lantiq_gswip: store switch API version in priv
config: m68k-randconfig-r113-20250819 (https://download.01.org/0day-ci/archive/20250820/202508200254.WPms5O1T-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250820/202508200254.WPms5O1T-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508200254.WPms5O1T-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/dsa/lantiq_gswip.c:1940:25: sparse: sparse: cast to restricted __le16
>> drivers/net/dsa/lantiq_gswip.c:1940:25: sparse: sparse: cast to restricted __le16
>> drivers/net/dsa/lantiq_gswip.c:1940:25: sparse: sparse: cast to restricted __le16
>> drivers/net/dsa/lantiq_gswip.c:1940:25: sparse: sparse: cast to restricted __le16

vim +1940 drivers/net/dsa/lantiq_gswip.c

  1869	
  1870	static int gswip_probe(struct platform_device *pdev)
  1871	{
  1872		struct device_node *np, *gphy_fw_np;
  1873		struct device *dev = &pdev->dev;
  1874		struct gswip_priv *priv;
  1875		int err;
  1876		int i;
  1877		u32 version;
  1878	
  1879		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
  1880		if (!priv)
  1881			return -ENOMEM;
  1882	
  1883		priv->gswip = devm_platform_ioremap_resource(pdev, 0);
  1884		if (IS_ERR(priv->gswip))
  1885			return PTR_ERR(priv->gswip);
  1886	
  1887		priv->mdio = devm_platform_ioremap_resource(pdev, 1);
  1888		if (IS_ERR(priv->mdio))
  1889			return PTR_ERR(priv->mdio);
  1890	
  1891		priv->mii = devm_platform_ioremap_resource(pdev, 2);
  1892		if (IS_ERR(priv->mii))
  1893			return PTR_ERR(priv->mii);
  1894	
  1895		priv->hw_info = of_device_get_match_data(dev);
  1896		if (!priv->hw_info)
  1897			return -EINVAL;
  1898	
  1899		priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
  1900		if (!priv->ds)
  1901			return -ENOMEM;
  1902	
  1903		priv->ds->dev = dev;
  1904		priv->ds->num_ports = priv->hw_info->max_ports;
  1905		priv->ds->priv = priv;
  1906		priv->ds->ops = &gswip_switch_ops;
  1907		priv->ds->phylink_mac_ops = &gswip_phylink_mac_ops;
  1908		priv->dev = dev;
  1909		mutex_init(&priv->pce_table_lock);
  1910		version = gswip_switch_r(priv, GSWIP_VERSION);
  1911	
  1912		np = dev->of_node;
  1913		switch (version) {
  1914		case GSWIP_VERSION_2_0:
  1915		case GSWIP_VERSION_2_1:
  1916			if (!of_device_is_compatible(np, "lantiq,xrx200-gswip"))
  1917				return -EINVAL;
  1918			break;
  1919		case GSWIP_VERSION_2_2:
  1920		case GSWIP_VERSION_2_2_ETC:
  1921			if (!of_device_is_compatible(np, "lantiq,xrx300-gswip") &&
  1922			    !of_device_is_compatible(np, "lantiq,xrx330-gswip"))
  1923				return -EINVAL;
  1924			break;
  1925		default:
  1926			return dev_err_probe(dev, -ENOENT,
  1927					     "unknown GSWIP version: 0x%x\n", version);
  1928		}
  1929	
  1930		/* bring up the mdio bus */
  1931		gphy_fw_np = of_get_compatible_child(dev->of_node, "lantiq,gphy-fw");
  1932		if (gphy_fw_np) {
  1933			err = gswip_gphy_fw_list(priv, gphy_fw_np, version);
  1934			of_node_put(gphy_fw_np);
  1935			if (err)
  1936				return dev_err_probe(dev, err,
  1937						     "gphy fw probe failed\n");
  1938		}
  1939	
> 1940		priv->version = le16_to_cpu(version);
  1941	
  1942		/* bring up the mdio bus */
  1943		err = gswip_mdio(priv);
  1944		if (err) {
  1945			dev_err_probe(dev, err, "mdio probe failed\n");
  1946			goto gphy_fw_remove;
  1947		}
  1948	
  1949		err = dsa_register_switch(priv->ds);
  1950		if (err) {
  1951			dev_err_probe(dev, err, "dsa switch registration failed\n");
  1952			goto gphy_fw_remove;
  1953		}
  1954	
  1955		err = gswip_validate_cpu_port(priv->ds);
  1956		if (err)
  1957			goto disable_switch;
  1958	
  1959		platform_set_drvdata(pdev, priv);
  1960	
  1961		dev_info(dev, "probed GSWIP version %lx mod %lx\n",
  1962			 (version & GSWIP_VERSION_REV_MASK) >> GSWIP_VERSION_REV_SHIFT,
  1963			 (version & GSWIP_VERSION_MOD_MASK) >> GSWIP_VERSION_MOD_SHIFT);
  1964		return 0;
  1965	
  1966	disable_switch:
  1967		gswip_mdio_mask(priv, GSWIP_MDIO_GLOB_ENABLE, 0, GSWIP_MDIO_GLOB);
  1968		dsa_unregister_switch(priv->ds);
  1969	gphy_fw_remove:
  1970		for (i = 0; i < priv->num_gphy_fw; i++)
  1971			gswip_gphy_fw_remove(priv, &priv->gphy_fw[i]);
  1972		return err;
  1973	}
  1974	

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

  reply	other threads:[~2025-08-19 18:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19  1:31 [PATCH net-next v2 0/8] net: dsa: lantiq_gswip: prepare for supporting new features Daniel Golle
2025-08-19  1:31 ` [PATCH net-next v2 1/8] net: dsa: lantiq_gswip: deduplicate dsa_switch_ops Daniel Golle
2025-08-19  1:32 ` [PATCH net-next v2 2/8] net: dsa: lantiq_gswip: prepare for more CPU port options Daniel Golle
2025-08-19  1:33 ` [PATCH net-next v2 3/8] net: dsa: lantiq_gswip: move definitions to header Daniel Golle
2025-08-19 10:50   ` Vladimir Oltean
2025-08-19 11:11     ` Daniel Golle
2025-08-19 12:11       ` Vladimir Oltean
2025-08-19  1:33 ` [PATCH net-next v2 4/8] net: dsa: lantiq_gswip: introduce bitmap for MII ports Daniel Golle
2025-08-19  1:33 ` [PATCH net-next v2 5/8] net: dsa: lantiq_gswip: load model-specific microcode Daniel Golle
2025-08-19  1:33 ` [PATCH net-next v2 6/8] net: dsa: lantiq_gswip: make DSA tag protocol model-specific Daniel Golle
2025-08-19  1:34 ` [PATCH net-next v2 7/8] net: dsa: lantiq_gswip: store switch API version in priv Daniel Golle
2025-08-19 18:54   ` kernel test robot [this message]
2025-08-19  1:34 ` [PATCH net-next v2 8/8] net: dsa: lantiq_gswip: add support for SWAPI version 2.3 Daniel Golle
2025-08-19 10:53 ` [PATCH net-next v2 0/8] net: dsa: lantiq_gswip: prepare for supporting new features Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508200254.WPms5O1T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ajayaraman@maxlinear.com \
    --cc=alexander.sverdlin@siemens.com \
    --cc=andreas.schirm@siemens.com \
    --cc=andrew@lunn.ch \
    --cc=bxu@maxlinear.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fchan@maxlinear.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=jpovazanec@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lrosu@maxlinear.com \
    --cc=lukas.stockmann@siemens.com \
    --cc=lxu@maxlinear.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olteanv@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=peter.christen@siemens.com \
    --cc=yweng@maxlinear.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®