[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202402071719.e1p4tUge-lkp@intel.com>
Date: Wed, 7 Feb 2024 17:19:54 +0800
From: kernel test robot <lkp@...el.com>
To: Louis Chauvet <louis.chauvet@...tlin.com>,
Mark Brown <broonie@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
Miquel Raynal <miquel.raynal@...tlin.com>, yen-mei.goh@...sight.com,
koon-kee.lie@...sight.com,
Louis Chauvet <louis.chauvet@...tlin.com>
Subject: Re: [PATCH 2/2] spi: omap2-mcspi: Add support for MULTI-mode
Hi Louis,
kernel test robot noticed the following build errors:
[auto build test ERROR on 41bccc98fb7931d63d03f326a746ac4d429c1dd3]
url: https://github.com/intel-lab-lkp/linux/commits/Louis-Chauvet/Revert-spi-spi-omap2-mcspi-c-Toggle-CS-after-each-word/20240206-180243
base: 41bccc98fb7931d63d03f326a746ac4d429c1dd3
patch link: https://lore.kernel.org/r/20240126-spi-omap2-mcspi-multi-mode-v1-2-d143d33f0fe0%40bootlin.com
patch subject: [PATCH 2/2] spi: omap2-mcspi: Add support for MULTI-mode
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240207/202402071719.e1p4tUge-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240207/202402071719.e1p4tUge-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/202402071719.e1p4tUge-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_prepare_message':
>> drivers/spi/spi-omap2-mcspi.c:1415:30: error: 'master' undeclared (first use in this function)
1415 | omap2_mcspi_set_mode(master);
| ^~~~~~
drivers/spi/spi-omap2-mcspi.c:1415:30: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/spi/spi-omap2-mcspi.c:1388:13: warning: unused variable 'speed_hz' [-Wunused-variable]
1388 | u32 speed_hz;
| ^~~~~~~~
vim +/master +1415 drivers/spi/spi-omap2-mcspi.c
1379
1380 static int omap2_mcspi_prepare_message(struct spi_controller *ctlr,
1381 struct spi_message *msg)
1382 {
1383 struct omap2_mcspi *mcspi = spi_controller_get_devdata(ctlr);
1384 struct omap2_mcspi_regs *ctx = &mcspi->ctx;
1385 struct omap2_mcspi_cs *cs;
1386 struct spi_transfer *tr;
1387 u8 bits_per_word;
> 1388 u32 speed_hz;
1389
1390 /*
1391 * The conditions are strict, it is mandatory to check each transfer of the list to see if
1392 * multi-mode is applicable.
1393 */
1394 mcspi->use_multi_mode = true;
1395 list_for_each_entry(tr, &msg->transfers, transfer_list) {
1396 if (!tr->bits_per_word)
1397 bits_per_word = msg->spi->bits_per_word;
1398 else
1399 bits_per_word = tr->bits_per_word;
1400
1401 /* Check if the transfer content is only one word */
1402 if ((bits_per_word < 8 && tr->len > 1) ||
1403 (bits_per_word >= 8 && tr->len > bits_per_word / 8))
1404 mcspi->use_multi_mode = false;
1405
1406 /* Check if transfer asks to change the CS status after the transfer */
1407 if (!tr->cs_change)
1408 mcspi->use_multi_mode = false;
1409
1410 /* If at least one message is not compatible, switch back to single mode */
1411 if (!mcspi->use_multi_mode)
1412 break;
1413 }
1414
> 1415 omap2_mcspi_set_mode(master);
1416
1417 /* In single mode only a single channel can have the FORCE bit enabled
1418 * in its chconf0 register.
1419 * Scan all channels and disable them except the current one.
1420 * A FORCE can remain from a last transfer having cs_change enabled
1421 *
1422 * In multi mode all FORCE bits must be disabled.
1423 */
1424 list_for_each_entry(cs, &ctx->cs, node) {
1425 if (msg->spi->controller_state == cs && !mcspi->use_multi_mode) {
1426 continue;
1427 }
1428
1429 if ((cs->chconf0 & OMAP2_MCSPI_CHCONF_FORCE)) {
1430 cs->chconf0 &= ~OMAP2_MCSPI_CHCONF_FORCE;
1431 writel_relaxed(cs->chconf0,
1432 cs->base + OMAP2_MCSPI_CHCONF0);
1433 readl_relaxed(cs->base + OMAP2_MCSPI_CHCONF0);
1434 }
1435 }
1436
1437 return 0;
1438 }
1439
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists