mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mason Yang <masonccyang@mxic.com.tw>
Cc: kbuild-all@01.org, broonie@kernel.org, marek.vasut@gmail.com,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	boris.brezillon@bootlin.com, linux-renesas-soc@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	sergei.shtylyov@cogentembedded.com, juliensu@mxic.com.tw,
	Simon Horman <horms@verge.net.au>,
	zhengxunli@mxic.com.tw, Mason Yang <masonccyang@mxic.com.tw>
Subject: Re: [PATCH v5 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver
Date: Tue, 8 Jan 2019 20:08:39 +0800	[thread overview]
Message-ID: <201901082000.8u8BWjFe%fengguang.wu@intel.com> (raw)
In-Reply-To: <1546921020-20436-2-git-send-email-masonccyang@mxic.com.tw>

[-- Attachment #1: Type: text/plain, Size: 4677 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 v5.0-rc1 next-20190108]
[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-Gen3-RPC-IF-SPI-controller-driver/20190108-165354
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=6.4.0 make.cross ARCH=nds32 

All errors (new ones prefixed by >>):

   drivers/spi/spi-renesas-rpc.c: In function 'rpc_spi_io_xfer':
>> drivers/spi/spi-renesas-rpc.c:285:10: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration]
       tmp = readq(rpc->dirmap);
             ^~~~~
   cc1: some warnings being treated as errors

vim +/readq +285 drivers/spi/spi-renesas-rpc.c

   222	
   223	static int rpc_spi_io_xfer(struct rpc_spi *rpc,
   224				   const void *tx_buf, void *rx_buf)
   225	{
   226		u32 smenr, smcr, data, pos = 0;
   227		int ret = 0;
   228	
   229		regmap_update_bits(rpc->regmap, RPC_CMNCR, RPC_CMNCR_MD, RPC_CMNCR_MD);
   230		regmap_write(rpc->regmap, RPC_SMDRENR, 0);
   231		regmap_write(rpc->regmap, RPC_SMCMR, rpc->cmd);
   232		regmap_write(rpc->regmap, RPC_SMDMCR, rpc->dummy);
   233		regmap_write(rpc->regmap, RPC_SMADR, rpc->addr);
   234		smenr = rpc->smenr;
   235	
   236		if (tx_buf) {
   237			while (pos < rpc->xferlen) {
   238				u32 nbytes = rpc->xferlen - pos;
   239	
   240				regmap_write(rpc->regmap, RPC_SMWDR0,
   241					     get_unaligned((u32 *)(tx_buf + pos)));
   242	
   243				smcr = rpc->smcr | RPC_SMCR_SPIE;
   244	
   245				if (nbytes > 4) {
   246					nbytes = 4;
   247					smcr |= RPC_SMCR_SSLKP;
   248				}
   249	
   250				regmap_write(rpc->regmap, RPC_SMENR, smenr);
   251				regmap_write(rpc->regmap, RPC_SMCR, smcr);
   252				ret = wait_msg_xfer_end(rpc);
   253				if (ret)
   254					goto out;
   255	
   256				pos += nbytes;
   257				smenr = rpc->smenr & ~RPC_SMENR_CDE &
   258						     ~RPC_SMENR_ADE(0xf);
   259			}
   260		} else if (rx_buf) {
   261			//
   262			// RPC-IF spoils the data for the commands without an address
   263			// phase (like RDID) in the manual mode, so we'll have to work
   264			// around this issue by using the external address space read
   265			// mode instead; we seem to be able to read 8 bytes at most in
   266			// this mode though...
   267			//
   268			if (!(smenr & RPC_SMENR_ADE(0xf))) {
   269				u32 nbytes = rpc->xferlen - pos;
   270				u64 tmp;
   271	
   272				if (nbytes > 8)
   273					nbytes = 8;
   274	
   275				regmap_update_bits(rpc->regmap, RPC_CMNCR,
   276						   RPC_CMNCR_MD, 0);
   277				regmap_write(rpc->regmap, RPC_DRCR, 0);
   278				regmap_write(rpc->regmap, RPC_DREAR, RPC_DREAR_EAC(1));
   279				regmap_write(rpc->regmap, RPC_DRCMR, rpc->cmd);
   280				regmap_write(rpc->regmap, RPC_DRDMCR, rpc->dummy);
   281				regmap_write(rpc->regmap, RPC_DROPR, 0);
   282				regmap_write(rpc->regmap, RPC_DRENR, rpc->smenr &
   283					     ~RPC_SMENR_SPIDE(0xf));
   284	
 > 285				tmp = readq(rpc->dirmap);
   286				memcpy(rx_buf, &tmp, nbytes);
   287			} else {
   288				while (pos < rpc->xferlen) {
   289					u32 nbytes = rpc->xferlen - pos;
   290	
   291					if (nbytes > 4)
   292						nbytes = 4;
   293	
   294					regmap_write(rpc->regmap, RPC_SMENR, smenr);
   295					regmap_write(rpc->regmap, RPC_SMCR, rpc->smcr |
   296						     RPC_SMCR_SPIE);
   297					ret = wait_msg_xfer_end(rpc);
   298					if (ret)
   299						goto out;
   300	
   301					regmap_read(rpc->regmap, RPC_SMRDR0, &data);
   302					memcpy(rx_buf + pos, &data, nbytes);
   303					pos += nbytes;
   304	
   305					regmap_write(rpc->regmap, RPC_SMADR,
   306						     rpc->addr + pos);
   307				}
   308			}
   309		} else {
   310			regmap_write(rpc->regmap, RPC_SMENR, rpc->smenr);
   311			regmap_write(rpc->regmap, RPC_SMCR, rpc->smcr | RPC_SMCR_SPIE);
   312			ret = wait_msg_xfer_end(rpc);
   313			if (ret)
   314				goto out;
   315		}
   316	
   317		return ret;
   318	
   319	out:
   320		return reset_control_reset(rpc->rstc);
   321	}
   322	

---
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: 49955 bytes --]

  reply	other threads:[~2019-01-08 12:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08  4:16 [PATCH v5 0/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI driver Mason Yang
2019-01-08  4:16 ` [PATCH v5 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver Mason Yang
2019-01-08 12:08   ` kbuild test robot [this message]
2019-01-09  8:12   ` Geert Uytterhoeven
2019-01-09 18:47   ` Sergei Shtylyov
2019-01-09 18:49     ` Geert Uytterhoeven
2019-01-09 19:04       ` Sergei Shtylyov
2019-01-09 21:23         ` Marek Vasut
2019-01-09 22:14         ` Chris Brandt
2019-01-10 10:16     ` Boris Brezillon
2019-01-10 10:26       ` Sergei Shtylyov
     [not found]     ` <OFBBA60D64.FFD34553-ON48258384.00315BB0-48258384.0034A5C7@mxic.com.tw>
2019-01-16 19:36       ` Sergei Shtylyov
     [not found]         ` <OFFCBB6F75.77BB80DE-ON48258385.0020045C-48258385.0023EF3B@mxic.com.tw>
2019-01-17  8:19           ` Geert Uytterhoeven
2019-01-08  4:17 ` [PATCH v5 2/2] dt-bindings: spi: Document Renesas R-Car RPC-IF controller bindings Mason Yang
2019-01-08 11:52   ` Marek Vasut
     [not found]     ` <OFD1D4749F.04B5A6A1-ON4825837E.00331D68-4825837E.00344CA0@mxic.com.tw>
2019-01-10 13:43       ` Marek Vasut
2019-01-09  7:51   ` Geert Uytterhoeven

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=201901082000.8u8BWjFe%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=marek.vasut@gmail.com \
    --cc=masonccyang@mxic.com.tw \
    --cc=sergei.shtylyov@cogentembedded.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

Powered by JetHome