From: kernel test robot <lkp@intel.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [frank-w-bpi-r2-4.14:7.2-main 214/214] drivers/net/pcs/pcs-mtk-lynxi.c:477:6: warning: variable 'flags' set but not used
Date: Fri, 25 Sep 2026 23:25:20 +0200 [thread overview]
Message-ID: <202609252238.ooyASJLv-lkp@intel.com> (raw)
tree: https://github.com/frank-w/BPI-R2-4.14 7.2-main
head: 27e8d41a42f73cb2b271df0e897e25224889f6d0
commit: ae0add9728693a0b083a8dbabbf6362e4282b91f [214/214] net: pcs: mtk-lynxi: add phya tx rx clock path
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20260925/202609252238.ooyASJLv-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260925/202609252238.ooyASJLv-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/202609252238.ooyASJLv-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/pcs/pcs-mtk-lynxi.c:477:6: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
477 | u32 flags = 0;
| ^
1 warning generated.
--
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:5651:6: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
5651 | u32 flags = 0;
| ^
1 warning generated.
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
reply other threads:[~2026-09-25 21:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202609252238.ooyASJLv-lkp@intel.com \
--to=lkp@intel.com \
--cc=frank-w@public-files.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.