All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Witold Sadowski <wsadowski@marvell.com>,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, broonie@kernel.org,
	robh@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, pthombar@cadence.com,
	Witold Sadowski <wsadowski@marvell.com>
Subject: Re: [PATCH 5/5] cadence-xspi: Add xfer capabilities
Date: Sun, 31 Mar 2024 11:25:52 +0800	[thread overview]
Message-ID: <202403311133.jOI5kbg4-lkp@intel.com> (raw)
In-Reply-To: <20240329194849.25554-6-wsadowski@marvell.com>

Hi Witold,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on linus/master v6.9-rc1 next-20240328]
[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/Witold-Sadowski/spi-cadence-Add-new-bindings-documentation-for-Cadence-XSPI/20240330-035124
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link:    https://lore.kernel.org/r/20240329194849.25554-6-wsadowski%40marvell.com
patch subject: [PATCH 5/5] cadence-xspi: Add xfer capabilities
config: x86_64-randconfig-123-20240331 (https://download.01.org/0day-ci/archive/20240331/202403311133.jOI5kbg4-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240331/202403311133.jOI5kbg4-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403311133.jOI5kbg4-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/spi/spi-cadence-xspi.c: In function 'cdns_xspi_setup':
   drivers/spi/spi-cadence-xspi.c:892:36: error: implicit declaration of function 'spi_master_get_devdata'; did you mean 'spi_mem_get_drvdata'? [-Werror=implicit-function-declaration]
     struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(spi_dev->master);
                                       ^~~~~~~~~~~~~~~~~~~~~~
                                       spi_mem_get_drvdata
   drivers/spi/spi-cadence-xspi.c:892:66: error: 'struct spi_device' has no member named 'master'
     struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(spi_dev->master);
                                                                     ^~
   drivers/spi/spi-cadence-xspi.c: In function 'cdns_xspi_transfer_one_message_b0':
>> drivers/spi/spi-cadence-xspi.c:1029:36: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(master);
                                       ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/spi/spi-cadence-xspi.c:1035:11: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
     int cs = spi->chip_select;
              ^~~
   drivers/spi/spi-cadence-xspi.c: At top level:
   drivers/spi/spi-cadence-xspi.c:1242:0: error: unterminated #ifdef
    #ifdef CONFIG_OF
    
   cc1: some warnings being treated as errors


vim +1029 drivers/spi/spi-cadence-xspi.c

  1025	
  1026	int cdns_xspi_transfer_one_message_b0(struct spi_controller *master,
  1027						   struct spi_message *m)
  1028	{
> 1029		struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(master);
  1030		struct spi_device *spi = m->spi;
  1031		struct spi_transfer *t = NULL;
  1032	
  1033		const int max_len = XFER_QWORD_BYTECOUNT * XFER_QWORD_COUNT;
  1034		int current_cycle_count;
> 1035		int cs = spi->chip_select;
  1036		int cs_change = 0;
  1037	
  1038		/* Enable xfer state machine */
  1039		if (!cdns_xspi->xfer_in_progress) {
  1040			u32 xfer_control = readl(cdns_xspi->xferbase + SPIX_XFER_FUNC_CTRL);
  1041	
  1042			cdns_xspi->current_xfer_qword = 0;
  1043			cdns_xspi->xfer_in_progress = true;
  1044			xfer_control |= (XFER_RECEIVE_ENABLE |
  1045					 XFER_CLK_CAPTURE_POL |
  1046					 XFER_FUNC_START |
  1047					 XFER_SOFT_RESET |
  1048					 FIELD_PREP(XFER_CS_N_HOLD, (1 << cs)));
  1049			xfer_control &= ~(XFER_FUNC_ENABLE | XFER_CLK_DRIVE_POL);
  1050			writel(xfer_control, cdns_xspi->xferbase + SPIX_XFER_FUNC_CTRL);
  1051		}
  1052	
  1053		list_for_each_entry(t, &m->transfers, transfer_list) {
  1054			u8 *txd = (u8 *) t->tx_buf;
  1055			u8 *rxd = (u8 *) t->rx_buf;
  1056			u8 data[10];
  1057			u32 cmd_regs[6];
  1058	
  1059			if (!txd)
  1060				txd = data;
  1061	
  1062			cdns_xspi->in_buffer = txd + 1;
  1063			cdns_xspi->out_buffer = txd + 1;
  1064	
  1065			while (t->len) {
  1066	
  1067				current_cycle_count = t->len > max_len ? max_len : t->len;
  1068	
  1069				if (current_cycle_count < 10) {
  1070					cdns_xspi_prepare_generic(cs, txd, current_cycle_count,
  1071								  false, cmd_regs);
  1072					cdns_xspi_trigger_command(cdns_xspi, cmd_regs);
  1073					if (cdns_xspi_stig_ready(cdns_xspi, true))
  1074						return -EIO;
  1075				} else {
  1076					cdns_xspi_prepare_generic(cs, txd, 1, true, cmd_regs);
  1077					cdns_xspi_trigger_command(cdns_xspi, cmd_regs);
  1078					cdns_xspi_prepare_transfer(cs, 1, current_cycle_count - 1,
  1079								   cmd_regs);
  1080					cdns_xspi_trigger_command(cdns_xspi, cmd_regs);
  1081					if (cdns_xspi_sdma_ready(cdns_xspi, true))
  1082						return -EIO;
  1083					cdns_xspi_sdma_handle(cdns_xspi);
  1084					if (cdns_xspi_stig_ready(cdns_xspi, true))
  1085						return -EIO;
  1086	
  1087					cdns_xspi->in_buffer += current_cycle_count;
  1088					cdns_xspi->out_buffer += current_cycle_count;
  1089				}
  1090	
  1091				if (rxd) {
  1092					int j;
  1093	
  1094					for (j = 0; j < current_cycle_count / 8; j++)
  1095						cdns_xspi_read_single_qword(cdns_xspi, &rxd);
  1096					cdns_xspi_finish_read(cdns_xspi, &rxd, current_cycle_count);
  1097				} else {
  1098					cdns_xspi->current_xfer_qword += current_cycle_count /
  1099									 XFER_QWORD_BYTECOUNT;
  1100					if (current_cycle_count % XFER_QWORD_BYTECOUNT)
  1101						cdns_xspi->current_xfer_qword++;
  1102	
  1103					cdns_xspi->current_xfer_qword %= XFER_QWORD_COUNT;
  1104				}
  1105				cs_change = t->cs_change;
  1106				t->len -= current_cycle_count;
  1107			}
  1108		}
  1109	
  1110		if (!cs_change) {
  1111			u32 xfer_control = readl(cdns_xspi->xferbase + SPIX_XFER_FUNC_CTRL);
  1112	
  1113			xfer_control &= ~(XFER_RECEIVE_ENABLE |
  1114					  XFER_SOFT_RESET);
  1115			writel(xfer_control, cdns_xspi->xferbase + SPIX_XFER_FUNC_CTRL);
  1116			cdns_xspi->xfer_in_progress = false;
  1117		}
  1118	
  1119		m->status = 0;
  1120		spi_finalize_current_message(master);
  1121	
  1122		return 0;
  1123	}
  1124	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-03-31  3:26 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 19:48 [PATCH 0/5] Support for Cadence xSPI Marvell modifications Witold Sadowski
2024-03-29 19:48 ` [PATCH 1/5] spi: cadence: Add new bindings documentation for Cadence XSPI Witold Sadowski
2024-03-29 21:09   ` Rob Herring
2024-03-30 11:32   ` Krzysztof Kozlowski
2024-04-29  7:48     ` Krzysztof Kozlowski
2024-03-31 10:43   ` kernel test robot
2024-03-29 19:48 ` [PATCH 2/5] spi: cadence: Add Marvell IP modification changes Witold Sadowski
2024-03-30 11:33   ` Krzysztof Kozlowski
2024-04-29 14:55     ` [EXTERNAL] " Witold Sadowski
2024-04-30  7:56       ` Krzysztof Kozlowski
2024-03-31  7:46   ` kernel test robot
2024-03-31 10:50   ` Krzysztof Kozlowski
2024-03-29 19:48 ` [PATCH 3/5] spi: cadence: Force single modebyte Witold Sadowski
2024-03-29 19:48 ` [PATCH 4/5] driver: spi: cadence: Add ACPI support Witold Sadowski
2024-03-30 11:36   ` Krzysztof Kozlowski
2024-03-31  7:35   ` kernel test robot
2024-03-29 19:48 ` [PATCH 5/5] cadence-xspi: Add xfer capabilities Witold Sadowski
2024-03-30 11:37   ` Krzysztof Kozlowski
2024-03-31  3:25   ` kernel test robot [this message]
2024-04-18  1:13 ` [PATCH v3 0/5] Marvell HW overlay support for Cadence xSPI Witold Sadowski
2024-04-18  1:13   ` [PATCH v3 1/5] spi: cadence: Ensure data lines set to low during dummy-cycle period Witold Sadowski
2024-04-18  1:13   ` [PATCH v3 2/5] spi: cadence: Add MRVL overlay bindings documentation for Cadence XSPI Witold Sadowski
2024-04-18 16:22     ` Conor Dooley
2024-04-29 14:47       ` [EXTERNAL] " Witold Sadowski
2024-04-29 21:33         ` Conor Dooley
2024-04-29 22:59           ` Witold Sadowski
2024-04-30  7:58             ` Krzysztof Kozlowski
2024-04-18 17:48     ` Krzysztof Kozlowski
2024-04-29 14:35       ` [EXTERNAL] " Witold Sadowski
2024-04-18  1:13   ` [PATCH v3 3/5] spi: cadence: Add Marvell xSPI IP overlay changes Witold Sadowski
2024-04-18 19:36     ` kernel test robot
2024-04-18  1:13   ` [PATCH v3 4/5] spi: cadence: Allow to read basic xSPI configuration from ACPI Witold Sadowski
2024-04-18 17:51     ` Krzysztof Kozlowski
2024-04-29 14:30       ` [EXTERNAL] " Witold Sadowski
2024-04-30  8:00         ` Krzysztof Kozlowski
2024-05-08  8:04           ` Witold Sadowski
2024-05-08 11:46             ` Mark Brown
2024-05-09  1:07               ` Witold Sadowski
2024-04-18  1:13   ` [PATCH v3 5/5] spi: cadence: Add MRVL overlay xfer operation support Witold Sadowski

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=202403311133.jOI5kbg4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pthombar@cadence.com \
    --cc=robh@kernel.org \
    --cc=wsadowski@marvell.com \
    /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.