Re: [PATCH v1 3/3] crypto: s5p: add AES support for Exynos5433

From: Kamil Konieczny
Date: Wed Jan 23 2019 - 09:27:21 EST


Hi Krzysztof,

On 23.01.2019 09:13, Krzysztof Kozlowski wrote:
> On Tue, 22 Jan 2019 at 16:26, Kamil Konieczny
> <k.konieczny@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>> Add AES crypto HW acceleration for Exynos5433, with the help of SlimSSS IP.
>>
>> Signed-off-by: Kamil Konieczny <k.konieczny@xxxxxxxxxxxxxxxxxxx>
>> [...]
>> @@ -384,11 +387,19 @@ struct s5p_hash_ctx {
>> static const struct samsung_aes_variant s5p_aes_data = {
>> .aes_offset = 0x4000,
>> .hash_offset = 0x6000,
>> + .clk_names = { "secss", }
>
> Put trailing comma so it can be extended without touching previous
> line (just like old code).
>

ok, I will do this and two following commas.

>> [...]
>> + if (variant->clk_names[1]) {
>> + pdata->pclk = devm_clk_get(dev, variant->clk_names[1]);
>> + if (IS_ERR(pdata->pclk)) {
>> + dev_err(dev, "failed to find clock %s\n",
>> + variant->clk_names[1]);
>> + clk_disable_unprepare(pdata->clk);
>> + return -ENOENT;
>
> goto err_irq (eventually rename the label)?

I will add 'goto err_clk' with proper cleanup.

>> + }
>
> Indentation looks wrong here.

ok

>> +
>> + err = clk_prepare_enable(pdata->pclk);
>> + if (err < 0) {
>> + dev_err(dev, "Enabling clock %s failed, err %d\n",
>> + variant->clk_names[0], err);
>> + clk_disable_unprepare(pdata->clk);
>> + return err;
>
> goto...

Yes, I will put the same goto here.

--
Best regards,
Kamil Konieczny
Samsung R&D Institute Poland