From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
Emmanuel Roullit <emmanuel.roullit@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Kumar Sanghvi <kumaras@chelsio.com>,
Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: Re: [PATCH 2/3] net/cxgbe: remove unused variable usage
Date: Thu, 26 Jan 2017 10:11:24 +0530 [thread overview]
Message-ID: <20170126044123.GA6590@chelsio.com> (raw)
In-Reply-To: <4742eebd-1712-db20-26b0-d2a8e1f9aaf8@intel.com>
On Wednesday, January 01/25/17, 2017 at 17:43:57 +0530, Ferruh Yigit wrote:
> On 1/24/2017 8:48 PM, Emmanuel Roullit wrote:
> > Found with clang static analysis:
> > drivers/net/cxgbe/sge.c:900:3: warning:
> > Value stored to 'in_use' is never read
> > in_use += q->size;
> > ^ ~~~~~~~
> >
> > Fixes: c167acb61278 ("net/cxgbe: use I/O device memory read/write API")
This fixes line seems to be wrong. Should be:
Fixes: 4a01078b4fd1 ("cxgbe: add Tx support")
> >
> > Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
> > ---
> > drivers/net/cxgbe/sge.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
> > index fc03a0c26..42051ca01 100644
> > --- a/drivers/net/cxgbe/sge.c
> > +++ b/drivers/net/cxgbe/sge.c
> > @@ -891,14 +891,10 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq,
> > unsigned int flits, ndesc;
> > unsigned char type = 0;
> > int credits, hw_cidx = ntohs(q->stat->cidx);
> > - int in_use = q->pidx - hw_cidx + flits_to_desc(q->coalesce.flits);
> >
> > /* use coal WR type 1 when no frags are present */
> > type = (mbuf->nb_segs == 1) ? 1 : 0;
> >
> > - if (in_use < 0)
> > - in_use += q->size;
>
> Intention can be "q->in_use" here. That change can be proper fix instead
> of removing.
>
> I will wait for maintainers comment to get the patch.
>
in_use can be removed. Also, Patch 2 and 3 can be merged.
> > -
> > if (unlikely(type != q->coalesce.type && q->coalesce.idx))
> > ship_tx_pkt_coalesce_wr(adap, txq);
> >
> >
>
Thanks,
Rahul
next prev parent reply other threads:[~2017-01-26 4:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 20:48 [PATCH 1/3] net/cxgbe: init data value before reading seeprom Emmanuel Roullit
2017-01-24 20:48 ` [PATCH 2/3] net/cxgbe: remove unused variable usage Emmanuel Roullit
2017-01-25 12:13 ` Ferruh Yigit
2017-01-26 4:41 ` Rahul Lakkireddy [this message]
2017-01-26 11:05 ` Ferruh Yigit
2017-02-14 6:10 ` Yuanhan Liu
2017-01-24 20:48 ` [PATCH 3/3] net/cxgbe: remove unused variable Emmanuel Roullit
2017-01-25 12:15 ` Ferruh Yigit
2017-01-25 12:12 ` [PATCH 1/3] net/cxgbe: init data value before reading seeprom Ferruh Yigit
2017-01-26 11:06 ` Ferruh Yigit
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=20170126044123.GA6590@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=dev@dpdk.org \
--cc=emmanuel.roullit@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=kumaras@chelsio.com \
--cc=nirranjan@chelsio.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.