From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/net/phy/microchip_t1.c:1299 lan887x_phy_init() warn: 'priv->clock' can also be NULL
Date: Sun, 14 Dec 2025 16:32:13 +0800 [thread overview]
Message-ID: <202512141607.90chDMzT-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Divya Koppera <divya.koppera@microchip.com>
CC: Jakub Kicinski <kuba@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
commit: 8541fc12edcdef36a02885672f22ca8391bd2443 net: phy: microchip_t1: Enable pin out specific to lan887x phy for PEROUT signal
date: 11 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 11 months ago
config: sparc-randconfig-r072-20251213 (https://download.01.org/0day-ci/archive/20251214/202512141607.90chDMzT-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 15.1.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 <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512141607.90chDMzT-lkp@intel.com/
smatch warnings:
drivers/net/phy/microchip_t1.c:1299 lan887x_phy_init() warn: 'priv->clock' can also be NULL
vim +1299 drivers/net/phy/microchip_t1.c
0941c832823498 Divya Koppera 2024-08-21 1279
0941c832823498 Divya Koppera 2024-08-21 1280 static int lan887x_phy_init(struct phy_device *phydev)
0941c832823498 Divya Koppera 2024-08-21 1281 {
9fc3d6fe802923 Divya Koppera 2024-12-19 1282 struct lan887x_priv *priv = phydev->priv;
0941c832823498 Divya Koppera 2024-08-21 1283 int ret;
0941c832823498 Divya Koppera 2024-08-21 1284
9fc3d6fe802923 Divya Koppera 2024-12-19 1285 if (!priv->init_done && phy_interrupt_is_valid(phydev)) {
9fc3d6fe802923 Divya Koppera 2024-12-19 1286 priv->clock = mchp_rds_ptp_probe(phydev, MDIO_MMD_VEND1,
9fc3d6fe802923 Divya Koppera 2024-12-19 1287 MCHP_RDS_PTP_LTC_BASE_ADDR,
9fc3d6fe802923 Divya Koppera 2024-12-19 1288 MCHP_RDS_PTP_PORT_BASE_ADDR);
9fc3d6fe802923 Divya Koppera 2024-12-19 1289 if (IS_ERR(priv->clock))
9fc3d6fe802923 Divya Koppera 2024-12-19 1290 return PTR_ERR(priv->clock);
9fc3d6fe802923 Divya Koppera 2024-12-19 1291
8541fc12edcdef Divya Koppera 2025-01-15 1292 /* Enable pin mux for EVT */
8541fc12edcdef Divya Koppera 2025-01-15 1293 phy_modify_mmd(phydev, MDIO_MMD_VEND1,
8541fc12edcdef Divya Koppera 2025-01-15 1294 LAN887X_MX_CHIP_TOP_REG_CONTROL1,
8541fc12edcdef Divya Koppera 2025-01-15 1295 LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN,
8541fc12edcdef Divya Koppera 2025-01-15 1296 LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN);
8541fc12edcdef Divya Koppera 2025-01-15 1297
8541fc12edcdef Divya Koppera 2025-01-15 1298 /* Initialize pin numbers specific to PEROUT */
8541fc12edcdef Divya Koppera 2025-01-15 @1299 priv->clock->event_pin = 3;
8541fc12edcdef Divya Koppera 2025-01-15 1300
9fc3d6fe802923 Divya Koppera 2024-12-19 1301 priv->init_done = true;
9fc3d6fe802923 Divya Koppera 2024-12-19 1302 }
9fc3d6fe802923 Divya Koppera 2024-12-19 1303
0941c832823498 Divya Koppera 2024-08-21 1304 /* Clear loopback */
0941c832823498 Divya Koppera 2024-08-21 1305 ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1,
0941c832823498 Divya Koppera 2024-08-21 1306 LAN887X_MIS_CFG_REG2,
0941c832823498 Divya Koppera 2024-08-21 1307 LAN887X_MIS_CFG_REG2_FE_LPBK_EN);
0941c832823498 Divya Koppera 2024-08-21 1308 if (ret < 0)
0941c832823498 Divya Koppera 2024-08-21 1309 return ret;
0941c832823498 Divya Koppera 2024-08-21 1310
0941c832823498 Divya Koppera 2024-08-21 1311 /* Configure default behavior of led to link and activity for any
0941c832823498 Divya Koppera 2024-08-21 1312 * speed
0941c832823498 Divya Koppera 2024-08-21 1313 */
0941c832823498 Divya Koppera 2024-08-21 1314 ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1,
0941c832823498 Divya Koppera 2024-08-21 1315 LAN887X_COMMON_LED3_LED2,
0941c832823498 Divya Koppera 2024-08-21 1316 LAN887X_COMMON_LED2_MODE_SEL_MASK,
0941c832823498 Divya Koppera 2024-08-21 1317 LAN887X_LED_LINK_ACT_ANY_SPEED);
0941c832823498 Divya Koppera 2024-08-21 1318 if (ret < 0)
0941c832823498 Divya Koppera 2024-08-21 1319 return ret;
0941c832823498 Divya Koppera 2024-08-21 1320
0941c832823498 Divya Koppera 2024-08-21 1321 /* PHY interface setup */
0941c832823498 Divya Koppera 2024-08-21 1322 return lan887x_config_phy_interface(phydev);
0941c832823498 Divya Koppera 2024-08-21 1323 }
0941c832823498 Divya Koppera 2024-08-21 1324
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-12-14 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-14 8:32 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-12-15 19:03 drivers/net/phy/microchip_t1.c:1299 lan887x_phy_init() warn: 'priv->clock' can also be NULL kernel test robot
2025-12-16 13:27 ` Dan Carpenter
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=202512141607.90chDMzT-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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.