Received: by 10.223.185.111 with SMTP id b44csp413592wrg; Fri, 9 Mar 2018 07:05:59 -0800 (PST) X-Google-Smtp-Source: AG47ELu15V/6FGWFlBBu2qua/ofmo8KfGgvyUCguwrJRC2B2xqHjMrSD/Y4qDRbbBdxlrcq6X4o9 X-Received: by 2002:a17:902:b606:: with SMTP id b6-v6mr27510207pls.93.1520607959001; Fri, 09 Mar 2018 07:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520607958; cv=none; d=google.com; s=arc-20160816; b=dkwp7zjbo7CpmtW/tqD4bdrAuP+uOf1yt/Lo3sOW9BrlpVlpr1swJCj09/Afq7Lg/V E81lQFmeM7fPbkE3Nk1mB4qJzC9P+IkC95rl4q/YZy6KBDQBzceihP/+C6n6Wt9+T49j +7brbYjZ/b3VMjBmLEWt/Hux6XB1GWTiWcHCrvrBSZXnBEdVignO69J9K6Bet6/IlsuG ZECHDIv9uXYJkzUhSCZ1r5GoPD04diU7vudunROU7k2/KSxipC882dKXXxsbSySY+ZeO QwXDqAxEizEU5ykcmAMAZbP2zyR7fvIRk25J7uMoe2gT3OAvJrjByzyuR6PiYUq43ZGi aRzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:user-agent :date:message-id:from:to:subject:mime-version:dkim-signature :dkim-filter:arc-authentication-results; bh=1UP93IZHYhRBfzF8/nhVI9uxE7tqQuymNSoGHzguhIk=; b=J6gVWE3pmHBhP90CLItvHn604ykXwB8NfMrcmnQ7zu0FgxMm1NZbOeGS4Gn/aU5zyh myas6puYtkKP6CpVx2VwM8/R+jlFWIWKFIggYILbpitHzTXxoNSKEIcP5OvCw1rbdthK PiJ9B2w2BIXMffsK1a/WWrF4horvHWeAtebCEfKIErM+JIR0/zILjdFR1GzlcOK9JPim 7Oz07S/DQ5odbswuNWzU648ynsEGO4zC42+ID05dTDS6KnYW8kL5AhWc+f79ZQhL1FS5 nrrazZUT+2KqjsgUp4EMZodxd1iwKEg1wPpfyDuzb1nhRvjVmHUTUIgDuta+P3cTkX5B fX3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=iYh14z8X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16-v6si968235plp.358.2018.03.09.07.05.21; Fri, 09 Mar 2018 07:05:58 -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=@samsung.com header.s=mail20170921 header.b=iYh14z8X; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932177AbeCIPEU (ORCPT + 99 others); Fri, 9 Mar 2018 10:04:20 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:36465 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbeCIPER (ORCPT ); Fri, 9 Mar 2018 10:04:17 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180309150414euoutp0217e6519c60c39e68acf2e93c67ae1b1f~aSMmFDeQC0673606736euoutp02i; Fri, 9 Mar 2018 15:04:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180309150414euoutp0217e6519c60c39e68acf2e93c67ae1b1f~aSMmFDeQC0673606736euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520607854; bh=1UP93IZHYhRBfzF8/nhVI9uxE7tqQuymNSoGHzguhIk=; h=Subject:To:From:Date:In-reply-to:References:From; b=iYh14z8X4+AANtp2OgBCdjqFjnxtkwsF/GdwL92WSJJ6K/+CJOOzbELzPb5AkOXkp ztMHmWq0t2yoda4XIN9t3k0JBfhL2yr4IVQ+psSrOgu4tzLnTmSvVYjPDhCNfTIiz1 qzcFLOQHSf8etG3mZYzQH85R3m0C0WdTsfUIf4SE= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180309150413eucas1p11fbc700a629ceb80ba1c1460d81e237f~aSMlXE-vS0938709387eucas1p1j; Fri, 9 Mar 2018 15:04:13 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 5A.FA.17380.C62A2AA5; Fri, 9 Mar 2018 15:04:12 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180309150411eucas1p2d0b4f413b1a81eb6262c8821d213ede6~aSMjIQIA70076900769eucas1p2o; Fri, 9 Mar 2018 15:04:11 +0000 (GMT) X-AuditID: cbfec7f4-713ff700000043e4-af-5aa2a26cffbb Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D4.F8.04178.B62A2AA5; Fri, 9 Mar 2018 15:04:11 +0000 (GMT) MIME-version: 1.0 Content-type: text/plain; charset="utf-8" Received: from [106.120.51.18] by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P5B004FLWIY0410@eusync3.samsung.com>; Fri, 09 Mar 2018 15:04:11 +0000 (GMT) Subject: Re: [PATCH 3/4] crypto: bcm: Constify *hash_alg_name[] To: =?UTF-8?Q?Hern=c3=a1n_Gonzalez?= , herbert@gondor.apana.org.au, davem@davemloft.net, 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 From: Kamil Konieczny Message-id: <0949d6d0-d62b-d724-f3ea-e7e86900fe3e@partner.samsung.com> Date: Fri, 09 Mar 2018 16:04:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: <1519768888-19866-3-git-send-email-hernan@vanguardiasur.com.ar> Content-language: en-US Content-transfer-encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGKsWRmVeSWpSXmKPExsWy7djP87o5ixZFGbQe1bS41ruQ2eL36l42 iznnW1gsul/JWDw4d5DZ4v69n0wWl3fNYbP41v6I1eLujxfsFjM39bFafH71jNWB22PW/bNs HrMaetk8tqy8yeSxc9Zddo9tB1Q9uo5cZ/P4vEkugD2KyyYlNSezLLVI3y6BK2PfyTVsBf94 K/ov3WBpYNzH3cXIySEhYCIxffVati5GLg4hgRWMEnuO3oJyPjNKfNj0ig2mquXkNqjEMkaJ y3MmgiV4BQQlfky+xwJiMwtoSrz4MokFougZo8SKm7uYQRLCAvYS94/OYwdJiAjcY5I4tfUq O0iCTcBc4tH2M0wQk9wk5nXOALNZBFQlGi7uYgWxRQUiJBZOfcoIYnMK+Eg0nH0BtU1corn1 JpQtL3HwynOwzRICz9kkXi7uhbrbReLQwVnMELawxKvjW9ghbBmJzo6DTBB2ucSmLWvZIZob GCXWvG9ihEhYSxw+fpEVYgOfxKRt04EGcQDFeSU62oQgSjwknhz7wAphO0rcfvEN7CAhgYeM Etdb+Scwys5CCqVZSKE0C8kPs5D8sICRZRWjeGppcW56arFRXmq5XnFibnFpXrpecn7uJkZg 6jn97/i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675OUeQPVSprvhKzMNUF++y/7pH9HMtxfh4piixFGck GmoxFxUnAgBGI85nigIAAA== X-CMS-MailID: 20180309150411eucas1p2d0b4f413b1a81eb6262c8821d213ede6 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180227220307epcas3p1ca4f0f8e178b7560f2105ca8b1bcef25 X-RootMTR: 20180227220307epcas3p1ca4f0f8e178b7560f2105ca8b1bcef25 References: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar> <1519768888-19866-3-git-send-email-hernan@vanguardiasur.com.ar> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.02.2018 23:01, Hernán Gonzalez wrote: > Note: This is compile only tested. > No gain from this except some self-documenting. > > Signed-off-by: Hernán Gonzalez > --- > drivers/crypto/bcm/spu.c | 5 +++-- > drivers/crypto/bcm/spu.h | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/crypto/bcm/spu.c b/drivers/crypto/bcm/spu.c > index efaf3cf..c7bb79e 100644 > --- a/drivers/crypto/bcm/spu.c > +++ b/drivers/crypto/bcm/spu.c > @@ -23,8 +23,9 @@ > #include "cipher.h" > > /* This array is based on the hash algo type supported in spu.h */ > -char *hash_alg_name[] = { "None", "md5", "sha1", "sha224", "sha256", "aes", ------------------------------------------------------------------------ ^^^ 'aes' is not hash, so either remove 'aes' or change array name to crypto_alg_name Or maybe I am missing something, or is it hardcoded in silicon ? > - "sha384", "sha512", "sha3_224", "sha3_256", "sha3_384", "sha3_512" }; > +char const * const hash_alg_name[] = { "None", "md5", "sha1", "sha224", > + "sha256", "aes", "sha384", "sha512", "sha3_224", "sha3_256", "sha3_384", > + "sha3_512" }; > > /* 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 f252367..71cf6b5 100644 > --- a/drivers/crypto/bcm/spu.h > +++ b/drivers/crypto/bcm/spu.h > @@ -111,7 +111,7 @@ enum aead_type { > AEAD_TYPE_LAST > }; > > -extern char *hash_alg_name[HASH_ALG_LAST]; > +extern const char * const hash_alg_name[HASH_ALG_LAST]; > > struct spu_request_opts { > bool is_inbound; > -- Best regards, Kamil Konieczny Samsung R&D Institute Poland