linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used
@ 2020-06-12 11:26 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-06-12 11:26 UTC (permalink / raw)
  To: Youri Querry; +Cc: kbuild-all, linux-kernel, Li Yang

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

Hi Youri,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b791d1bdf9212d944d749a5c7ff6febdba241771
commit: 3b2abda7d28c69f564c1157b9b9c21ef40092ee9 soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue
date:   4 months ago
config: i386-randconfig-r011-20200612 (attached as .config)
compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
reproduce (this is a W=1 build):
        git checkout 3b2abda7d28c69f564c1157b9b9c21ef40092ee9
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_direct':
>> drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
uint64_t addr_cena;
^
drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_desc_direct':
drivers/soc/fsl/dpio/qbman-portal.c:869:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
addr_cena = (uint64_t)s->addr_cena;
^
drivers/soc/fsl/dpio/qbman-portal.c:825:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
uint64_t addr_cena;
^

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

   638	
   639	/**
   640	 * qbman_swp_enqueue_multiple_direct() - Issue a multi enqueue command
   641	 * using one enqueue descriptor
   642	 * @s:  the software portal used for enqueue
   643	 * @d:  the enqueue descriptor
   644	 * @fd: table pointer of frame descriptor table to be enqueued
   645	 * @flags: table pointer of QBMAN_ENQUEUE_FLAG_DCA flags, not used if NULL
   646	 * @num_frames: number of fd to be enqueued
   647	 *
   648	 * Return the number of fd enqueued, or a negative error number.
   649	 */
   650	static
   651	int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
   652					      const struct qbman_eq_desc *d,
   653					      const struct dpaa2_fd *fd,
   654					      uint32_t *flags,
   655					      int num_frames)
   656	{
   657		uint32_t *p = NULL;
   658		const uint32_t *cl = (uint32_t *)d;
   659		uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
   660		int i, num_enqueued = 0;
 > 661		uint64_t addr_cena;
   662	
   663		spin_lock(&s->access_spinlock);
   664		half_mask = (s->eqcr.pi_ci_mask>>1);
   665		full_mask = s->eqcr.pi_ci_mask;
   666	
   667		if (!s->eqcr.available) {
   668			eqcr_ci = s->eqcr.ci;
   669			p = s->addr_cena + QBMAN_CENA_SWP_EQCR_CI;
   670			s->eqcr.ci = qbman_read_register(s, QBMAN_CINH_SWP_EQCR_CI);
   671	
   672			s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
   673						eqcr_ci, s->eqcr.ci);
   674			if (!s->eqcr.available) {
   675				spin_unlock(&s->access_spinlock);
   676				return 0;
   677			}
   678		}
   679	
   680		eqcr_pi = s->eqcr.pi;
   681		num_enqueued = (s->eqcr.available < num_frames) ?
   682				s->eqcr.available : num_frames;
   683		s->eqcr.available -= num_enqueued;
   684		/* Fill in the EQCR ring */
   685		for (i = 0; i < num_enqueued; i++) {
   686			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   687			/* Skip copying the verb */
   688			memcpy(&p[1], &cl[1], EQ_DESC_SIZE_WITHOUT_FD - 1);
   689			memcpy(&p[EQ_DESC_SIZE_FD_START/sizeof(uint32_t)],
   690			       &fd[i], sizeof(*fd));
   691			eqcr_pi++;
   692		}
   693	
   694		dma_wmb();
   695	
   696		/* Set the verb byte, have to substitute in the valid-bit */
   697		eqcr_pi = s->eqcr.pi;
   698		for (i = 0; i < num_enqueued; i++) {
   699			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   700			p[0] = cl[0] | s->eqcr.pi_vb;
   701			if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
   702				struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
   703	
   704				d->dca = (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) |
   705					((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
   706			}
   707			eqcr_pi++;
   708			if (!(eqcr_pi & half_mask))
   709				s->eqcr.pi_vb ^= QB_VALID_BIT;
   710		}
   711	
   712		/* Flush all the cacheline without load/store in between */
   713		eqcr_pi = s->eqcr.pi;
   714		addr_cena = (size_t)s->addr_cena;
   715		for (i = 0; i < num_enqueued; i++)
   716			eqcr_pi++;
   717		s->eqcr.pi = eqcr_pi & full_mask;
   718		spin_unlock(&s->access_spinlock);
   719	
   720		return num_enqueued;
   721	}
   722	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used
@ 2020-08-08 19:02 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-08-08 19:02 UTC (permalink / raw)
  To: Youri Querry; +Cc: kbuild-all, linux-kernel, Li Yang

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

