On 7/22/2019 5:29 PM, Vakul Garg wrote:
>> -----Original Message-----
>> From: Horia Geanta
>> Sent: Monday, July 22, 2019 7:55 PM
>> To: Vakul Garg <[email protected]>; [email protected]
>> Cc: Aymen Sghaier <[email protected]>;
>> [email protected]
>> Subject: Re: [PATCH v2] crypto: caam/qi2 - Add printing dpseci fq stats using
>> debugfs
>>
>> On 7/19/2019 2:23 PM, Vakul Garg wrote:
>> [...]
>>> +if CRYPTO_DEV_FSL_DPAA2_CAAM
>>> +
>>> +config CRYPTO_DEV_FSL_DPAA2_CAAM_DEBUGFS
>>> + depends on DEBUG_FS
>>> + bool "Enable debugfs support"
>>> + help
>>> + Selecting this will enable printing of various debug information
>>> + in the DPAA2 CAAM driver.
>>> +
>>> +endif
>> Let's enable this based on CONFIG_DEBUG_FS.
>
> It is not clear to me.
> Do you mean not have additional CRYPTO_DEV_FSL_DPAA2_CAAM_DEBUGFS?
>
Yes.
>>
>>> diff --git a/drivers/crypto/caam/Makefile
>>> b/drivers/crypto/caam/Makefile index 9ab4e81ea21e..e4e9fa481a44
>> 100644
>>> --- a/drivers/crypto/caam/Makefile
>>> +++ b/drivers/crypto/caam/Makefile
>>> @@ -30,3 +30,4 @@ endif
>>> obj-$(CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM) += dpaa2_caam.o
>>>
>>> dpaa2_caam-y := caamalg_qi2.o dpseci.o
>>> +dpaa2_caam-$(CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM_DEBUGFS) +=
>>> +dpseci-debugfs.o
>> dpaa2_caam-$(CONFIG_DEBUG_FS)
>>
>> [...]
>>> diff --git a/drivers/crypto/caam/caamalg_qi2.h
>>> b/drivers/crypto/caam/caamalg_qi2.h
>>> index 973f6296bc6f..b450e2a25c1f 100644
>>> --- a/drivers/crypto/caam/caamalg_qi2.h
>>> +++ b/drivers/crypto/caam/caamalg_qi2.h
>>> @@ -10,6 +10,7 @@
>>> #include <soc/fsl/dpaa2-io.h>
>>> #include <soc/fsl/dpaa2-fd.h>
>>> #include <linux/threads.h>
>>> +#include <linux/netdevice.h>
>> How is this change related to current patch?
>>
>
> It should have been here in first place because we have some napi related
> things in this file.
> It is required as I got compilation errors now.
>
Indeed, this is caused by including caamalg_qi2.h -> dpseci-debugfs.h ->
dpseci-debugfs.c.
Compiling this patch without the inclusion:
CC drivers/crypto/caam/dpseci-debugfs.o
In file included from drivers/crypto/caam/dpseci-debugfs.h:9:0,
from drivers/crypto/caam/dpseci-debugfs.c:8:
drivers/crypto/caam/caamalg_qi2.h:84:21: error: field 'napi' has incomplete type
struct napi_struct napi;
^
drivers/crypto/caam/caamalg_qi2.h:85:20: error: field 'net_dev' has incomplete
type
struct net_device net_dev;
^
scripts/Makefile.build:278: recipe for target
'drivers/crypto/caam/dpseci-debugfs.o' failed
Other driver files include linux/netdevice.h indirectly, via compat.h ->
linux/rtnetlink.h.
Most *.c files in drivers/crypto/caam solve dependencies by including
compat.h, but this approach is messy.
Let's keep the explicit inclusion then.
Horia