Received: by 10.223.185.116 with SMTP id b49csp5472138wrg; Tue, 27 Feb 2018 14:03:46 -0800 (PST) X-Google-Smtp-Source: AH8x225+5Ibhaq5F8/8TaXW+1b2DastT+HAxXo85DgnYFNE6X7eATxq4LgMiLIfIxnCNifLZ/l0g X-Received: by 2002:a17:902:d909:: with SMTP id c9-v6mr15579701plz.34.1519769026561; Tue, 27 Feb 2018 14:03:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519769026; cv=none; d=google.com; s=arc-20160816; b=H9HHjuVQv22kh/R293owwgpCGxayHr//5p3mmiy7S14XhEcl5bR5YwT3Ld/rvQGNDw qOGyj2RpKuiVRX8VhcyIPfw4EjWefTvKjg7othnFjOorwORcj0Gz44y7ptqrUZR/dLiL zy5t1LvOTw2SzqSJLxSJM+rEZGky7XTCRY0eyo+NQ3TRNi38GsT5wehq/8nrt4aJ/HpQ Z0RRTdKVBugYCKqOqQ8bGi1MPRgTISLGgmzLvAZq9MjF6Uitb7WKkrSToGjxmNknY4R0 TviopwlumAZy/HMuldCWXxixjw343c2fzUPscVi1R12Sgws2sI2qiQJbt4CNf5LrocAv ozCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=PNytzbmDF+uVBEtZTLiPvw1ArNaZgJGWNoAimwUbzE8=; b=sFtBRQLc8DiBN+HwDR3h5CwqYvOHywvgUgIQT+wf8JBE76oLz815QpxnUwGh0brN+u nxy4ngWOKGCFUSdgCXSph2ws6aKwTREye/y9NUpf+b9ElBNQeIUs5C82oubDA4dhwl24 xFvVF6G8fN0MkBA7YS/OBqHRaaFU6clHy97rh6kNr5Y2ZLN5dPWYIwgdQzHTbgk1Vjm5 8Jp62hWamIicb4298f9YdmD/gk56rPAICA/LzjG8Gcx/Ccp2Lo3ipvllQL+u8f4+oRe4 AVtpsZCE6xmW0z+B2f7rJVMENNNwK0eQ2ICJSGuyGI0iEVlg9lVK/u35Bb5vYO9mFKq5 i4GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=fZoaJKc6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si123890plp.325.2018.02.27.14.03.31; Tue, 27 Feb 2018 14:03:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=fZoaJKc6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbeB0WCe (ORCPT + 99 others); Tue, 27 Feb 2018 17:02:34 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33439 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbeB0WCb (ORCPT ); Tue, 27 Feb 2018 17:02:31 -0500 Received: by mail-qt0-f196.google.com with SMTP id a23so530032qtn.0 for ; Tue, 27 Feb 2018 14:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PNytzbmDF+uVBEtZTLiPvw1ArNaZgJGWNoAimwUbzE8=; b=fZoaJKc6PUOfIS45qyDynXmBlk/PSlT08i0MdL0MfdH1RyaYwWmTctodidBjl4ETCc llLBThk2PRVZNZdez+BM0oePTbZXefNu+axhfiwSOdOXQhnU0mP3F4St7mqQrC9zLG1N elYGkJWrs2g0xegyDGBFx/VYIOUjSc5V6l+BCG45dF6jO0/T6vIF4AtMQguSnc/mTTzk NpZnBg6QS7isfcrRAuGzU63AR0sVg2stdsXKJlK13kJDtYCwZ8iMGqnPtdQZz/zYaL8N cOrrTz1u6qwVL+1frAJgF2DhVf9Q0zZG7dCI99Pry3lOL7f3k7OtE9jQaN2e5w6/803y bfxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PNytzbmDF+uVBEtZTLiPvw1ArNaZgJGWNoAimwUbzE8=; b=mxXlGJV28iOdsHUFhc7Kk9jlZq2TACqM6+sA1YP2JiTNGLkM+q+v4NldTrkK3Yvx2+ ll+RupNQC4HqlkRG/tEGn2xVCkMXxtkw16b0XNSJPMcEjjEcwtJqBpadtrDS1o1LbhmM h/rcyGtKPuSuRZ77Bj0+VgKiwvO6CEUOX/Bxw5YZjpQguB+0rsPAO9nvaMkqSkGlJe4m OG4y2k7d4A/FD6wAnTLGZJ65/qfzy2p3umr3SSREY/IlQJJ3NlZy1cEzITznTMkeF2/Q IrDX9zuk1uepEmg8NCgxTnOIVI2LugqRlA1jyTX4lezc90s/ejRayghKu4zLZqLT1YXR Gqmw== X-Gm-Message-State: APf1xPBShaa85S250B7BppX7XzlO4rIWTUyV4EpUTSV3ws/M1VTphdhB L0iUwEU+20oHcSYGPRgUci+8hw== X-Received: by 10.200.57.228 with SMTP id v91mr25549109qte.77.1519768951130; Tue, 27 Feb 2018 14:02:31 -0800 (PST) Received: from hlaptop.cpe.express.com.ar ([200.3.222.253]) by smtp.gmail.com with ESMTPSA id g124sm116514qkb.67.2018.02.27.14.02.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Feb 2018 14:02:30 -0800 (PST) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: herbert@gondor.apana.org.au, davem@davemloft.net, hernan@vanguardiasur.com.ar, steven.lin1@broadcom.com, arvind.yadav.cs@gmail.com, colin.king@canonical.com, raveendra.padasalagi@broadcom.com, ray.jui@broadcom.com, scott.branden@broadcom.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] crypto: bcm: Move *aead_alg_name[] from spu.c to util.c. Constify too. Date: Tue, 27 Feb 2018 19:01:26 -0300 Message-Id: <1519768888-19866-2-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar> References: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Note: This is compile only tested. Move variable to where it is actually used. No gain from this except for some self-documenting. Signed-off-by: HernĂ¡n Gonzalez --- drivers/crypto/bcm/spu.c | 2 -- drivers/crypto/bcm/spu.h | 1 - drivers/crypto/bcm/util.c | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/bcm/spu.c b/drivers/crypto/bcm/spu.c index c3d177d..efaf3cf 100644 --- a/drivers/crypto/bcm/spu.c +++ b/drivers/crypto/bcm/spu.c @@ -26,8 +26,6 @@ char *hash_alg_name[] = { "None", "md5", "sha1", "sha224", "sha256", "aes", "sha384", "sha512", "sha3_224", "sha3_256", "sha3_384", "sha3_512" }; -char *aead_alg_name[] = { "ccm(aes)", "gcm(aes)", "authenc" }; - /* Assumes SPU-M messages are in big endian */ void spum_dump_msg_hdr(u8 *buf, unsigned int buf_len) { diff --git a/drivers/crypto/bcm/spu.h b/drivers/crypto/bcm/spu.h index aa6fc38..f252367 100644 --- a/drivers/crypto/bcm/spu.h +++ b/drivers/crypto/bcm/spu.h @@ -112,7 +112,6 @@ enum aead_type { }; extern char *hash_alg_name[HASH_ALG_LAST]; -extern char *aead_alg_name[AEAD_TYPE_LAST]; struct spu_request_opts { bool is_inbound; diff --git a/drivers/crypto/bcm/util.c b/drivers/crypto/bcm/util.c index d543c01..fa6161a 100644 --- a/drivers/crypto/bcm/util.c +++ b/drivers/crypto/bcm/util.c @@ -23,6 +23,8 @@ #define SPU_OFIFO_CTRL 0x40 #define SPU_FIFO_WATERMARK 0x1FF +static char const * const aead_alg_name[] = { "ccm(aes)", "gcm(aes)", "authenc" }; + /** * spu_sg_at_offset() - Find the scatterlist entry at a given distance from the * start of a scatterlist. -- 2.7.4