[linux-next:master 3010/7050] drivers/soc/fsl/dpio/qbman-portal.c:755:42: sparse: sparse: incorrect type in argument 1 (different address spaces)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b86a6a241b7c60ca7a6ca4fb3c0d2aedbbf2c1b6
commit: 3b2abda7d28c69f564c1157b9b9c21ef40092ee9 [3010/7050] soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-174-g094d5a94-dirty
        git checkout 3b2abda7d28c69f564c1157b9b9c21ef40092ee9
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/soc/fsl/dpio/qbman-portal.c:755:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got d const volatile [noderef] <asn:2> *addr @@
   drivers/soc/fsl/dpio/qbman-portal.c:755:42: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/soc/fsl/dpio/qbman-portal.c:755:42: sparse:    got unsigned int [usertype] *[assigned] p
   drivers/soc/fsl/dpio/qbman-portal.c:903:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2> *addr @@    got d const volatile [noderef] <asn:2> *addr @@
   drivers/soc/fsl/dpio/qbman-portal.c:903:42: sparse:    expected void const volatile [noderef] <asn:2> *addr
   drivers/soc/fsl/dpio/qbman-portal.c:903:42: sparse:    got unsigned int [usertype] *[assigned] p

vim +755 drivers/soc/fsl/dpio/qbman-portal.c

   722	
   723	/**
   724	 * qbman_swp_enqueue_multiple_mem_back() - Issue a multi enqueue command
   725	 * using one enqueue descriptor
   726	 * @s:  the software portal used for enqueue
   727	 * @d:  the enqueue descriptor
   728	 * @fd: table pointer of frame descriptor table to be enqueued
   729	 * @flags: table pointer of QBMAN_ENQUEUE_FLAG_DCA flags, not used if NULL
   730	 * @num_frames: number of fd to be enqueued
   731	 *
   732	 * Return the number of fd enqueued, or a negative error number.
   733	 */
   734	static
   735	int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
   736						const struct qbman_eq_desc *d,
   737						const struct dpaa2_fd *fd,
   738						uint32_t *flags,
   739						int num_frames)
   740	{
   741		uint32_t *p = NULL;
   742		const uint32_t *cl = (uint32_t *)(d);
   743		uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
   744		int i, num_enqueued = 0;
   745		unsigned long irq_flags;
   746	
   747		spin_lock(&s->access_spinlock);
   748		local_irq_save(irq_flags);
   749	
   750		half_mask = (s->eqcr.pi_ci_mask>>1);
   751		full_mask = s->eqcr.pi_ci_mask;
   752		if (!s->eqcr.available) {
   753			eqcr_ci = s->eqcr.ci;
   754			p = s->addr_cena + QBMAN_CENA_SWP_EQCR_CI_MEMBACK;
 > 755			s->eqcr.ci = __raw_readl(p) & full_mask;
   756			s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
   757						eqcr_ci, s->eqcr.ci);
   758			if (!s->eqcr.available) {
   759				local_irq_restore(irq_flags);
   760				spin_unlock(&s->access_spinlock);
   761				return 0;
   762			}
   763		}
   764	
   765		eqcr_pi = s->eqcr.pi;
   766		num_enqueued = (s->eqcr.available < num_frames) ?
   767				s->eqcr.available : num_frames;
   768		s->eqcr.available -= num_enqueued;
   769		/* Fill in the EQCR ring */
   770		for (i = 0; i < num_enqueued; i++) {
   771			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   772			/* Skip copying the verb */
   773			memcpy(&p[1], &cl[1], EQ_DESC_SIZE_WITHOUT_FD - 1);
   774			memcpy(&p[EQ_DESC_SIZE_FD_START/sizeof(uint32_t)],
   775			       &fd[i], sizeof(*fd));
   776			eqcr_pi++;
   777		}
   778	
   779		/* Set the verb byte, have to substitute in the valid-bit */
   780		eqcr_pi = s->eqcr.pi;
   781		for (i = 0; i < num_enqueued; i++) {
   782			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   783			p[0] = cl[0] | s->eqcr.pi_vb;
   784			if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
   785				struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
   786	
   787				d->dca = (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) |
   788					((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
   789			}
   790			eqcr_pi++;
   791			if (!(eqcr_pi & half_mask))
   792				s->eqcr.pi_vb ^= QB_VALID_BIT;
   793		}
   794		s->eqcr.pi = eqcr_pi & full_mask;
   795	
   796		dma_wmb();
   797		qbman_write_register(s, QBMAN_CINH_SWP_EQCR_PI,
   798					(QB_RT_BIT)|(s->eqcr.pi)|s->eqcr.pi_vb);
   799		local_irq_restore(irq_flags);
   800		spin_unlock(&s->access_spinlock);
   801	
   802		return num_enqueued;
   803	}
   804	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux