linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Piotr Sroka <piotrs@cadence.com>
Cc: kbuild-all@01.org, Kazuhiro Kasai <kasai.kazuhiro@socionext.com>,
	Piotr Sroka <piotrs@cadence.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	"Paul E. McKenney" <paulmck@linux.ibm.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Cercueil <paul@crapouillou.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Liang Yang <liang.yang@amlogic.com>,
	Anders Roxell <anders.roxell@linaro.org>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [v6 1/2] mtd: rawnand: Add new Cadence NAND driver to MTD subsystem
Date: Tue, 17 Sep 2019 00:14:00 +0800	[thread overview]
Message-ID: <201909170031.XhGhg4Z3%lkp@intel.com> (raw)
In-Reply-To: <20190916124605.28765-1-piotrs@cadence.com>

[-- Attachment #1: Type: text/plain, Size: 5341 bytes --]

Hi Piotr,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190915]
[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/Piotr-Sroka/mtd-rawnand-Add-Cadence-NAND-controller-driver/20190916-205004
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.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=7.4.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/mtd/nand/raw/cadence-nand-controller.c: In function 'cadence_nand_read_buf':
>> drivers/mtd/nand/raw/cadence-nand-controller.c:1877:3: error: implicit declaration of function 'readsl'; did you mean 'readl'? [-Werror=implicit-function-declaration]
      readsl(cdns_ctrl->io.virt, buf, len_in_words);
      ^~~~~~
      readl
   drivers/mtd/nand/raw/cadence-nand-controller.c: In function 'cadence_nand_write_buf':
>> drivers/mtd/nand/raw/cadence-nand-controller.c:1930:3: error: implicit declaration of function 'writesl'; did you mean 'writel'? [-Werror=implicit-function-declaration]
      writesl(cdns_ctrl->io.virt, buf, len_in_words);
      ^~~~~~~
      writel
   cc1: some warnings being treated as errors

vim +1877 drivers/mtd/nand/raw/cadence-nand-controller.c

  1860	
  1861	static int cadence_nand_read_buf(struct cdns_nand_ctrl *cdns_ctrl,
  1862					 u8 *buf, int len)
  1863	{
  1864		u8 thread_nr = 0;
  1865		u32 sdma_size;
  1866		int status;
  1867	
  1868		/* Wait until slave DMA interface is ready to data transfer. */
  1869		status = cadence_nand_wait_on_sdma(cdns_ctrl, &thread_nr, &sdma_size);
  1870		if (status)
  1871			return status;
  1872	
  1873		if (!cdns_ctrl->caps1->has_dma) {
  1874			int len_in_words = len >> 2;
  1875	
  1876			/* read alingment data */
> 1877			readsl(cdns_ctrl->io.virt, buf, len_in_words);
  1878			if (sdma_size > len) {
  1879				/* read rest data from slave DMA interface if any */
  1880				readsl(cdns_ctrl->io.virt, cdns_ctrl->buf,
  1881				       sdma_size / 4 - len_in_words);
  1882				/* copy rest of data */
  1883				memcpy(buf + (len_in_words << 2), cdns_ctrl->buf,
  1884				       len - (len_in_words << 2));
  1885			}
  1886			return 0;
  1887		}
  1888	
  1889		if (cdns_ctrl->dmac && cadence_nand_dma_buf_ok(cdns_ctrl, buf, len)) {
  1890			status = cadence_nand_slave_dma_transfer(cdns_ctrl, buf,
  1891								 cdns_ctrl->io.dma,
  1892								 len, DMA_FROM_DEVICE);
  1893			if (status == 0)
  1894				return 0;
  1895	
  1896			dev_warn(cdns_ctrl->dev,
  1897				 "Slave DMA transfer failed. Try again using bounce buffer.");
  1898		}
  1899	
  1900		/* If DMA transfer is not possible or failed then use bounce buffer. */
  1901		status = cadence_nand_slave_dma_transfer(cdns_ctrl, cdns_ctrl->buf,
  1902							 cdns_ctrl->io.dma,
  1903							 sdma_size, DMA_FROM_DEVICE);
  1904	
  1905		if (status) {
  1906			dev_err(cdns_ctrl->dev, "Slave DMA transfer failed");
  1907			return status;
  1908		}
  1909	
  1910		memcpy(buf, cdns_ctrl->buf, len);
  1911	
  1912		return 0;
  1913	}
  1914	
  1915	static int cadence_nand_write_buf(struct cdns_nand_ctrl *cdns_ctrl,
  1916					  const u8 *buf, int len)
  1917	{
  1918		u8 thread_nr = 0;
  1919		u32 sdma_size;
  1920		int status;
  1921	
  1922		/* Wait until slave DMA interface is ready to data transfer. */
  1923		status = cadence_nand_wait_on_sdma(cdns_ctrl, &thread_nr, &sdma_size);
  1924		if (status)
  1925			return status;
  1926	
  1927		if (!cdns_ctrl->caps1->has_dma) {
  1928			int len_in_words = len >> 2;
  1929	
> 1930			writesl(cdns_ctrl->io.virt, buf, len_in_words);
  1931			if (sdma_size > len) {
  1932				/* copy rest of data */
  1933				memcpy(cdns_ctrl->buf, buf + (len_in_words << 2),
  1934				       len - (len_in_words << 2));
  1935				/* write all expected by nand controller data */
  1936				writesl(cdns_ctrl->io.virt, cdns_ctrl->buf,
  1937					sdma_size / 4 - len_in_words);
  1938			}
  1939	
  1940			return 0;
  1941		}
  1942	
  1943		if (cdns_ctrl->dmac && cadence_nand_dma_buf_ok(cdns_ctrl, buf, len)) {
  1944			status = cadence_nand_slave_dma_transfer(cdns_ctrl, (void *)buf,
  1945								 cdns_ctrl->io.dma,
  1946								 len, DMA_TO_DEVICE);
  1947			if (status == 0)
  1948				return 0;
  1949	
  1950			dev_warn(cdns_ctrl->dev,
  1951				 "Slave DMA transfer failed. Try again using bounce buffer.");
  1952		}
  1953	
  1954		/* If DMA transfer is not possible or failed then use bounce buffer. */
  1955		memcpy(cdns_ctrl->buf, buf, len);
  1956	
  1957		status = cadence_nand_slave_dma_transfer(cdns_ctrl, cdns_ctrl->buf,
  1958							 cdns_ctrl->io.dma,
  1959							 sdma_size, DMA_TO_DEVICE);
  1960	
  1961		if (status)
  1962			dev_err(cdns_ctrl->dev, "Slave DMA transfer failed");
  1963	
  1964		return status;
  1965	}
  1966	

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

  reply	other threads:[~2019-09-16 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 12:42 [v6 0/2] mtd: rawnand: Add Cadence NAND controller driver Piotr Sroka
2019-09-16 12:45 ` [v6 1/2] mtd: rawnand: Add new Cadence NAND driver to MTD subsystem Piotr Sroka
2019-09-16 16:14   ` kbuild test robot [this message]
2019-09-16 12:46 ` [v6 2/2] dt-bindings: mtd: Add Cadence NAND controller driver Piotr Sroka

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=201909170031.XhGhg4Z3%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@collabora.com \
    --cc=computersforpeace@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kasai.kazuhiro@socionext.com \
    --cc=kbuild-all@01.org \
    --cc=liang.yang@amlogic.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marek.vasut@gmail.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=paul@crapouillou.net \
    --cc=paulmck@linux.ibm.com \
    --cc=piotrs@cadence.com \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    --cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).