From: kbuild test robot <lkp@intel.com>
To: Mason Yang <masonccyang@mxic.com.tw>
Cc: kbuild-all@01.org, broonie@kernel.org, tpiepho@impinj.com,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
Simon Horman <horms@verge.net.au>,
boris.brezillon@bootlin.com, juliensu@mxic.com.tw,
Geert Uytterhoeven <geert+renesas@glider.be>,
zhengxunli@mxic.com.tw, Mason Yang <masonccyang@mxic.com.tw>
Subject: Re: [PATCH 1/2] spi: Add Renesas R-Car RPC SPI controller driver
Date: Tue, 20 Nov 2018 10:04:07 +0800 [thread overview]
Message-ID: <201811201009.giUBZkHZ%fengguang.wu@intel.com> (raw)
In-Reply-To: <1542621690-10229-2-git-send-email-masonccyang@mxic.com.tw>
[-- Attachment #1: Type: text/plain, Size: 10563 bytes --]
Hi Mason,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on spi/for-next]
[also build test ERROR on v4.20-rc3 next-20181119]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Mason-Yang/spi-Add-Renesas-R-Car-RPC-SPI-controller-driver/20181120-020310
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
>> drivers/spi/spi-renesas-rpc.c:366:47: warning: 'struct spi_mem_dirmap_desc' declared inside parameter list will not be visible outside of this definition or declaration
static ssize_t rpc_spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/spi/spi-renesas-rpc.c:18:0:
drivers/spi/spi-renesas-rpc.c: In function 'rpc_spi_mem_dirmap_read':
>> drivers/spi/spi-renesas-rpc.c:369:51: error: dereferencing pointer to incomplete type 'struct spi_mem_dirmap_desc'
struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
^
include/linux/spi/spi.h:1333:66: note: in definition of macro 'spi_master_get_devdata'
#define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr)
^~~~~
drivers/spi/spi-renesas-rpc.c: At top level:
drivers/spi/spi-renesas-rpc.c:397:48: warning: 'struct spi_mem_dirmap_desc' declared inside parameter list will not be visible outside of this definition or declaration
static ssize_t rpc_spi_mem_dirmap_write(struct spi_mem_dirmap_desc *desc,
^~~~~~~~~~~~~~~~~~~
In file included from drivers/spi/spi-renesas-rpc.c:18:0:
drivers/spi/spi-renesas-rpc.c: In function 'rpc_spi_mem_dirmap_write':
drivers/spi/spi-renesas-rpc.c:400:51: error: dereferencing pointer to incomplete type 'struct spi_mem_dirmap_desc'
struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
^
include/linux/spi/spi.h:1333:66: note: in definition of macro 'spi_master_get_devdata'
#define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr)
^~~~~
drivers/spi/spi-renesas-rpc.c: At top level:
drivers/spi/spi-renesas-rpc.c:443:45: warning: 'struct spi_mem_dirmap_desc' declared inside parameter list will not be visible outside of this definition or declaration
static int rpc_spi_mem_dirmap_create(struct spi_mem_dirmap_desc *desc)
^~~~~~~~~~~~~~~~~~~
In file included from drivers/spi/spi-renesas-rpc.c:18:0:
drivers/spi/spi-renesas-rpc.c: In function 'rpc_spi_mem_dirmap_create':
drivers/spi/spi-renesas-rpc.c:445:51: error: dereferencing pointer to incomplete type 'struct spi_mem_dirmap_desc'
struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
^
include/linux/spi/spi.h:1333:66: note: in definition of macro 'spi_master_get_devdata'
#define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr)
^~~~~
drivers/spi/spi-renesas-rpc.c: At top level:
>> drivers/spi/spi-renesas-rpc.c:484:3: error: 'const struct spi_controller_mem_ops' has no member named 'dirmap_create'
.dirmap_create = rpc_spi_mem_dirmap_create,
^~~~~~~~~~~~~
>> drivers/spi/spi-renesas-rpc.c:484:19: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
.dirmap_create = rpc_spi_mem_dirmap_create,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-renesas-rpc.c:484:19: note: (near initialization for 'rpc_spi_mem_ops')
>> drivers/spi/spi-renesas-rpc.c:484:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
drivers/spi/spi-renesas-rpc.c:484:19: note: (near initialization for 'rpc_spi_mem_ops.supports_op')
>> drivers/spi/spi-renesas-rpc.c:485:3: error: 'const struct spi_controller_mem_ops' has no member named 'dirmap_read'
.dirmap_read = rpc_spi_mem_dirmap_read,
^~~~~~~~~~~
drivers/spi/spi-renesas-rpc.c:485:17: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
.dirmap_read = rpc_spi_mem_dirmap_read,
^~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-renesas-rpc.c:485:17: note: (near initialization for 'rpc_spi_mem_ops')
drivers/spi/spi-renesas-rpc.c:485:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
drivers/spi/spi-renesas-rpc.c:485:17: note: (near initialization for 'rpc_spi_mem_ops.adjust_op_size')
>> drivers/spi/spi-renesas-rpc.c:486:3: error: 'const struct spi_controller_mem_ops' has no member named 'dirmap_write'
.dirmap_write = rpc_spi_mem_dirmap_write,
^~~~~~~~~~~~
drivers/spi/spi-renesas-rpc.c:486:18: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
.dirmap_write = rpc_spi_mem_dirmap_write,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-renesas-rpc.c:486:18: note: (near initialization for 'rpc_spi_mem_ops')
drivers/spi/spi-renesas-rpc.c:486:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
drivers/spi/spi-renesas-rpc.c:486:18: note: (near initialization for 'rpc_spi_mem_ops.get_name')
cc1: some warnings being treated as errors
vim +369 drivers/spi/spi-renesas-rpc.c
365
> 366 static ssize_t rpc_spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
367 u64 offs, size_t len, void *buf)
368 {
> 369 struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
370 int ret;
371
372 if (WARN_ON(offs + desc->info.offset + len > U32_MAX))
373 return -EINVAL;
374
375 ret = rpc_spi_set_freq(rpc, desc->mem->spi->max_speed_hz);
376 if (ret)
377 return ret;
378
379 rpc_spi_mem_set_prep_op_cfg(desc->mem->spi,
380 &desc->info.op_tmpl, &offs, &len);
381
382 writel(RPC_CMNCR_SFDE | RPC_CMNCR_MOIIO_HIZ |
383 RPC_CMNCR_IOFV_HIZ | RPC_CMNCR_BSZ(0), rpc->regs + RPC_CMNCR);
384
385 writel(RPC_DRCR_RBURST(0x1f) | RPC_DRCR_RBE, rpc->regs + RPC_DRCR);
386 writel(rpc->cmd, rpc->regs + RPC_DRCMR);
387 writel(RPC_DREAR_EAC, rpc->regs + RPC_DREAR);
388 writel(0, rpc->regs + RPC_DROPR);
389 writel(rpc->smenr, rpc->regs + RPC_DRENR);
390 writel(rpc->dummy, rpc->regs + RPC_DRDMCR);
391 writel(0x0, rpc->regs + RPC_DRDRENR);
392 memcpy_fromio(buf, rpc->linear.map + desc->info.offset + offs, len);
393
394 return len;
395 }
396
397 static ssize_t rpc_spi_mem_dirmap_write(struct spi_mem_dirmap_desc *desc,
398 u64 offs, size_t len, const void *buf)
399 {
400 struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
401 int tx_offs, ret;
402
403 if (WARN_ON(offs + desc->info.offset + len > U32_MAX))
404 return -EINVAL;
405
406 if (WARN_ON(len > RPC_WBUF_SIZE))
407 return -EIO;
408
409 ret = rpc_spi_set_freq(rpc, desc->mem->spi->max_speed_hz);
410 if (ret)
411 return ret;
412
413 rpc_spi_mem_set_prep_op_cfg(desc->mem->spi,
414 &desc->info.op_tmpl, &offs, &len);
415
416 writel(RPC_CMNCR_MD | RPC_CMNCR_SFDE | RPC_CMNCR_MOIIO_HIZ |
417 RPC_CMNCR_IOFV_HIZ | RPC_CMNCR_BSZ(0), rpc->regs + RPC_CMNCR);
418 writel(0x0, rpc->regs + RPC_SMDRENR);
419
420 writel(RPC_PHYCNT_CAL | 0x260 | RPC_PHYCNT_WBUF2 | RPC_PHYCNT_WBUF,
421 rpc->regs + RPC_PHYCNT);
422
423 for (tx_offs = 0; tx_offs < RPC_WBUF_SIZE; tx_offs += 4)
424 writel(*(u32 *)(buf + tx_offs), rpc->regs + RPC_WBUF + tx_offs);
425
426 writel(rpc->cmd, rpc->regs + RPC_SMCMR);
427 writel(offs, rpc->regs + RPC_SMADR);
428 writel(rpc->smenr, rpc->regs + RPC_SMENR);
429 writel(rpc->smcr | RPC_SMCR_SPIE, rpc->regs + RPC_SMCR);
430 ret = wait_msg_xfer_end(rpc);
431 if (ret)
432 goto out;
433
434 writel(RPC_DRCR_RCF, rpc->regs + RPC_DRCR);
435 writel(RPC_PHYCNT_CAL | RPC_PHYCNT_STRTIM(0) | 0x260,
436 rpc->regs + RPC_PHYCNT);
437
438 return len;
439 out:
440 return ret;
441 }
442
443 static int rpc_spi_mem_dirmap_create(struct spi_mem_dirmap_desc *desc)
444 {
445 struct rpc_spi *rpc = spi_master_get_devdata(desc->mem->spi->master);
446
447 if (desc->info.offset + desc->info.length > U32_MAX)
448 return -ENOTSUPP;
449
450 if (!rpc_spi_mem_supports_op(desc->mem, &desc->info.op_tmpl))
451 return -ENOTSUPP;
452
453 if (!rpc->linear.map &&
454 desc->info.op_tmpl.data.dir == SPI_MEM_DATA_IN)
455 return -ENOTSUPP;
456
457 return 0;
458 }
459
460 static int rpc_spi_mem_exec_op(struct spi_mem *mem,
461 const struct spi_mem_op *op)
462 {
463 struct rpc_spi *rpc = spi_master_get_devdata(mem->spi->master);
464 int ret;
465
466 ret = rpc_spi_set_freq(rpc, mem->spi->max_speed_hz);
467 if (ret)
468 return ret;
469
470 rpc_spi_mem_set_prep_op_cfg(mem->spi, op, NULL, NULL);
471
472 ret = rpc_spi_io_xfer(rpc,
473 op->data.dir == SPI_MEM_DATA_OUT ?
474 op->data.buf.out : NULL,
475 op->data.dir == SPI_MEM_DATA_IN ?
476 op->data.buf.in : NULL);
477
478 return ret;
479 }
480
481 static const struct spi_controller_mem_ops rpc_spi_mem_ops = {
482 .supports_op = rpc_spi_mem_supports_op,
483 .exec_op = rpc_spi_mem_exec_op,
> 484 .dirmap_create = rpc_spi_mem_dirmap_create,
> 485 .dirmap_read = rpc_spi_mem_dirmap_read,
> 486 .dirmap_write = rpc_spi_mem_dirmap_write,
487 };
488
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66042 bytes --]
next prev parent reply other threads:[~2018-11-20 2:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 10:01 [PATCH 0/2] spi: Add Renesas R-Car D3 RPC SPI driver Mason Yang
2018-11-19 10:01 ` [PATCH 1/2] spi: Add Renesas R-Car RPC SPI controller driver Mason Yang
2018-11-19 14:12 ` Marek Vasut
2018-11-19 15:27 ` Mark Brown
2018-11-19 22:10 ` Marek Vasut
2018-11-20 13:26 ` Mark Brown
2018-11-20 13:33 ` Marek Vasut
[not found] ` <OF4FAD10C5.F4F6D29B-ON4825834B.001FAB40-4825834B.00289635@mxic.com.tw>
2018-11-20 13:09 ` Marek Vasut
2018-11-20 13:32 ` Boris Brezillon
2018-11-20 13:35 ` Marek Vasut
[not found] ` <OF5B1A3AE4.2DEECF37-ON4825834E.00031E97-4825834E.00042D72@mxic.com.tw>
2018-11-23 13:34 ` Marek Vasut
2018-11-20 2:04 ` kbuild test robot [this message]
2018-11-20 5:49 ` kbuild test robot
2018-11-20 8:01 ` Geert Uytterhoeven
2018-11-20 8:10 ` Boris Brezillon
2018-11-19 10:01 ` [PATCH 2/2] dt-binding: spi: Document Renesas R-Car RPC controller bindings Mason Yang
2018-11-19 13:49 ` Marek Vasut
2018-11-19 14:10 ` Boris Brezillon
2018-11-19 14:14 ` Marek Vasut
2018-11-19 14:43 ` Boris Brezillon
2018-11-19 15:12 ` Marek Vasut
2018-11-19 15:21 ` Boris Brezillon
2018-11-19 22:11 ` Marek Vasut
2018-11-19 22:19 ` Boris Brezillon
2018-11-19 22:22 ` Marek Vasut
2018-11-19 22:25 ` Boris Brezillon
2018-11-19 22:29 ` Marek Vasut
2018-11-19 22:31 ` Boris Brezillon
[not found] ` <OFDD04CD59.10199EDD-ON4825834B.001E1390-4825834B.001F65DD@mxic.com.tw>
2018-11-20 12:57 ` Marek Vasut
[not found] ` <OF26D8352D.B4B02BBE-ON4825834C.00043726-4825834C.0004E2F7@mxic.com.tw>
2018-11-21 1:51 ` Marek Vasut
2018-11-20 8:07 ` Geert Uytterhoeven
2018-11-20 13:56 ` kbuild test robot
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=201811201009.giUBZkHZ%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=boris.brezillon@bootlin.com \
--cc=broonie@kernel.org \
--cc=geert+renesas@glider.be \
--cc=horms@verge.net.au \
--cc=juliensu@mxic.com.tw \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=masonccyang@mxic.com.tw \
--cc=tpiepho@impinj.com \
--cc=zhengxunli@mxic.com.tw \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®