* [linux-next:master 1681/2336] drivers/spi/spi-cadence-quadspi.c:966:59: sparse: sparse: incompatible types in comparison expression (different type sizes):
@ 2021-01-08 9:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-08 9:08 UTC (permalink / raw)
To: Pratyush Yadav; +Cc: kbuild-all, Linux Memory Management List, Mark Brown
[-- Attachment #1: Type: text/plain, Size: 3720 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 1c925d2030afd354a02c23500386e620e662622b
commit: 0920a32cf6f20467aa133a47b776ee782daa889f [1681/2336] spi: cadence-quadspi: Wait at least 500 ms for direct reads
config: arm-randconfig-s032-20210108 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0920a32cf6f20467aa133a47b776ee782daa889f
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 0920a32cf6f20467aa133a47b776ee782daa889f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/spi/spi-cadence-quadspi.c:966:59: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/spi/spi-cadence-quadspi.c:966:59: sparse: unsigned int *
>> drivers/spi/spi-cadence-quadspi.c:966:59: sparse: unsigned long *
vim +966 drivers/spi/spi-cadence-quadspi.c
919
920 static int cqspi_direct_read_execute(struct cqspi_flash_pdata *f_pdata,
921 u_char *buf, loff_t from, size_t len)
922 {
923 struct cqspi_st *cqspi = f_pdata->cqspi;
924 struct device *dev = &cqspi->pdev->dev;
925 enum dma_ctrl_flags flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
926 dma_addr_t dma_src = (dma_addr_t)cqspi->mmap_phys_base + from;
927 int ret = 0;
928 struct dma_async_tx_descriptor *tx;
929 dma_cookie_t cookie;
930 dma_addr_t dma_dst;
931 struct device *ddev;
932
933 if (!cqspi->rx_chan || !virt_addr_valid(buf)) {
934 memcpy_fromio(buf, cqspi->ahb_base + from, len);
935 return 0;
936 }
937
938 ddev = cqspi->rx_chan->device->dev;
939 dma_dst = dma_map_single(ddev, buf, len, DMA_FROM_DEVICE);
940 if (dma_mapping_error(ddev, dma_dst)) {
941 dev_err(dev, "dma mapping failed\n");
942 return -ENOMEM;
943 }
944 tx = dmaengine_prep_dma_memcpy(cqspi->rx_chan, dma_dst, dma_src,
945 len, flags);
946 if (!tx) {
947 dev_err(dev, "device_prep_dma_memcpy error\n");
948 ret = -EIO;
949 goto err_unmap;
950 }
951
952 tx->callback = cqspi_rx_dma_callback;
953 tx->callback_param = cqspi;
954 cookie = tx->tx_submit(tx);
955 reinit_completion(&cqspi->rx_dma_complete);
956
957 ret = dma_submit_error(cookie);
958 if (ret) {
959 dev_err(dev, "dma_submit_error %d\n", cookie);
960 ret = -EIO;
961 goto err_unmap;
962 }
963
964 dma_async_issue_pending(cqspi->rx_chan);
965 if (!wait_for_completion_timeout(&cqspi->rx_dma_complete,
> 966 msecs_to_jiffies(max(len, 500UL)))) {
967 dmaengine_terminate_sync(cqspi->rx_chan);
968 dev_err(dev, "DMA wait_for_completion_timeout\n");
969 ret = -ETIMEDOUT;
970 goto err_unmap;
971 }
972
973 err_unmap:
974 dma_unmap_single(ddev, dma_dst, len, DMA_FROM_DEVICE);
975
976 return ret;
977 }
978
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34489 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-08 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 9:08 [linux-next:master 1681/2336] drivers/spi/spi-cadence-quadspi.c:966:59: sparse: sparse: incompatible types in comparison expression (different type sizes): kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox