Re: [PATCH 07/10] crypto: caam: caampkc: Provide the name of the function and provide missing descriptions

2021-03-21 Thread Horia Geantă
On 3/18/2021 2:44 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a 
> given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead
>  drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
> 'xts_key_fallback' not described in 'caam_ctx'
>  drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
> 'fallback' not described in 'caam_ctx'
> 
> Cc: "Horia Geantă" 
> Cc: Aymen Sghaier 
> Cc: Herbert Xu 
> Cc: "David S. Miller" 
> Cc: linux-cry...@vger.kernel.org
> Signed-off-by: Lee Jones 
Reviewed-by: Horia Geantă 

Thanks,
Horia


[PATCH 07/10] crypto: caam: caampkc: Provide the name of the function and provide missing descriptions

2021-03-18 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a 
given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead
 drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
'xts_key_fallback' not described in 'caam_ctx'
 drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
'fallback' not described in 'caam_ctx'

Cc: "Horia Geantă" 
Cc: Aymen Sghaier 
Cc: Herbert Xu 
Cc: "David S. Miller" 
Cc: linux-cry...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/crypto/caam/caamalg_qi2.c | 3 +++
 drivers/crypto/caam/caampkc.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamalg_qi2.c 
b/drivers/crypto/caam/caamalg_qi2.c
index a780e627838ae..8b8ed77d8715d 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -71,6 +71,9 @@ struct caam_skcipher_alg {
  * @adata: authentication algorithm details
  * @cdata: encryption algorithm details
  * @authsize: authentication tag (a.k.a. ICV / MAC) size
+ * @xts_key_fallback: true if fallback tfm needs to be used due
+ *   to unsupported xts key lengths
+ * @fallback: xts fallback tfm
  */
 struct caam_ctx {
struct caam_flc flc[NUM_OP];
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index dd5f101e43f83..e313233ec6de7 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -187,7 +187,8 @@ static void rsa_priv_f_done(struct device *dev, u32 *desc, 
u32 err,
 }
 
 /**
- * Count leading zeros, need it to strip, from a given scatterlist
+ * caam_rsa_count_leading_zeros - Count leading zeros, need it to strip,
+ *from a given scatterlist
  *
  * @sgl   : scatterlist to count zeros from
  * @nbytes: number of zeros, in bytes, to strip
-- 
2.27.0



Re: [PATCH 07/10] crypto: caam: caampkc: Provide the name of the function and provide missing descriptions

2021-03-03 Thread Horia Geantă
On 3/3/2021 4:35 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a 
> given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead
>  drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
> 'xts_key_fallback' not described in 'caam_ctx'
>  drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
> 'fallback' not described in 'caam_ctx'
> 
> Cc: "Horia Geantă" 
> Cc: Aymen Sghaier 
> Cc: Herbert Xu 
> Cc: "David S. Miller" 
> Cc: linux-cry...@vger.kernel.org
> Signed-off-by: Lee Jones 
> ---
>  drivers/crypto/caam/caamalg_qi2.c | 2 ++
>  drivers/crypto/caam/caampkc.c | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/caam/caamalg_qi2.c 
> b/drivers/crypto/caam/caamalg_qi2.c
> index a780e627838ae..22e45c5bf2023 100644
> --- a/drivers/crypto/caam/caamalg_qi2.c
> +++ b/drivers/crypto/caam/caamalg_qi2.c
> @@ -71,6 +71,8 @@ struct caam_skcipher_alg {
>   * @adata: authentication algorithm details
>   * @cdata: encryption algorithm details
>   * @authsize: authentication tag (a.k.a. ICV / MAC) size
> + * @xts_key_fallback: whether to set the fallback key
> + * @fallback: the fallback key

I'd prefer having the doc updated as mentioned in v1:
https://lore.kernel.org/linux-crypto/963b9e57-8077-5392-1d91-a5971e8d8...@nxp.com

Thanks,
Horia


[PATCH 07/10] crypto: caam: caampkc: Provide the name of the function and provide missing descriptions

2021-03-03 Thread Lee Jones
Fixes the following W=1 kernel build warning(s):

 drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a 
given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead
 drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
'xts_key_fallback' not described in 'caam_ctx'
 drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 
'fallback' not described in 'caam_ctx'

Cc: "Horia Geantă" 
Cc: Aymen Sghaier 
Cc: Herbert Xu 
Cc: "David S. Miller" 
Cc: linux-cry...@vger.kernel.org
Signed-off-by: Lee Jones 
---
 drivers/crypto/caam/caamalg_qi2.c | 2 ++
 drivers/crypto/caam/caampkc.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamalg_qi2.c 
b/drivers/crypto/caam/caamalg_qi2.c
index a780e627838ae..22e45c5bf2023 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -71,6 +71,8 @@ struct caam_skcipher_alg {
  * @adata: authentication algorithm details
  * @cdata: encryption algorithm details
  * @authsize: authentication tag (a.k.a. ICV / MAC) size
+ * @xts_key_fallback: whether to set the fallback key
+ * @fallback: the fallback key
  */
 struct caam_ctx {
struct caam_flc flc[NUM_OP];
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index dd5f101e43f83..e313233ec6de7 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -187,7 +187,8 @@ static void rsa_priv_f_done(struct device *dev, u32 *desc, 
u32 err,
 }
 
 /**
- * Count leading zeros, need it to strip, from a given scatterlist
+ * caam_rsa_count_leading_zeros - Count leading zeros, need it to strip,
+ *from a given scatterlist
  *
  * @sgl   : scatterlist to count zeros from
  * @nbytes: number of zeros, in bytes, to strip
-- 
2.27.0