All of lore.kernel.org
 help / color / mirror / Atom feed
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.4-rc 37/154] drivers/net/pcs/pcs-mtk-lynxi.c:548:13: warning: variable 'flags' set but not used
Date: Sun, 08 Nov 2026 06:35:02 +0800	[thread overview]
Message-ID: <202611080644.BNoAGULv-lkp@intel.com> (raw)

tree:   https://github.com/frank-w/BPI-R2-4.14 7.4-rc
head:   674a64f97be4d25967f31216ffe7eaefdabf827f
commit: 51267acf54375bc00d77b438e7557a1fc0f0017e [37/154] net: pcs: mtk-lynxi: add phya tx rx clock path
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20261108/202611080644.BNoAGULv-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261108/202611080644.BNoAGULv-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/202611080644.BNoAGULv-lkp@intel.com/

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:548:13: warning: variable 'flags' set but not used [-Wunused-but-set-variable=]
     548 |         u32 flags = 0;
         |             ^~~~~
--
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_sgmii_init':
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:5524:13: warning: variable 'flags' set but not used [-Wunused-but-set-variable=]
    5524 |         u32 flags = 0;
         |             ^~~~~


vim +/flags +548 drivers/net/pcs/pcs-mtk-lynxi.c

   538	
   539	#if IS_ENABLED(CONFIG_FWNODE_PCS)
   540	static int mtk_pcs_lynxi_probe(struct platform_device *pdev)
   541	{
   542		struct device *dev = &pdev->dev;
   543		struct fwnode_pcs_provider *pcs_provider;
   544		struct device_node *np = dev->of_node;
   545		struct mtk_pcs_lynxi *mpcs;
   546		struct phylink_pcs *pcs;
   547		struct regmap *regmap;
 > 548		u32 flags = 0;
   549	
   550		mpcs = devm_kzalloc(dev, sizeof(*mpcs), GFP_KERNEL);
   551		if (!mpcs)
   552			return -ENOMEM;
   553	
   554		mpcs->dev = dev;
   555		regmap = syscon_node_to_regmap(np->parent);
   556		if (IS_ERR(regmap))
   557			return PTR_ERR(regmap);
   558	
   559		if (of_property_read_bool(np->parent, "mediatek,phya_trx_ck"))
   560			flags |= MTK_SGMII_FLAG_PHYA_TRX_CK;
   561	
   562		if (of_parse_phandle(np->parent, "resets", 0)) {
   563			mpcs->rstc = of_reset_control_get_shared(np->parent, NULL);
   564			if (IS_ERR(mpcs->rstc))
   565				return PTR_ERR(mpcs->rstc);
   566		} else
   567			mpcs->rstc = NULL;
   568	
   569		reset_control_deassert(mpcs->rstc);
   570		mpcs->sgmii_sel = devm_clk_get_enabled(dev, "sgmii_sel");
   571		if (IS_ERR(mpcs->sgmii_sel))
   572			return PTR_ERR(mpcs->sgmii_sel);
   573	
   574		mpcs->sgmii_rx = devm_clk_get(dev, "sgmii_rx");
   575		if (IS_ERR(mpcs->sgmii_rx))
   576			return PTR_ERR(mpcs->sgmii_rx);
   577	
   578		mpcs->sgmii_tx = devm_clk_get(dev, "sgmii_tx");
   579		if (IS_ERR(mpcs->sgmii_tx))
   580			return PTR_ERR(mpcs->sgmii_tx);
   581	
   582		mpcs->xfi_tphy = devm_of_phy_optional_get(mpcs->dev, np, NULL);
   583		if (IS_ERR(mpcs->xfi_tphy))
   584			return PTR_ERR(mpcs->xfi_tphy);
   585	
   586		pcs = mtk_pcs_lynxi_init(dev, of_fwnode_handle(np), regmap,
   587					 (uintptr_t)of_device_get_match_data(dev),
   588					 mpcs);
   589		if (IS_ERR(pcs))
   590			return PTR_ERR(pcs);
   591	
   592		regmap_set_bits(mpcs->regmap, SGMSYS_QPHY_PWR_STATE_CTRL, SGMII_PHYA_PWD);
   593	
   594		platform_set_drvdata(pdev, mpcs);
   595	
   596		pcs_provider = devm_fwnode_pcs_add_provider(dev, dev_fwnode(dev),
   597							    fwnode_pcs_simple_xlate, &mpcs->pcs);
   598		if (IS_ERR(pcs_provider))
   599			return PTR_ERR(pcs_provider);
   600	
   601		return 0;
   602	}
   603	

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

                 reply	other threads:[~2026-11-07 22:35 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=202611080644.BNoAGULv-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.