[PATCH 1/5] fsi-occ: Fix size_t printf

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Jun 18 14:30:31 AEST 2018


On Mon, 2018-06-18 at 13:13 +0930, Joel Stanley wrote:
>    drivers/fsi/fsi-occ.c:414:16: warning: format '%d' expects argument
>    of type 'int', but argument 4 has type 'size_t {aka long unsigned
>    int}' [-Wformat=]
>       dev_dbg(dev, "Bad resplen %d\n", *resp_len);
>                    ^                   ~~

Thanks, I've already pushed an equivalent fix in my branch, I'll let
Eddie pick it up for the next upstream submission.

> Signed-off-by: Joel Stanley <joel at jms.id.au>
> ---
>  drivers/fsi/fsi-occ.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c
> index e4ebda646453..f02f72d379d0 100644
> --- a/drivers/fsi/fsi-occ.c
> +++ b/drivers/fsi/fsi-occ.c
> @@ -411,7 +411,7 @@ int fsi_occ_submit(struct device *dev, const void *request, size_t req_len,
>  	if (!occ)
>  		return -ENODEV;
>  	if (*resp_len < 7) {
> -		dev_dbg(dev, "Bad resplen %d\n", *resp_len);
> +		dev_dbg(dev, "Bad resplen %zd\n", *resp_len);
>  		return -EINVAL;
>  	}
>  


More information about the openbmc mailing list