From patchwork Fri Feb 27 11:51:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 45219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C25AC20674 for ; Fri, 27 Feb 2015 11:51:38 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf14007259lbv.1 for ; Fri, 27 Feb 2015 03:51:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=rA4ixsPJ7qr6flxeduJFJbbHp69OdSOJ3r307PzjyC4=; b=iDS1yVwE5yV6bV1wGnNbjod2O9SSsQDLzI1eiuIF9S2GXBona8MLzpCQuFara8sbdn T8SRegyDXPM69parpu1s/y6ZHMZHNlFl6cCwpyH4cyu4kNsHqD390w2/uMKicp5h8Bg8 QRorL9n4xuh2nieWMvgWOyvees2ci6JQn7IXUBYj7CrU9Ej0TBXtmokR/wMVtYMgB82Q 7FsKHAIZCoTtQuw8t2OjbQqSmYvjJcypNLF0V0Mp0y9G+TIlRFV1GvV1X+BGHW7IacKM O4sgEHH2qRmigKGMEUL6uso7GNRhryMEpZyQrPBpOGS0mZIqw6OK0meAc522EHlhYQpz o53A== X-Gm-Message-State: ALoCoQnlpGbv518a9vkMBvngQt28tupSO0+arei+WjtkgoCSKrFJE2ifBh4dC5hIMg31D2YO9fh6 X-Received: by 10.180.160.176 with SMTP id xl16mr411102wib.6.1425037897256; Fri, 27 Feb 2015 03:51:37 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.84 with SMTP id be20ls169024lab.89.gmail; Fri, 27 Feb 2015 03:51:37 -0800 (PST) X-Received: by 10.112.54.228 with SMTP id m4mr12232242lbp.20.1425037897086; Fri, 27 Feb 2015 03:51:37 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id cj5si2790968lbc.22.2015.02.27.03.51.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 03:51:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbdu14 with SMTP id u14so16699721lbd.1 for ; Fri, 27 Feb 2015 03:51:37 -0800 (PST) X-Received: by 10.112.114.230 with SMTP id jj6mr11851753lbb.112.1425037896916; Fri, 27 Feb 2015 03:51:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp3883128lbj; Fri, 27 Feb 2015 03:51:36 -0800 (PST) X-Received: by 10.229.25.200 with SMTP id a8mr28314887qcc.22.1425037895221; Fri, 27 Feb 2015 03:51:35 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id p20si3750574qgd.117.2015.02.27.03.51.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:51:35 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YRJS6-0005vH-RS; Fri, 27 Feb 2015 11:51:30 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YRJS0-0005v7-Nn for lng-odp@lists.linaro.org; Fri, 27 Feb 2015 11:51:24 +0000 Received: by lbjb6 with SMTP id b6so16797103lbj.2 for ; Fri, 27 Feb 2015 03:51:18 -0800 (PST) X-Received: by 10.112.39.69 with SMTP id n5mr12071154lbk.1.1425037878332; Fri, 27 Feb 2015 03:51:18 -0800 (PST) Received: from localhost.localdomain (broadband-46-188-125-102.2com.net. [46.188.125.102]) by mx.google.com with ESMTPSA id am8sm794351lac.5.2015.02.27.03.51.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:51:17 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 27 Feb 2015 14:51:10 +0300 Message-Id: <1425037871-28253-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: crypto patch Subject: [lng-odp] [PATCHv2 1/2] linux-generic: handle copy error in odp_crypto_operation X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 In that case _odp_packet_copy_to_packet can not return non 0. Because of code is on performance path just cast it to void to fix Coverity warning. https://bugs.linaro.org/show_bug.cgi?id=1054 CID 85004: Unchecked return value (CHECKED_RETURN) Calling "_odp_packet_copy_to_packet" without checking return value (as is done elsewhere 5 out of 6 times). Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/odp_crypto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 3d59108..4998b8a 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -388,8 +388,11 @@ odp_crypto_operation(odp_crypto_op_params_t *params, if (params->pkt != params->out_pkt) { if (odp_unlikely(ODP_PACKET_INVALID == params->out_pkt)) ODP_ABORT(); - _odp_packet_copy_to_packet(params->pkt, 0, params->out_pkt, 0, - odp_packet_len(params->pkt)); + (void)_odp_packet_copy_to_packet(params->pkt, + 0, + params->out_pkt, + 0, + odp_packet_len(params->pkt)); _odp_packet_copy_md_to_packet(params->pkt, params->out_pkt); odp_packet_free(params->pkt); params->pkt = ODP_PACKET_INVALID;