Hi Youri,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   11030fe96b57ad843518b0e9430f3cd4b3610ce2
commit: 3b2abda7d28c69f564c1157b9b9c21ef40092ee9 soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue
date:   6 months ago
config: i386-randconfig-r036-20200809 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        git checkout 3b2abda7d28c69f564c1157b9b9c21ef40092ee9
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_direct':
>> drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
     661 |  uint64_t addr_cena;
         |           ^~~~~~~~~
   drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_desc_direct':
   drivers/soc/fsl/dpio/qbman-portal.c:869:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     869 |  addr_cena = (uint64_t)s->addr_cena;
         |              ^
   drivers/soc/fsl/dpio/qbman-portal.c:825:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
     825 |  uint64_t addr_cena;
         |           ^~~~~~~~~

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

   638	
   639	/**
   640	 * qbman_swp_enqueue_multiple_direct() - Issue a multi enqueue command
   641	 * using one enqueue descriptor
   642	 * @s:  the software portal used for enqueue
   643	 * @d:  the enqueue descriptor
   644	 * @fd: table pointer of frame descriptor table to be enqueued
   645	 * @flags: table pointer of QBMAN_ENQUEUE_FLAG_DCA flags, not used if NULL
   646	 * @num_frames: number of fd to be enqueued
   647	 *
   648	 * Return the number of fd enqueued, or a negative error number.
   649	 */
   650	static
   651	int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
   652					      const struct qbman_eq_desc *d,
   653					      const struct dpaa2_fd *fd,
   654					      uint32_t *flags,
   655					      int num_frames)
   656	{
   657		uint32_t *p = NULL;
   658		const uint32_t *cl = (uint32_t *)d;
   659		uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
   660		int i, num_enqueued = 0;
 > 661		uint64_t addr_cena;
   662	
   663		spin_lock(&s->access_spinlock);
   664		half_mask = (s->eqcr.pi_ci_mask>>1);
   665		full_mask = s->eqcr.pi_ci_mask;
   666	
   667		if (!s->eqcr.available) {
   668			eqcr_ci = s->eqcr.ci;
   669			p = s->addr_cena + QBMAN_CENA_SWP_EQCR_CI;
   670			s->eqcr.ci = qbman_read_register(s, QBMAN_CINH_SWP_EQCR_CI);
   671	
   672			s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
   673						eqcr_ci, s->eqcr.ci);
   674			if (!s->eqcr.available) {
   675				spin_unlock(&s->access_spinlock);
   676				return 0;
   677			}
   678		}
   679	
   680		eqcr_pi = s->eqcr.pi;
   681		num_enqueued = (s->eqcr.available < num_frames) ?
   682				s->eqcr.available : num_frames;
   683		s->eqcr.available -= num_enqueued;
   684		/* Fill in the EQCR ring */
   685		for (i = 0; i < num_enqueued; i++) {
   686			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   687			/* Skip copying the verb */
   688			memcpy(&p[1], &cl[1], EQ_DESC_SIZE_WITHOUT_FD - 1);
   689			memcpy(&p[EQ_DESC_SIZE_FD_START/sizeof(uint32_t)],
   690			       &fd[i], sizeof(*fd));
   691			eqcr_pi++;
   692		}
   693	
   694		dma_wmb();
   695	
   696		/* Set the verb byte, have to substitute in the valid-bit */
   697		eqcr_pi = s->eqcr.pi;
   698		for (i = 0; i < num_enqueued; i++) {
   699			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   700			p[0] = cl[0] | s->eqcr.pi_vb;
   701			if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
   702				struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
   703	
   704				d->dca = (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) |
   705					((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
   706			}
   707			eqcr_pi++;
   708			if (!(eqcr_pi & half_mask))
   709				s->eqcr.pi_vb ^= QB_VALID_BIT;
   710		}
   711	
   712		/* Flush all the cacheline without load/store in between */
   713		eqcr_pi = s->eqcr.pi;
   714		addr_cena = (size_t)s->addr_cena;
   715		for (i = 0; i < num_enqueued; i++)
   716			eqcr_pi++;
   717		s->eqcr.pi = eqcr_pi & full_mask;
   718		spin_unlock(&s->access_spinlock);
   719	
   720		return num_enqueued;
   721	}
   722	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used
