[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508200254.WPms5O1T-lkp@intel.com>
Date: Wed, 20 Aug 2025 02:54:39 +0800
From: kernel test robot <lkp@...el.com>
To: Daniel Golle <daniel@...rotopia.org>, Hauke Mehrtens <hauke@...ke-m.de>,
Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Russell King <linux@...linux.org.uk>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
Andreas Schirm <andreas.schirm@...mens.com>,
Lukas Stockmann <lukas.stockmann@...mens.com>,
Alexander Sverdlin <alexander.sverdlin@...mens.com>,
Peter Christen <peter.christen@...mens.com>,
Avinash Jayaraman <ajayaraman@...linear.com>,
Bing tao Xu <bxu@...linear.com>, Liang Xu <lxu@...linear.com>,
Juraj Povazanec <jpovazanec@...linear.com>,
"Fanni (Fang-Yi) Chan" <fchan@...linear.com>,
"Benny (Ying-Tsan) Weng" <yweng@...linear.com>,
"Livia M. Rosu" <lrosu@...linear.com>,
John Crispin <john@...ozen.org>
Subject: Re: [PATCH net-next v2 7/8] net: dsa: lantiq_gswip: store switch API
version in priv
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@...el.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
Powered by blists - more mailing lists