From: kbuild test robot <lkp@intel.com>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: kbuild-all@lists.01.org, Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org,
Chuanhong Guo <gch981213@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading
Date: Tue, 12 Nov 2019 15:28:52 +0800 [thread overview]
Message-ID: <201911121507.ANXNexIL%lkp@intel.com> (raw)
In-Reply-To: <20191110052104.5502-1-gch981213@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2879 bytes --]
Hi Chuanhong,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm-soc/for-next]
[cannot apply to v5.4-rc7 next-20191111]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Chuanhong-Guo/mtd-mtk-quadspi-add-support-for-DMA-reading/20191112-145019
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-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=sparc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read_dma_bounce':
>> drivers/mtd/spi-nor/mtk-quadspi.c:349:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mem_unaligned_len = (u32)buf % MTK_NOR_DMA_ALIGN;
^
drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read':
drivers/mtd/spi-nor/mtk-quadspi.c:369:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u32)buffer % MTK_NOR_DMA_ALIGN || from % MTK_NOR_DMA_ALIGN)
^
vim +349 drivers/mtd/spi-nor/mtk-quadspi.c
330
331 static ssize_t mtk_nor_read_dma_bounce(struct mtk_nor *mtk_nor, loff_t from,
332 size_t length, u_char *buffer)
333 {
334 ssize_t nor_unaligned_len = from % MTK_NOR_DMA_ALIGN;
335 loff_t read_from = from & ~(MTK_NOR_DMA_ALIGN - 1);
336 ssize_t read_len;
337 u_char *buf;
338 u_char *bouncebuf;
339 size_t mem_unaligned_len;
340
341 if (length > MTK_NOR_MAX_BBUF_READ)
342 length = MTK_NOR_MAX_BBUF_READ;
343 read_len = length + nor_unaligned_len + MTK_NOR_DMA_ALIGN;
344
345 buf = kmalloc(read_len + MTK_NOR_DMA_ALIGN, GFP_KERNEL);
346 if (!buf)
347 return -ENOMEM;
348
> 349 mem_unaligned_len = (u32)buf % MTK_NOR_DMA_ALIGN;
350 bouncebuf = (buf + MTK_NOR_DMA_ALIGN) - mem_unaligned_len;
351
352 read_len = mtk_nor_read_dma(mtk_nor, read_from, read_len, bouncebuf);
353 if (read_len > 0)
354 memcpy(buffer, bouncebuf + nor_unaligned_len, length);
355
356 kfree(buf);
357 return length;
358 }
359
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59419 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-12 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-10 5:21 [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading Chuanhong Guo
2019-11-10 5:21 ` [PATCH 2/2] mtd: mtk-quadspi: misuse 1_1_2 read mode for custom read opcode Chuanhong Guo
2019-11-12 7:28 ` kbuild test robot [this message]
2019-11-14 8:19 ` [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading Chuanhong Guo
2019-11-12 8:06 ` 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=201911121507.ANXNexIL%lkp@intel.com \
--to=lkp@intel.com \
--cc=gch981213@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--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).