@ 2020-05-26  3:16 kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-05-26  3:16 UTC (permalink / raw)
  To: Youri Querry; +Cc: kbuild-all, linux-kernel, Li Yang

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9cb1fd0efd195590b828b9b865421ad345a4a145
commit: 3b2abda7d28c69f564c1157b9b9c21ef40092ee9 soc: fsl: dpio: Replace QMAN array mode with ring mode enqueue
date:   3 months ago
config: i386-randconfig-r004-20200526 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
        git checkout 3b2abda7d28c69f564c1157b9b9c21ef40092ee9
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_direct':
>> drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
uint64_t addr_cena;
^~~~~~~~~
drivers/soc/fsl/dpio/qbman-portal.c: In function 'qbman_swp_enqueue_multiple_desc_direct':
drivers/soc/fsl/dpio/qbman-portal.c:869:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
addr_cena = (uint64_t)s->addr_cena;
^
drivers/soc/fsl/dpio/qbman-portal.c:825:11: warning: variable 'addr_cena' set but not used [-Wunused-but-set-variable]
uint64_t addr_cena;
^~~~~~~~~

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

   638	
   639	/**
   640	 * qbman_swp_enqueue_multiple_direct() - Issue a multi enqueue command
   641	 * using one enqueue descriptor
   642	 * @s:  the software portal used for enqueue
   643	 * @d:  the enqueue descriptor
   644	 * @fd: table pointer of frame descriptor table to be enqueued
   645	 * @flags: table pointer of QBMAN_ENQUEUE_FLAG_DCA flags, not used if NULL
   646	 * @num_frames: number of fd to be enqueued
   647	 *
   648	 * Return the number of fd enqueued, or a negative error number.
   649	 */
   650	static
   651	int qbman_swp_enqueue_multiple_direct(struct qbman_swp *s,
   652					      const struct qbman_eq_desc *d,
   653					      const struct dpaa2_fd *fd,
   654					      uint32_t *flags,
   655					      int num_frames)
   656	{
   657		uint32_t *p = NULL;
   658		const uint32_t *cl = (uint32_t *)d;
   659		uint32_t eqcr_ci, eqcr_pi, half_mask, full_mask;
   660		int i, num_enqueued = 0;
 > 661		uint64_t addr_cena;
   662	
   663		spin_lock(&s->access_spinlock);
   664		half_mask = (s->eqcr.pi_ci_mask>>1);
   665		full_mask = s->eqcr.pi_ci_mask;
   666	
   667		if (!s->eqcr.available) {
   668			eqcr_ci = s->eqcr.ci;
   669			p = s->addr_cena + QBMAN_CENA_SWP_EQCR_CI;
   670			s->eqcr.ci = qbman_read_register(s, QBMAN_CINH_SWP_EQCR_CI);
   671	
   672			s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
   673						eqcr_ci, s->eqcr.ci);
   674			if (!s->eqcr.available) {
   675				spin_unlock(&s->access_spinlock);
   676				return 0;
   677			}
   678		}
   679	
   680		eqcr_pi = s->eqcr.pi;
   681		num_enqueued = (s->eqcr.available < num_frames) ?
   682				s->eqcr.available : num_frames;
   683		s->eqcr.available -= num_enqueued;
   684		/* Fill in the EQCR ring */
   685		for (i = 0; i < num_enqueued; i++) {
   686			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   687			/* Skip copying the verb */
   688			memcpy(&p[1], &cl[1], EQ_DESC_SIZE_WITHOUT_FD - 1);
   689			memcpy(&p[EQ_DESC_SIZE_FD_START/sizeof(uint32_t)],
   690			       &fd[i], sizeof(*fd));
   691			eqcr_pi++;
   692		}
   693	
   694		dma_wmb();
   695	
   696		/* Set the verb byte, have to substitute in the valid-bit */
   697		eqcr_pi = s->eqcr.pi;
   698		for (i = 0; i < num_enqueued; i++) {
   699			p = (s->addr_cena + QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
   700			p[0] = cl[0] | s->eqcr.pi_vb;
   701			if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
   702				struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
   703	
   704				d->dca = (1 << QB_ENQUEUE_CMD_DCA_EN_SHIFT) |
   705					((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
   706			}
   707			eqcr_pi++;
   708			if (!(eqcr_pi & half_mask))
   709				s->eqcr.pi_vb ^= QB_VALID_BIT;
   710		}
   711	
   712		/* Flush all the cacheline without load/store in between */
   713		eqcr_pi = s->eqcr.pi;
   714		addr_cena = (size_t)s->addr_cena;
   715		for (i = 0; i < num_enqueued; i++)
   716			eqcr_pi++;
   717		s->eqcr.pi = eqcr_pi & full_mask;
   718		spin_unlock(&s->access_spinlock);
   719	
   720		return num_enqueued;
   721	}
   722	

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-08 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 11:26 drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-08-08 19:02 kernel test robot
2020-05-26  3:16 kbuild test robot

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).