Re: [PATCH] dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Angelo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on slave-dma/next]
[also build test WARNING on linus/master v5.7 next-20200529]
[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/Angelo-Dureghello/dmaengine-fsl-edma-fix-wrong-tcd-endianness-for-big-endian-cpu/20200601-004030
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next
config: i386-randconfig-s002-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> drivers/dma/fsl-edma-common.c:359:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] saddr @@
>> drivers/dma/fsl-edma-common.c:359:30: sparse:     expected unsigned int [usertype] val
>> drivers/dma/fsl-edma-common.c:359:30: sparse:     got restricted __le32 [usertype] saddr
>> drivers/dma/fsl-edma-common.c:360:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] daddr @@
   drivers/dma/fsl-edma-common.c:360:30: sparse:     expected unsigned int [usertype] val
>> drivers/dma/fsl-edma-common.c:360:30: sparse:     got restricted __le32 [usertype] daddr
>> drivers/dma/fsl-edma-common.c:362:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] attr @@
>> drivers/dma/fsl-edma-common.c:362:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:362:30: sparse:     got restricted __le16 [usertype] attr
>> drivers/dma/fsl-edma-common.c:363:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] soff @@
   drivers/dma/fsl-edma-common.c:363:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:363:30: sparse:     got restricted __le16 [usertype] soff
>> drivers/dma/fsl-edma-common.c:365:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] nbytes @@
   drivers/dma/fsl-edma-common.c:365:30: sparse:     expected unsigned int [usertype] val
>> drivers/dma/fsl-edma-common.c:365:30: sparse:     got restricted __le32 [usertype] nbytes
>> drivers/dma/fsl-edma-common.c:366:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] slast @@
   drivers/dma/fsl-edma-common.c:366:30: sparse:     expected unsigned int [usertype] val
>> drivers/dma/fsl-edma-common.c:366:30: sparse:     got restricted __le32 [usertype] slast
>> drivers/dma/fsl-edma-common.c:368:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] citer @@
   drivers/dma/fsl-edma-common.c:368:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:368:30: sparse:     got restricted __le16 [usertype] citer
>> drivers/dma/fsl-edma-common.c:369:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] biter @@
   drivers/dma/fsl-edma-common.c:369:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:369:30: sparse:     got restricted __le16 [usertype] biter
>> drivers/dma/fsl-edma-common.c:370:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] doff @@
   drivers/dma/fsl-edma-common.c:370:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:370:30: sparse:     got restricted __le16 [usertype] doff
>> drivers/dma/fsl-edma-common.c:371:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] val @@     got restricted __le32 [usertype] dlast_sga @@
   drivers/dma/fsl-edma-common.c:371:30: sparse:     expected unsigned int [usertype] val
>> drivers/dma/fsl-edma-common.c:371:30: sparse:     got restricted __le32 [usertype] dlast_sga
>> drivers/dma/fsl-edma-common.c:373:30: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned short [usertype] val @@     got restricted __le16 [usertype] csr @@
   drivers/dma/fsl-edma-common.c:373:30: sparse:     expected unsigned short [usertype] val
>> drivers/dma/fsl-edma-common.c:373:30: sparse:     got restricted __le16 [usertype] csr

vim +359 drivers/dma/fsl-edma-common.c

   344	
   345	static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan,
   346					  struct fsl_edma_hw_tcd *tcd)
   347	{
   348		struct fsl_edma_engine *edma = fsl_chan->edma;
   349		struct edma_regs *regs = &fsl_chan->edma->regs;
   350		u32 ch = fsl_chan->vchan.chan.chan_id;
   351	
   352		/*
   353		 * TCD parameters are stored in struct fsl_edma_hw_tcd in little
   354		 * endian format. However, we need to load the TCD registers in
   355		 * big- or little-endian obeying the eDMA engine model endian.
   356		 * The swap, when needed, is performed from edma_xxx() functions.
   357		 */
   358		edma_writew(edma, 0,  &regs->tcd[ch].csr);
 > 359		edma_writel(edma, tcd->saddr, &regs->tcd[ch].saddr);
 > 360		edma_writel(edma, tcd->daddr, &regs->tcd[ch].daddr);
   361	
 > 362		edma_writew(edma, tcd->attr, &regs->tcd[ch].attr);
 > 363		edma_writew(edma, tcd->soff, &regs->tcd[ch].soff);
   364	
 > 365		edma_writel(edma, tcd->nbytes, &regs->tcd[ch].nbytes);
 > 366		edma_writel(edma, tcd->slast, &regs->tcd[ch].slast);
   367	
 > 368		edma_writew(edma, tcd->citer, &regs->tcd[ch].citer);
 > 369		edma_writew(edma, tcd->biter, &regs->tcd[ch].biter);
 > 370		edma_writew(edma, tcd->doff, &regs->tcd[ch].doff);
 > 371		edma_writel(edma, tcd->dlast_sga, &regs->tcd[ch].dlast_sga);
   372	
 > 373		edma_writew(edma, tcd->csr, &regs->tcd[ch].csr);
   374	}
   375	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux