Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935218AbdIYMIo (ORCPT ); Mon, 25 Sep 2017 08:08:44 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:37991 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbdIYMIk (ORCPT ); Mon, 25 Sep 2017 08:08:40 -0400 X-AuditID: cbfec7f1-f793a6d00000326b-53-59c8f1c4cc48 Subject: Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos To: Krzysztof Kozlowski Cc: linux-crypto@vger.kernel.org, Herbert Xu , Vladimir Zapolskiy , "David S. Miller" , Bartlomiej Zolnierkiewicz , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org From: Kamil Konieczny Message-id: <0d5028d7-6559-abe5-0825-01da230ce01c@partner.samsung.com> Date: Mon, 25 Sep 2017 14:08:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-version: 1.0 In-reply-to: <20170919190341.5vi5icaxnmynywre@kozik-lap> Content-type: text/plain; charset="utf-8" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGKsWRmVeSWpSXmKPExsWy7djPc7pHPp6INPh+Tdli44z1rBZzzrew WHS/krE4f34Du8X9ez+ZLC7vmsNmMeP8PiaL/7+amR04PLasvMnkse2AqsemVZ1sHv8WTmHx 6NuyitHj8ya5ALYoLpuU1JzMstQifbsErozLV2cxFhzmrFh4ahlbA+Mh9i5GTg4JAROJ7vlb WSBsMYkL99azdTFycQgJLGWUWLp/HiOE85lRYknTA2aYjrZFrWC2kMAyRomDzUoQRc8YJa5O b2YDSQgLuEjsPtoDZosIaEpc//udFaSIWWAyk8S24+fAutkEzCUebT/DBGLzCrhJrLp4kBXE ZhFQldj0czFYs6hAhMSFTT+hagQlfky+B3QrBwengIXExxnFIGFmoPkvvkx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Eg9vxL/jkUKsiWXFlbmHGCU4mJVEeHPfn4gU4k1JrKxKLcqPLyrNSS0+xCjNwaIkztu7Z3Wk kEB6YklqdmpqQWoRTJaJg1OqgXHiwVPfhY9NSrR7pJW2i7/r2s8HJdfzp+dHyc74n6h4pzQo jd3I1Pfz5SVVb4/PLn9bl5C25MasRT6Bf7Ya89capv099S/m/eOg+IwVFxc86+wOlvu0U2DP r0wjmUkuxQzftKXmur18usT1lsevtzMZbiloOEs3ME87ylwmPS8qSmDf0mjvzx1KLMUZiYZa zEXFiQCwlXP1iwIAAA== X-CMS-MailID: 20170925120836eucas1p1fc1ca2a72ce0e9766f29f68dcd7ebe87 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?S2FtaWwgS29uaWVjem55G1NSUE9MLUtlcm5lbCAoVFApGw==?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?S2FtaWwgS29uaWVjem55G1NSUE9MLUtlcm5lbCAoVFApG1Nh?= =?UTF-8?B?bXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-CMS-RootMailID: 20170915175007eucas1p2912e7a9e1b44e976f96a53d8c8e442ec X-RootMTR: 20170915175007eucas1p2912e7a9e1b44e976f96a53d8c8e442ec References: <20170919190341.5vi5icaxnmynywre@kozik-lap> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1172 Lines: 47 On 19.09.2017 21:03, Krzysztof Kozlowski wrote: > On Fri, Sep 15, 2017 at 07:50:06PM +0200, Kamil Konieczny wrote: >> Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. >> It uses the crypto framework asynchronous hash api. >> It is based on omap-sham.c driver. >> S5P has some HW differencies and is not implemented. >> >> Modifications in s5p-sss: [...] Below I will address only 'const' questions. >>[...] >> + struct crypto_queue hash_queue; >> + struct ahash_request *hash_req; >> + struct scatterlist *hash_sg_iter; >> + int hash_sg_cnt; >> + >> + struct samsung_aes_variant *pdata; > > This should be const as pdata should not be modified. I will remove this. >> [...] >> -static const struct samsung_aes_variant s5p_aes_data = { >> +static struct samsung_aes_variant s5p_aes_data = { > > Why do you need to drop the const? This should not be modified. OK, I will not modify this. > [...] >> [...] >> + */ >> +static struct sss_hash_algs_info exynos_hash_algs_info[] = { > > Can it be const? No, it contains '.registered' var, used at probe/error path/remove. >>[...] -- Best regards, Kamil Konieczny Samsung R&D Institute Poland