From patchwork Mon Feb 16 16:04:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44721 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DBD7A21544 for ; Mon, 16 Feb 2015 16:04:47 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf15918778wiw.0 for ; Mon, 16 Feb 2015 08:04:47 -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=Dzk083DG5pdzydlLy7nvC1dkcy2NdWHgIHHtDUE4Mf4=; b=hZLid5WeV+cRaaJixSQzYyJCsdBqHh9P4e5yd1InlyX+it5BsteWWlIL9W9mams4JD hjI1iKBTNCCx/X+kAqT4yeWd+LKUMqHSNLdUi+vAPurmzsw6M5R+xGWHBKGi2D8RUw2Q t8qDwz81NDoMFZLjf6xGfXc60mwS6iaMMZS3lyxE1nbQDAGQBCL50NSHZD+WU/GXC98u XSmBrkSDb1Xno9fIzHxw1QRP78tnIvD0BdbD4u9M9BihCIeojij8LtQJhnEswotBFnkT Cy92qmkcV9NkIWJxFKtGRPfeuBCIlogjCHTpXqYJjCf4EMXn+9qsKtfb6GVbBZqPESxO 9mDg== X-Gm-Message-State: ALoCoQmF7HL7sYB2yCDEgPOOj5nYyd8ay/Zm0lKPNuWxuDhGRjAQA8YdHOcuFgy7+fNYUw0cODrU X-Received: by 10.180.81.34 with SMTP id w2mr2955913wix.2.1424102687210; Mon, 16 Feb 2015 08:04:47 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.97 with SMTP id p1ls591434laj.4.gmail; Mon, 16 Feb 2015 08:04:46 -0800 (PST) X-Received: by 10.112.30.135 with SMTP id s7mr23185431lbh.63.1424102686823; Mon, 16 Feb 2015 08:04:46 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id qf5si7987297lbb.170.2015.02.16.08.04.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Feb 2015 08:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by labge10 with SMTP id ge10so30015737lab.12 for ; Mon, 16 Feb 2015 08:04:46 -0800 (PST) X-Received: by 10.152.116.18 with SMTP id js18mr22897988lab.106.1424102686729; Mon, 16 Feb 2015 08:04:46 -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 h5csp1670315lbj; Mon, 16 Feb 2015 08:04:46 -0800 (PST) X-Received: by 10.170.209.85 with SMTP id a82mr18265894ykf.99.1424102685490; Mon, 16 Feb 2015 08:04:45 -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 x3si14576238qas.42.2015.02.16.08.04.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Feb 2015 08:04:45 -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 1YNOA5-00087o-Sa; Mon, 16 Feb 2015 16:04:41 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNO9x-00085X-CP for lng-odp@lists.linaro.org; Mon, 16 Feb 2015 16:04:33 +0000 Received: by labhs14 with SMTP id hs14so29570285lab.1 for ; Mon, 16 Feb 2015 08:04:27 -0800 (PST) X-Received: by 10.152.22.39 with SMTP id a7mr23279471laf.119.1424102667755; Mon, 16 Feb 2015 08:04:27 -0800 (PST) Received: from localhost.localdomain (broadband-46-188-125-106.2com.net. [46.188.125.106]) by mx.google.com with ESMTPSA id dl2sm3018750lbb.32.2015.02.16.08.04.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Feb 2015 08:04:26 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 16 Feb 2015 19:04:18 +0300 Message-Id: <1424102658-26557-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1424102658-26557-1-git-send-email-maxim.uvarov@linaro.org> References: <1424102658-26557-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCH 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.41 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 --- 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 fb1e3fc..9bb887a 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -360,11 +360,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();