linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Youri Querry <youri.querry_1@nxp.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Li Yang <leoyang.li@nxp.com>
Subject: drivers/soc/fsl/dpio/qbman-portal.c:661:11: warning: variable 'addr_cena' set but not used
Date: Tue, 26 May 2020 11:16:14 +0800	[thread overview]
Message-ID: <202005261112.32gK9Ke9%lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2020-05-26  3:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26  3:16 kbuild test robot [this message]
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
2020-08-08 19:02 kernel 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=202005261112.32gK9Ke9%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=youri.querry_1@nxp.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).