mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, David Yang <mmyangfl@gmail.com>,
	netdev@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	David Yang <mmyangfl@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] net: dsa: yt921x: Add support for Motorcomm YT921x
Date: Mon, 11 Aug 2025 10:22:55 +0300	[thread overview]
Message-ID: <202508110116.NWcO7Fju-lkp@intel.com> (raw)
In-Reply-To: <20250808173808.273774-3-mmyangfl@gmail.com>

Hi David,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Yang/net-dsa-tag_yt921x-add-support-for-Motorcomm-YT921x-tags/20250809-014351
base:   net/main
patch link:    https://lore.kernel.org/r/20250808173808.273774-3-mmyangfl%40gmail.com
patch subject: [PATCH 2/2] net: dsa: yt921x: Add support for Motorcomm YT921x
config: um-randconfig-r072-20250810 (https://download.01.org/0day-ci/archive/20250811/202508110116.NWcO7Fju-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0

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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202508110116.NWcO7Fju-lkp@intel.com/

smatch warnings:
drivers/net/dsa/yt921x.c:1090 yt921x_dsa_setup() error: uninitialized symbol 'val'.

vim +/val +1090 drivers/net/dsa/yt921x.c

77de450829a940 David Yang 2025-08-09  1061  static int yt921x_dsa_setup(struct dsa_switch *ds)
77de450829a940 David Yang 2025-08-09  1062  {
77de450829a940 David Yang 2025-08-09  1063  	struct yt921x_priv *priv = ds->priv;
77de450829a940 David Yang 2025-08-09  1064  	struct device *dev = priv->dev;
77de450829a940 David Yang 2025-08-09  1065  	struct device_node *np = dev->of_node;
77de450829a940 David Yang 2025-08-09  1066  
77de450829a940 David Yang 2025-08-09  1067  	struct device_node *child;
77de450829a940 David Yang 2025-08-09  1068  	int cpu_port;
77de450829a940 David Yang 2025-08-09  1069  	u32 val;
77de450829a940 David Yang 2025-08-09  1070  	int res;
77de450829a940 David Yang 2025-08-09  1071  
77de450829a940 David Yang 2025-08-09  1072  	res = yt921x_dsa_cpu_port(ds, &cpu_port);
77de450829a940 David Yang 2025-08-09  1073  	if (unlikely(res != 0))
77de450829a940 David Yang 2025-08-09  1074  		return res;
77de450829a940 David Yang 2025-08-09  1075  
77de450829a940 David Yang 2025-08-09  1076  	res = yt921x_detect(priv);
77de450829a940 David Yang 2025-08-09  1077  	if (unlikely(res != 0))
77de450829a940 David Yang 2025-08-09  1078  		return res;
77de450829a940 David Yang 2025-08-09  1079  
77de450829a940 David Yang 2025-08-09  1080  	/* Reset */
77de450829a940 David Yang 2025-08-09  1081  	res = yt921x_smi_write(priv, YT921X_RESETm, YT921X_RESET_HWf);
77de450829a940 David Yang 2025-08-09  1082  	if (unlikely(res != 0))
77de450829a940 David Yang 2025-08-09  1083  		return res;
77de450829a940 David Yang 2025-08-09  1084  
77de450829a940 David Yang 2025-08-09  1085  	/* YT921X_RESET_HWf is almost same as GPIO hard reset. So we need
77de450829a940 David Yang 2025-08-09  1086  	 * this delay.
77de450829a940 David Yang 2025-08-09  1087  	 */
77de450829a940 David Yang 2025-08-09  1088  	usleep_range(10000, 15000);
77de450829a940 David Yang 2025-08-09  1089  
77de450829a940 David Yang 2025-08-09 @1090  	res = read_poll_timeout(yt921x_smi_read, res, val == 0,
                                                                                              ^^^^^^^^
yt921x_smi_read() doesn't necessarily initialize *valp.

77de450829a940 David Yang 2025-08-09  1091  				YT921X_MDIO_SLEEP_US, YT921X_RESET_TIMEOUT_US,
77de450829a940 David Yang 2025-08-09  1092  				false, priv, YT921X_RESETm, &val);
77de450829a940 David Yang 2025-08-09  1093  	if (unlikely(res != 0)) {
77de450829a940 David Yang 2025-08-09  1094  		dev_err(dev, "Reset timeout\n");
77de450829a940 David Yang 2025-08-09  1095  		return res;
77de450829a940 David Yang 2025-08-09  1096  	}
77de450829a940 David Yang 2025-08-09  1097  
77de450829a940 David Yang 2025-08-09  1098  	/* Always register one mdio bus for the internal/default mdio bus. This
77de450829a940 David Yang 2025-08-09  1099  	 * maybe represented in the device tree, but is optional.
77de450829a940 David Yang 2025-08-09  1100  	 */

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


      parent reply	other threads:[~2025-08-11  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 17:38 [PATCH 0/2] " David Yang
2025-08-08 17:38 ` [PATCH 1/2] net: dsa: tag_yt921x: add support for Motorcomm YT921x tags David Yang
2025-08-08 19:06   ` Andrew Lunn
2025-08-08 17:38 ` [PATCH 2/2] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-08-08 19:33   ` Andrew Lunn
2025-08-11  7:22   ` Dan Carpenter [this message]

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=202508110116.NWcO7Fju-lkp@intel.com \
    --to=dan.carpenter@linaro.org \
    --cc=andrew@lunn.ch \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®