[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f65330e7-825b-46ff-8e95-c046a2359705@stanley.mountain>
Date: Tue, 7 Jan 2025 10:10:34 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Divya Koppera <divya.koppera@...rochip.com>,
andrew@...n.ch, arun.ramadoss@...rochip.com,
UNGLinuxDriver@...rochip.com, hkallweit1@...il.com,
linux@...linux.org.uk, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, richardcochran@...il.com,
vadim.fedorenko@...ux.dev
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH net-next 3/3] net: phy: microchip_rds_ptp : Add PEROUT
feature library for RDS PTP supported phys
Hi Divya,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Divya-Koppera/net-phy-microchip_rds_ptp-Header-file-library-changes-for-PEROUT/20250103-171126
base: net-next/main
patch link: https://lore.kernel.org/r/20250103090731.1355-4-divya.koppera%40microchip.com
patch subject: [PATCH net-next 3/3] net: phy: microchip_rds_ptp : Add PEROUT feature library for RDS PTP supported phys
config: arm64-randconfig-r072-20250107 (https://download.01.org/0day-ci/archive/20250107/202501071428.F9gIQY3T-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 096551537b2a747a3387726ca618ceeb3950e9bc)
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/202501071428.F9gIQY3T-lkp@intel.com/
smatch warnings:
drivers/net/phy/microchip_rds_ptp.c:247 mchp_rds_ptp_perout_off() error: uninitialized symbol 'event'.
vim +/event +247 drivers/net/phy/microchip_rds_ptp.c
568c86a861124f Divya Koppera 2025-01-03 228 static int mchp_rds_ptp_perout_off(struct mchp_rds_ptp_clock *clock,
568c86a861124f Divya Koppera 2025-01-03 229 s8 gpio_pin)
568c86a861124f Divya Koppera 2025-01-03 230 {
568c86a861124f Divya Koppera 2025-01-03 231 u16 general_config;
568c86a861124f Divya Koppera 2025-01-03 232 int event;
568c86a861124f Divya Koppera 2025-01-03 233 int rc;
568c86a861124f Divya Koppera 2025-01-03 234
568c86a861124f Divya Koppera 2025-01-03 235 if (clock->mchp_rds_ptp_event_a == gpio_pin)
568c86a861124f Divya Koppera 2025-01-03 236 event = MCHP_RDS_PTP_EVT_A;
568c86a861124f Divya Koppera 2025-01-03 237 else if (clock->mchp_rds_ptp_event_b == gpio_pin)
568c86a861124f Divya Koppera 2025-01-03 238 event = MCHP_RDS_PTP_EVT_B;
What about: else return -EINVAL;?
568c86a861124f Divya Koppera 2025-01-03 239
568c86a861124f Divya Koppera 2025-01-03 240 /* Set target to too far in the future, effectively disabling it */
568c86a861124f Divya Koppera 2025-01-03 241 rc = mchp_set_clock_target(clock, gpio_pin, 0xFFFFFFFF, 0);
568c86a861124f Divya Koppera 2025-01-03 242 if (rc < 0)
568c86a861124f Divya Koppera 2025-01-03 243 return rc;
568c86a861124f Divya Koppera 2025-01-03 244
568c86a861124f Divya Koppera 2025-01-03 245 general_config = mchp_rds_phy_read_mmd(clock, MCHP_RDS_PTP_GEN_CFG,
568c86a861124f Divya Koppera 2025-01-03 246 MCHP_RDS_PTP_CLOCK);
568c86a861124f Divya Koppera 2025-01-03 @247 general_config |= MCHP_RDS_PTP_GEN_CFG_RELOAD_ADD_X_(event);
568c86a861124f Divya Koppera 2025-01-03 248 rc = mchp_rds_phy_write_mmd(clock, MCHP_RDS_PTP_GEN_CFG,
568c86a861124f Divya Koppera 2025-01-03 249 MCHP_RDS_PTP_CLOCK, general_config);
568c86a861124f Divya Koppera 2025-01-03 250 if (rc < 0)
568c86a861124f Divya Koppera 2025-01-03 251 return rc;
568c86a861124f Divya Koppera 2025-01-03 252
568c86a861124f Divya Koppera 2025-01-03 253 if (event == MCHP_RDS_PTP_EVT_A)
568c86a861124f Divya Koppera 2025-01-03 254 clock->mchp_rds_ptp_event_a = -1;
568c86a861124f Divya Koppera 2025-01-03 255
568c86a861124f Divya Koppera 2025-01-03 256 if (event == MCHP_RDS_PTP_EVT_B)
568c86a861124f Divya Koppera 2025-01-03 257 clock->mchp_rds_ptp_event_b = -1;
568c86a861124f Divya Koppera 2025-01-03 258
568c86a861124f Divya Koppera 2025-01-03 259 return 0;
568c86a861124f Divya Koppera 2025-01-03 260 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists