DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Leyi Rong <leyi.rong@intel.com>, qi.z.zhang@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix unchecked return value
Date: Wed, 14 Oct 2020 13:41:24 +0100	[thread overview]
Message-ID: <11c66b66-582a-d834-1085-ae4218949eae@intel.com> (raw)
In-Reply-To: <20201014082857.81080-1-leyi.rong@intel.com>

On 10/14/2020 9:28 AM, Leyi Rong wrote:
> Fixes coverity unchecked return value issue.
> 
> Coverity issue: 363045
> Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")
> 

Hi Leyi,

Can you please put some justification to the commit log, why return value can be 
ignored instead of handling it?

Technically this patch doesn't put you in a better place, still you are not 
checking the return value, indeed it is worse since it is silenced and even 
coverity can't warn you anymore.

> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
>   drivers/net/iavf/iavf_rxtx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
> index 7e6e425ac..ca0f5d072 100644
> --- a/drivers/net/iavf/iavf_rxtx.c
> +++ b/drivers/net/iavf/iavf_rxtx.c
> @@ -2077,7 +2077,7 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>   
>   	/* Check if the descriptor ring needs to be cleaned. */
>   	if (txq->nb_free < txq->free_thresh)
> -		iavf_xmit_cleanup(txq);
> +		(void)iavf_xmit_cleanup(txq);
>   
>   	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
>   		td_cmd = 0;
> 


  parent reply	other threads:[~2020-10-14 12:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  8:28 Leyi Rong
2020-10-14 11:51 ` Zhang, Qi Z
2020-10-14 12:41 ` Ferruh Yigit [this message]
2020-10-19  5:42 ` [dpdk-dev] [PATCH v2] net/iavf: fix unchecked Tx cleanup error Leyi Rong
2020-10-20 10:27   ` Zhang, Qi Z

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=11c66b66-582a-d834-1085-ae4218949eae@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=leyi.rong@intel.com \
    --cc=qi.z.zhang@intel.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).