From patchwork Wed Feb 4 12:00:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 44333 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC4C621513 for ; Wed, 4 Feb 2015 12:01:00 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf1016566wgg.0 for ; Wed, 04 Feb 2015 04:01:00 -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=+uIwVYVFKoo9Oowk3UJVc4a7RoN7vRt85NqsQpWYUdo=; b=X0180iQa21NNjJZmwDDX8IWRJGVj0EcvUXaRib05gp8y9f21l0UoW5CkvAHti1+OfC xAtIkOURYDOkSgLad19kDiYlqksypf8tDBU3vvYecsxj0AzY3NlcDzCtO5eIT/VzKMuJ E09+bAUzMMnZt3IUyYmem0xBoXh6Jt+4bA0iDoz3Hi9T9iKaV1+itI1HvnOk2YPXI1/p xGfnDpWg+uzafHiMIUug6Kc7aiOx1dKvphBUNbl2/8Xus7lkfuL+vOW4wiLVRd0dYH+s UuVQS8s1LR6+xjyVQNzq+FoGizAwiOXd4pCbGss8cCsgxQGZuERlk4IbQI/kZJQMxKFZ E/bQ== X-Gm-Message-State: ALoCoQm+dXgiygqZOBwNX12FXDq2TMrBiQ+lJo06GR3gU6ThLFsQdxXjoOFAXY5ZaYa0+MFzu89M X-Received: by 10.180.98.199 with SMTP id ek7mr2665570wib.1.1423051260083; Wed, 04 Feb 2015 04:01:00 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.205 with SMTP id q13ls23003lal.54.gmail; Wed, 04 Feb 2015 04:00:59 -0800 (PST) X-Received: by 10.152.234.230 with SMTP id uh6mr28956875lac.97.1423051259900; Wed, 04 Feb 2015 04:00:59 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id uk4si1151922lbb.68.2015.02.04.04.00.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 04:00:59 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id gf13so1099238lab.8 for ; Wed, 04 Feb 2015 04:00:59 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr29384244lbc.56.1423051259474; Wed, 04 Feb 2015 04:00:59 -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 h5csp439282lbj; Wed, 4 Feb 2015 04:00:57 -0800 (PST) X-Received: by 10.140.92.33 with SMTP id a30mr60253117qge.30.1423051256872; Wed, 04 Feb 2015 04:00:56 -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 l68si1720556qgl.90.2015.02.04.04.00.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 04:00:56 -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 1YIydZ-0004HV-O0; Wed, 04 Feb 2015 12:00:53 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIydF-0004A7-Ny for lng-odp@lists.linaro.org; Wed, 04 Feb 2015 12:00:33 +0000 Received: by mail-lb0-f173.google.com with SMTP id p9so1077605lbv.4 for ; Wed, 04 Feb 2015 04:00:27 -0800 (PST) X-Received: by 10.152.28.129 with SMTP id b1mr17478937lah.37.1423051227173; Wed, 04 Feb 2015 04:00:27 -0800 (PST) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id z15sm312379lbn.48.2015.02.04.04.00.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 04:00:26 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Wed, 4 Feb 2015 14:00:11 +0200 Message-Id: <1423051213-20795-4-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423051213-20795-1-git-send-email-taras.kondratiuk@linaro.org> References: <1423051213-20795-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCH 3/5] linux-generic: crypto: fix crypto_alg_err enum return values 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: taras.kondratiuk@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.49 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: Taras Kondratiuk --- platform/linux-generic/odp_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 46766fa..fa7d51f 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -160,7 +160,7 @@ enum crypto_alg_err des_encrypt(odp_crypto_op_params_t *params, else if (session->cipher.iv.data) iv_ptr = session->cipher.iv.data; else - return ODP_CRYPTO_SES_CREATE_ERR_INV_CIPHER; + return ODP_CRYPTO_ALG_ERR_KEY_SIZE; /* * Create a copy of the IV. The DES library modifies IV @@ -198,7 +198,7 @@ enum crypto_alg_err des_decrypt(odp_crypto_op_params_t *params, else if (session->cipher.iv.data) iv_ptr = session->cipher.iv.data; else - return ODP_CRYPTO_SES_CREATE_ERR_INV_CIPHER; + return ODP_CRYPTO_ALG_ERR_KEY_SIZE; /* * Create a copy of the IV. The DES library modifies IV