From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 5D20729D2 for ; Thu, 7 Apr 2016 19:09:14 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id u206so95901409wme.1 for ; Thu, 07 Apr 2016 10:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=VDep1/YTZVRRlXs9GjfbzShUOmxymxdjdVtZ03jmmiU=; b=HLQ+tMu3q+oYidZJrHtov8YN9sgu3q21dJfAHO2Cni+b+X5GTJcrRDnFPDkNPFi/7l A/5SE+frf5jzSlYSy8NIsC1a5JWSQJn63YlNbyDHP7KWwPJJOYLo0ozIn5VaEtUSO0+L zxvu+SpEPWDcpRZczK0xED0C2gC2rh1M1kJfQAqruJO9MhQtnz9i75CIExNenL/fFi8f by3I5xx4I7pzwuf7ZVSdc2yMgm/4Hakp1Oxg1fJ4+oyKMTCs6d+QwWZabcx96CZOmsXG 9lewX0fZPj9SjXFOiFdRrEQSev11IjBo/uW2xiLhyuuGh9jo7qyx06l/jTLX9b8DlyZU 0OaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=VDep1/YTZVRRlXs9GjfbzShUOmxymxdjdVtZ03jmmiU=; b=OCXZnny4+3Rqk2Kq38rPfX5zbPmox54NHad5Xks9U5Ntpi18+Y2z7g6XHhujBFvRqq YH6B2MX8OLh0Tai+7j9WIhT9xFMmTF+u7scc/gqv4WfKOw1Mo2aUVdrc9fyLXYydxpuO utZj/KCLYn8GnwQS/yDNOJhTM0j4yCVbK+uM4zk5SJyWv2NAM6M3t3qadqpDAUiONvso f/JWuL1qRmcu//xVyqlD7U0TXiBoYPo9YxxwtTGh6YRIodad28CH9JDZ61ilbLvLtaJb DeQF1Lroxu1dAYPXBoPSP02tMTCzM49SVzj3MgDgEi+HyEvSR2ksNvWr7P9PQBAiGUca L6cg== X-Gm-Message-State: AD7BkJKXeiY7UsWg7bej+K46gcqZ6prwrn808MlcXcUcUVhQQulTPtXk92xki6TVthgzNhUF X-Received: by 10.194.174.197 with SMTP id bu5mr5200045wjc.23.1460048954155; Thu, 07 Apr 2016 10:09:14 -0700 (PDT) Received: from xps13.localnet (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id gt7sm9457959wjc.1.2016.04.07.10.09.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Apr 2016 10:09:13 -0700 (PDT) From: Thomas Monjalon To: Slawomir Mrozowicz Cc: dev@dpdk.org Date: Thu, 07 Apr 2016 19:09:12 +0200 Message-ID: <3036379.8Bd6VsXgNg@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1460029592-11964-1-git-send-email-slawomirx.mrozowicz@intel.com> References: <1460029592-11964-1-git-send-email-slawomirx.mrozowicz@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: fix CID 124557 unchecked return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2016 17:09:14 -0000 2016-04-07 13:46, Slawomir Mrozowicz: > It fix coverity issue: > CID 124557 (#1 of 1): Unchecked return value (CHECKED_RETURN) > 3. check_return: Calling rte_eth_tx_buffer_set_err_callback without checking return value (as is done elsewhere 6 out of 7 times). Lines must be wrapped. > Fixes: d6c99e62c852 ("ethdev: add buffered Tx") > Signed-off-by: Slawomir Mrozowicz |...] |> --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -1342,15 +1342,19 @@ rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer, > int > rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size) > { > + int ret_val = 0; The name "ret" is more common in this file. > + > if (buffer == NULL) > return -EINVAL; > > buffer->size = size; > - if (buffer->error_callback == NULL) > - rte_eth_tx_buffer_set_err_callback(buffer, > - rte_eth_tx_buffer_drop_callback, NULL); > + if (buffer->error_callback == NULL) { > This blank line can be removed. > - return 0; > + ret_val = rte_eth_tx_buffer_set_err_callback( > + buffer, rte_eth_tx_buffer_drop_callback, NULL); > + } > + > + return ret_val; > } Applied with above small changes, thanks and welcome :)