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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux