[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-crypto-vger
Subject:    Re: [PATCH] crypto: caam/qi - Remove unused 'qi_congested' entry
From:       Fabio Estevam <festevam () gmail ! com>
Date:       2017-07-31 12:14:26
Message-ID: CAOMZO5DYTRRShoJO0uTz9Y_j3Ojo-aErg-=92RSazW7s1a==+w () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jul 31, 2017 at 4:22 AM, Horia Geantă <horia.geanta@nxp.com> wrote:
> On 7/30/2017 1:55 AM, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> 'qi_congested' member from structure caam_drv_private
>> is never used at all, so it is safe to remove it.
>
> Agree, though I would remove all the other dentry members not currently
> used - since debugfs_remove_recursive() is called, we don't need the
> file entries.

Ok, it makes sense. Wil do it in v2.

>> diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c
>> index 6d5a010..b2f7a42 100644
>> --- a/drivers/crypto/caam/qi.c
>> +++ b/drivers/crypto/caam/qi.c
>> @@ -793,10 +793,8 @@ int caam_qi_init(struct platform_device *caam_pdev)
>>       /* Done with the CGRs; restore the cpus allowed mask */
>>       set_cpus_allowed_ptr(current, &old_cpumask);
>>  #ifdef CONFIG_DEBUG_FS
>> -     ctrlpriv->qi_congested = debugfs_create_file("qi_congested", 0444,
>> -                                                  ctrlpriv->ctl,
>> -                                                  &times_congested,
>> -                                                  &caam_fops_u64_ro);
>> +     debugfs_create_file("qi_congested", 0444, ctrlpriv->ctl,
>> +                         &times_congested, &caam_fops_u64_ro);
>
> Either here or in a different patch the return value of debugfs_create_*
> functions should be checked, such that if IS_ERR_OR_NULL(ret) we could
> print a warning.

I will leave the error checking for a separate patch then.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic