[frank-w-bpi-r2-4.14:7.2-rc 164/164] drivers/net/pcs/pcs-mtk-lynxi.c:477:13: warning: variable 'flags' set but not used
kernel test robot <[email protected]> Tue, 28 Jul 2026 05:24:20 +0800
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/frank-w/BPI-R2-4.14 7.2-rc head: 23918d7eab97daf57988a8a538a870c4e862b525 commit: 9f04fd76bc18f52ae96c6487be54d8c8bedca353 [164/164] net: pcs: mtk-lynxi: add phya tx rx clock path config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20260728/[email protected]/config) compiler: hppa-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): drivers/net/pcs/pcs-mtk-lynxi.c: In function 'mtk_pcs_lynxi_probe': >> drivers/net/pcs/pcs-mtk-lynxi.c:477:13: warning: variable 'flags' set but not used [-Wunused-but-set-variable=] 477 | u32 flags = 0; | ^~~~~ vim +/flags +477 drivers/net/pcs/pcs-mtk-lynxi.c 468 469 #ifdef CONFIG_FWNODE_PCS 470 static int mtk_pcs_lynxi_probe(struct platform_device *pdev) 471 { 472 struct device *dev = &pdev->dev; 473 struct device_node *np = dev->of_node; 474 struct mtk_pcs_lynxi *mpcs; 475 struct phylink_pcs *pcs; 476 struct regmap *regmap; > 477 u32 flags = 0; 478 479 mpcs = devm_kzalloc(dev, sizeof(*mpcs), GFP_KERNEL); 480 if (!mpcs) 481 return -ENOMEM; 482 483 mpcs->dev = dev; 484 regmap = syscon_node_to_regmap(np->parent); 485 if (IS_ERR(regmap)) 486 return PTR_ERR(regmap); 487 488 if (of_property_read_bool(np->parent, "mediatek,phya_trx_ck")) 489 flags |= MTK_SGMII_FLAG_PHYA_TRX_CK; 490 491 if (of_parse_phandle(np->parent, "resets", 0)) { 492 mpcs->rstc = of_reset_control_get_shared(np->parent, NULL); 493 if (IS_ERR(mpcs->rstc)) 494 return PTR_ERR(mpcs->rstc); 495 } else 496 mpcs->rstc = NULL; 497 498 reset_control_deassert(mpcs->rstc); 499 mpcs->sgmii_sel = devm_clk_get_enabled(dev, "sgmii_sel"); 500 if (IS_ERR(mpcs->sgmii_sel)) 501 return PTR_ERR(mpcs->sgmii_sel); 502 503 mpcs->sgmii_rx = devm_clk_get(dev, "sgmii_rx"); 504 if (IS_ERR(mpcs->sgmii_rx)) 505 return PTR_ERR(mpcs->sgmii_rx); 506 507 mpcs->sgmii_tx = devm_clk_get(dev, "sgmii_tx"); 508 if (IS_ERR(mpcs->sgmii_tx)) 509 return PTR_ERR(mpcs->sgmii_tx); 510 511 if (of_parse_phandle(dev->of_node, "phys", 0)) { 512 mpcs->xfi_tphy = devm_of_phy_get(mpcs->dev, dev->of_node, NULL); 513 if (IS_ERR(mpcs->xfi_tphy)) 514 return PTR_ERR(mpcs->xfi_tphy); 515 } else 516 mpcs->xfi_tphy = NULL; 517 518 pcs = mtk_pcs_lynxi_init(dev, of_fwnode_handle(np), regmap, 519 (uintptr_t)of_device_get_match_data(dev), 520 mpcs); 521 if (IS_ERR(pcs)) 522 return PTR_ERR(pcs); 523 524 regmap_set_bits(mpcs->regmap, SGMSYS_QPHY_PWR_STATE_CTRL, SGMII_PHYA_PWD); 525 526 platform_set_drvdata(pdev, mpcs); 527 528 return fwnode_pcs_add_provider(of_fwnode_handle(np), fwnode_pcs_simple_get, &mpcs->pcs); 529 } 530 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki