From: kernel test robot <lkp@intel.com>
To: Sean Anderson <sean.anderson@linux.dev>,
netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Lei Wei <quic_leiwei@quicinc.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Christian Marangi <ansuelsmth@gmail.com>,
Kory Maincent <kory.maincent@bootlin.com>,
Simon Horman <horms@kernel.org>,
Daniel Golle <daniel@makrotopia.org>,
Vineeth Karumanchi <vineeth.karumanchi@amd.com>,
linux-kernel@vger.kernel.org,
Sean Anderson <sean.anderson@linux.dev>,
Michal Simek <monstr@monstr.eu>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Robert Hancock <robert.hancock@calian.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [net-next PATCH v5 06/10] net: pcs: Add Xilinx PCS driver
Date: Sat, 24 May 2025 17:25:00 +0800 [thread overview]
Message-ID: <202505241748.uSxf3hT5-lkp@intel.com> (raw)
In-Reply-To: <20250523203339.1993685-7-sean.anderson@linux.dev>
Hi Sean,
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/Sean-Anderson/dt-bindings-net-Add-Xilinx-PCS/20250524-043901
base: net-next/main
patch link: https://lore.kernel.org/r/20250523203339.1993685-7-sean.anderson%40linux.dev
patch subject: [net-next PATCH v5 06/10] net: pcs: Add Xilinx PCS driver
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250524/202505241748.uSxf3hT5-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250524/202505241748.uSxf3hT5-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/202505241748.uSxf3hT5-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/pcs/pcs-xilinx.c:295:2: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]
295 | }
| ^
1 warning generated.
vim +295 drivers/net/pcs/pcs-xilinx.c
240
241 static int xilinx_pcs_probe(struct mdio_device *mdiodev)
242 {
243 struct device *dev = &mdiodev->dev;
244 struct fwnode_handle *fwnode = dev->fwnode;
245 int ret, i, j, mode_count;
246 struct xilinx_pcs *xp;
247 const char **modes;
248 u32 phy_id;
249
250 xp = devm_kzalloc(dev, sizeof(*xp), GFP_KERNEL);
251 if (!xp)
252 return -ENOMEM;
253 xp->mdiodev = mdiodev;
254 dev_set_drvdata(dev, xp);
255
256 xp->irq = fwnode_irq_get_byname(fwnode, "an");
257 /* There's no _optional variant, so this is the best we've got */
258 if (xp->irq < 0 && xp->irq != -EINVAL)
259 return dev_err_probe(dev, xp->irq, "could not get IRQ\n");
260
261 mode_count = fwnode_property_string_array_count(fwnode,
262 "xlnx,pcs-modes");
263 if (!mode_count)
264 mode_count = -ENODATA;
265 if (mode_count < 0) {
266 dev_err(dev, "could not read xlnx,pcs-modes: %d", mode_count);
267 return mode_count;
268 }
269
270 modes = kcalloc(mode_count, sizeof(*modes), GFP_KERNEL);
271 if (!modes)
272 return -ENOMEM;
273
274 ret = fwnode_property_read_string_array(fwnode, "xlnx,pcs-modes",
275 modes, mode_count);
276 if (ret < 0) {
277 dev_err(dev, "could not read xlnx,pcs-modes: %d\n", ret);
278 kfree(modes);
279 return ret;
280 }
281
282 for (i = 0; i < mode_count; i++) {
283 for (j = 0; j < ARRAY_SIZE(xilinx_pcs_interfaces); j++) {
284 if (!strcmp(phy_modes(xilinx_pcs_interfaces[j]), modes[i])) {
285 __set_bit(xilinx_pcs_interfaces[j],
286 xp->pcs.supported_interfaces);
287 goto next;
288 }
289 }
290
291 dev_err(dev, "invalid pcs-mode \"%s\"\n", modes[i]);
292 kfree(modes);
293 return -EINVAL;
294 next:
> 295 }
296
297 kfree(modes);
298 if ((test_bit(PHY_INTERFACE_MODE_SGMII, xp->pcs.supported_interfaces) ||
299 test_bit(PHY_INTERFACE_MODE_1000BASEX, xp->pcs.supported_interfaces)) &&
300 test_bit(PHY_INTERFACE_MODE_2500BASEX, xp->pcs.supported_interfaces)) {
301 dev_err(dev,
302 "Switching from SGMII or 1000Base-X to 2500Base-X not supported\n");
303 return -EINVAL;
304 }
305
306 xp->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
307 if (IS_ERR(xp->reset))
308 return dev_err_probe(dev, PTR_ERR(xp->reset),
309 "could not get reset gpio\n");
310
311 xp->done = devm_gpiod_get_optional(dev, "done", GPIOD_IN);
312 if (IS_ERR(xp->done))
313 return dev_err_probe(dev, PTR_ERR(xp->done),
314 "could not get done gpio\n");
315
316 xp->refclk = devm_clk_get_optional_enabled(dev, "refclk");
317 if (IS_ERR(xp->refclk))
318 return dev_err_probe(dev, PTR_ERR(xp->refclk),
319 "could not get/enable reference clock\n");
320
321 gpiod_set_value_cansleep(xp->reset, 0);
322 if (xp->done) {
323 if (read_poll_timeout(gpiod_get_value_cansleep, ret, ret, 1000,
324 100000, true, xp->done))
325 return dev_err_probe(dev, -ETIMEDOUT,
326 "timed out waiting for reset\n");
327 } else {
328 /* Just wait for a while and hope we're done */
329 usleep_range(50000, 100000);
330 }
331
332 if (fwnode_property_present(fwnode, "#clock-cells")) {
333 const char *parent = "refclk";
334 struct clk_init_data init = {
335 .name = fwnode_get_name(fwnode),
336 .ops = &xilinx_pcs_clk_ops,
337 .parent_names = &parent,
338 .num_parents = 1,
339 .flags = 0,
340 };
341
342 xp->refclk_out.init = &init;
343 ret = devm_clk_hw_register(dev, &xp->refclk_out);
344 if (ret)
345 return dev_err_probe(dev, ret,
346 "could not register refclk\n");
347
348 ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
349 &xp->refclk_out);
350 if (ret)
351 return dev_err_probe(dev, ret,
352 "could not register refclk\n");
353 }
354
355 /* Sanity check */
356 ret = get_phy_c22_id(mdiodev->bus, mdiodev->addr, &phy_id);
357 if (ret)
358 return dev_err_probe(dev, ret, "could not read id\n");
359 if ((phy_id & 0xfffffff0) != 0x01740c00)
360 dev_warn(dev, "unknown phy id %x\n", phy_id);
361
362 if (xp->irq < 0) {
363 xp->pcs.poll = true;
364 } else {
365 /* The IRQ is enabled by default; turn it off */
366 ret = mdiodev_write(xp->mdiodev, XILINX_PCS_ANICR, 0);
367 if (ret) {
368 dev_err(dev, "could not disable IRQ: %d\n", ret);
369 return ret;
370 }
371
372 /* Some PCSs have a bad habit of re-enabling their IRQ!
373 * Request the IRQ in probe so we don't end up triggering the
374 * spurious IRQ logic.
375 */
376 ret = devm_request_threaded_irq(dev, xp->irq, NULL, xilinx_pcs_an_irq,
377 IRQF_SHARED | IRQF_ONESHOT,
378 dev_name(dev), xp);
379 if (ret) {
380 dev_err(dev, "could not request IRQ: %d\n", ret);
381 return ret;
382 }
383 }
384
385 xp->pcs.ops = &xilinx_pcs_ops;
386 ret = devm_pcs_register(dev, &xp->pcs);
387 if (ret)
388 return dev_err_probe(dev, ret, "could not register PCS\n");
389
390 if (xp->irq < 0)
391 dev_info(dev, "probed with irq=poll\n");
392 else
393 dev_info(dev, "probed with irq=%d\n", xp->irq);
394 return 0;
395 }
396
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-24 9:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 20:33 [net-next PATCH v5 00/10] Add PCS core support Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 01/10] dt-bindings: net: Add Xilinx PCS Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 02/10] net: phylink: Support setting PCS link change callbacks Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 03/10] net: pcs: Add subsystem Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 04/10] net: dsa: ocelot: suppress PHY device scanning on the internal MDIO bus Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 05/10] net: pcs: lynx: Convert to an MDIO driver Sean Anderson
2025-05-23 21:33 ` Heiner Kallweit
2025-05-23 21:39 ` Sean Anderson
2025-05-23 22:07 ` Sean Anderson
2025-05-23 22:47 ` Sean Anderson
2025-05-24 0:05 ` Russell King (Oracle)
2025-05-24 8:21 ` kernel test robot
2025-05-24 8:42 ` kernel test robot
2025-05-24 10:27 ` kernel test robot
2025-05-24 13:34 ` kernel test robot
2025-05-23 20:33 ` [net-next PATCH v5 06/10] net: pcs: Add Xilinx PCS driver Sean Anderson
2025-05-24 9:25 ` kernel test robot [this message]
2025-05-23 20:33 ` [net-next PATCH v5 07/10] net: axienet: Convert to use PCS subsystem Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 08/10] net: macb: Move most of mac_config to mac_prepare Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 09/10] net: macb: Support external PCSs Sean Anderson
2025-05-23 20:33 ` [net-next PATCH v5 10/10] of: property: Add device link support for PCS Sean Anderson
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=202505241748.uSxf3hT5-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=monstr@monstr.eu \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=quic_leiwei@quicinc.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robert.hancock@calian.com \
--cc=sean.anderson@linux.dev \
--cc=vineeth.karumanchi@amd.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;
as well as URLs for NNTP newsgroup(s).