[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202410111611.EMSfFrYK-lkp@intel.com>
Date: Fri, 11 Oct 2024 16:28:07 +0800
From: kernel test robot <lkp@...el.com>
To: Gerhard Engleder <gerhard@...leder-embedded.com>,
linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, arnd@...db.de,
gregkh@...uxfoundation.org,
Gerhard Engleder <gerhard@...leder-embedded.com>
Subject: Re: [PATCH 2/6] misc: keba: Add LAN9252 driver
Hi Gerhard,
kernel test robot noticed the following build warnings:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.12-rc2 next-20241010]
[cannot apply to soc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Gerhard-Engleder/misc-keba-Add-SPI-controller-device/20241010-051016
base: char-misc/char-misc-testing
patch link: https://lore.kernel.org/r/20241009202949.20164-3-gerhard%40engleder-embedded.com
patch subject: [PATCH 2/6] misc: keba: Add LAN9252 driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241011/202410111611.EMSfFrYK-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241011/202410111611.EMSfFrYK-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410111611.EMSfFrYK-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/misc/keba/lan9252.c:299:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
299 | return ret;
| ^~~
drivers/misc/keba/lan9252.c:291:9: note: initialize the variable 'ret' to silence this warning
291 | int ret;
| ^
| = 0
1 warning generated.
vim +/ret +299 drivers/misc/keba/lan9252.c
286
287 static int lan9252_probe(struct spi_device *spi)
288 {
289 u32 data;
290 int retry = SPI_RETRY_COUNT;
291 int ret;
292
293 /* execute specified initialization sequence */
294 while (retry && !lan9252_init(spi))
295 retry--;
296 if (retry == 0) {
297 dev_err(&spi->dev,
298 "Can't initialize LAN9252 SPI communication!");
> 299 return ret;
300 }
301
302 /* enable access to MII management for PDI */
303 ret = lan9252_access_mii(spi, true);
304 if (ret) {
305 dev_err(&spi->dev, "Can't enable access to MII management!");
306 return ret;
307 }
308
309 /*
310 * check PHY configuration and configure if necessary
311 * - full duplex
312 * - auto negotiation disabled
313 * - 100 Mbps
314 */
315 ret = lan9252_mii_read(spi, PHY_ADDRESS, MII_BMCR, &data);
316 if (ret) {
317 dev_err(&spi->dev, "Can't read LAN9252 configuration!");
318 goto out;
319 }
320 if (!(data & BMCR_FULLDPLX) || (data & BMCR_ANENABLE) ||
321 !(data & BMCR_SPEED100)) {
322 /*
323 */
324 data &= ~(BMCR_ANENABLE);
325 data |= (BMCR_FULLDPLX | BMCR_SPEED100);
326 ret = lan9252_mii_write(spi, PHY_ADDRESS, MII_BMCR, data);
327 if (ret)
328 dev_err(&spi->dev,
329 "Can't write LAN9252 configuration!");
330 }
331
332 dev_info(&spi->dev, "LAN9252 PHY configuration");
333
334 out:
335 /* disable access to MII management for PDI */
336 lan9252_access_mii(spi, false);
337
338 return ret;
339 }
340
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists