From patchwork Fri Feb 27 11:51:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 45220 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 710C920674 for ; Fri, 27 Feb 2015 11:51:41 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf14027388lbi.0 for ; Fri, 27 Feb 2015 03:51:40 -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:in-reply-to :references: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=GrDpmqGH+Uuxb+qXbGvhycDb/OaR8ge55KGcr42a950=; b=gOTqJ6lv9Rd757BrTmqpkjTNd2miBu2Ui7IkvyvZ46mBdX/F518+O5oov38cQbve5D b+PTXNyOQq3GrWjC3nE8+BNOEf31RbOh2vxMHLkipCGrc4cdaH+dNMpx2VqIeV1LTc+k Czf9qPlrdohakRRto5qYsqf61m/e5RfSffvyQdfpKLXLxZXG+x8diDAz5rk8v+fKG2RV Z6IaBoy2BXs5pTFHcyjN2hb3p6B5o88AzqBYYu3oc4UU/pkZllRxwq9Fjn/p682RQgS9 BMuDnqNFc1sbEif0V1vNWHS7a4+zxr02Pl7BcI+QnzIL8dh1DWI+vPrXc3hXr1ZavQ4S 3n4g== X-Gm-Message-State: ALoCoQl+/mEIX0ACZHxR17DvEO/3m+8TgNgDSbT9r+MMSz+SSW30L94yTl0h//ASBpG/3E5Pmzpj X-Received: by 10.152.37.200 with SMTP id a8mr1998057lak.5.1425037900375; Fri, 27 Feb 2015 03:51:40 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.1 with SMTP id lg1ls148513lab.34.gmail; Fri, 27 Feb 2015 03:51:40 -0800 (PST) X-Received: by 10.152.36.138 with SMTP id q10mr11857546laj.113.1425037900200; Fri, 27 Feb 2015 03:51:40 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id r2si2793402lae.17.2015.02.27.03.51.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 03:51:40 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labgm9 with SMTP id gm9so17025267lab.2 for ; Fri, 27 Feb 2015 03:51:40 -0800 (PST) X-Received: by 10.152.116.18 with SMTP id js18mr12121334lab.106.1425037900049; Fri, 27 Feb 2015 03:51:40 -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 h5csp3883153lbj; Fri, 27 Feb 2015 03:51:39 -0800 (PST) X-Received: by 10.55.27.42 with SMTP id b42mr267050qkb.73.1425037898562; Fri, 27 Feb 2015 03:51:38 -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 s12si3840359qah.22.2015.02.27.03.51.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:51:38 -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 1YRJSB-0005vT-3D; Fri, 27 Feb 2015 11:51:35 +0000 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YRJS1-0005v8-Qe for lng-odp@lists.linaro.org; Fri, 27 Feb 2015 11:51:25 +0000 Received: by lbvn10 with SMTP id n10so16749957lbv.4 for ; Fri, 27 Feb 2015 03:51:20 -0800 (PST) X-Received: by 10.112.110.231 with SMTP id id7mr12142519lbb.28.1425037879884; Fri, 27 Feb 2015 03:51:19 -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.18 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 03:51:18 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Fri, 27 Feb 2015 14:51:11 +0300 Message-Id: <1425037871-28253-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1425037871-28253-1-git-send-email-maxim.uvarov@linaro.org> References: <1425037871-28253-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv2 2/2] linux-generic: odp_crypto_operation merge 2 ifs 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.215.54 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 Signed-off-by: Maxim Uvarov Reviewed-by: Bill Fischofer --- platform/linux-generic/odp_crypto.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 4998b8a..b16316c 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -380,11 +380,10 @@ odp_crypto_operation(odp_crypto_op_params_t *params, session = (odp_crypto_generic_session_t *)(intptr_t)params->session; /* Resolve output buffer */ - if (ODP_PACKET_INVALID == params->out_pkt) - if (ODP_POOL_INVALID != session->output_pool) - params->out_pkt = - odp_packet_alloc(session->output_pool, - odp_packet_len(params->pkt)); + if (ODP_PACKET_INVALID == params->out_pkt && + ODP_POOL_INVALID != session->output_pool) + params->out_pkt = odp_packet_alloc(session->output_pool, + odp_packet_len(params->pkt)); if (params->pkt != params->out_pkt) { if (odp_unlikely(ODP_PACKET_INVALID == params->out_pkt)) ODP_ABORT();