[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508110116.NWcO7Fju-lkp@intel.com>
Date: Mon, 11 Aug 2025 10:22:55 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, David Yang <mmyangfl@...il.com>,
netdev@...r.kernel.org
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
David Yang <mmyangfl@...il.com>, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Russell King <linux@...linux.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] net: dsa: yt921x: Add support for Motorcomm YT921x
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@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.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
Powered by blists - more mailing lists