Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos
From: Kamil Konieczny
Date: Mon Sep 25 2017 - 08:08:46 EST
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