[PATCH v2] staging: ccree: fixed pointer signedness warnings.

Greg KH gregkh at linuxfoundation.org
Thu Dec 21 17:51:09 UTC 2017


On Thu, Dec 21, 2017 at 05:28:00PM +0000, Jeremy Sowden wrote:
> Changed the types of a number of index and length variables and the
> return-types of a couple of functions that return values which are
> assigned to a couple of these variables from signed to unsigned integer
> types.
> 
> Fixes a number of warnings arising from the variables' addresses being
> passed to functions expecting pointers to unsigned integers.
> 
> Signed-off-by: Jeremy Sowden <jeremy at azazel.net>
> ---
>  drivers/staging/ccree/ssi_aead.c       | 13 ++++++++-----
>  drivers/staging/ccree/ssi_buffer_mgr.c |  2 +-
>  drivers/staging/ccree/ssi_cipher.c     |  3 ++-
>  drivers/staging/ccree/ssi_hash.c       | 15 ++++++++-------
>  4 files changed, 19 insertions(+), 14 deletions(-)

What changed from v1?

Always put that below the --- line, like the documentation says to do.

Also, why are you not cc:ing the maintainer of this driver?

> 
> diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c
> index 1522b00e08cf..638e3b515a1f 100644
> --- a/drivers/staging/ccree/ssi_aead.c
> +++ b/drivers/staging/ccree/ssi_aead.c
> @@ -275,7 +275,8 @@ static void cc_aead_complete(struct device *dev, void *cc_req)
>  	aead_request_complete(areq, err);
>  }
>  
> -static int xcbc_setkey(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx)
> +static unsigned int xcbc_setkey
> +	(struct cc_hw_desc *desc, struct cc_aead_ctx *ctx)

Why reformat so horridly?

And why change this function at all?  It can only return '4' (which is
crazy for other reasons...)  changeing the return value type makes no
sense to me, why did you make it?

thanks,

greg k-h


More information about the devel mailing list