All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: <gregkh@linuxfoundation.org>, <devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] staging: spmi: hisi-spmi-controller: Use proper format in call to dev_err()
Date: Tue, 1 Sep 2020 08:27:28 +0200	[thread overview]
Message-ID: <20200901082728.5ce6eda1@coco.lan> (raw)
In-Reply-To: <20200901035722.9324-1-yuehaibing@huawei.com>

Em Tue, 1 Sep 2020 11:57:22 +0800
YueHaibing <yuehaibing@huawei.com> escreveu:

> The correct format string for a size_t argument should be %zu.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

> ---
>  drivers/staging/hikey9xx/hisi-spmi-controller.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c b/drivers/staging/hikey9xx/hisi-spmi-controller.c
> index 66a0b296e06f..34c690da09e3 100644
> --- a/drivers/staging/hikey9xx/hisi-spmi-controller.c
> +++ b/drivers/staging/hikey9xx/hisi-spmi-controller.c
> @@ -121,7 +121,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl,
>  
>  	if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
>  		dev_err(&ctrl->dev,
> -			"spmi_controller supports 1..%d bytes per trans, but:%ld requested\n",
> +			"spmi_controller supports 1..%d bytes per trans, but:%zu requested\n",
>  			SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
>  		return  -EINVAL;
>  	}
> @@ -175,7 +175,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl,
>  	spin_unlock_irqrestore(&spmi_controller->lock, flags);
>  	if (rc)
>  		dev_err(&ctrl->dev,
> -			"spmi read wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%ld\n",
> +			"spmi read wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%zu\n",
>  			opc, slave_id, slave_addr, bc + 1);
>  	else
>  		dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, read value: %*ph\n",
> @@ -197,7 +197,7 @@ static int spmi_write_cmd(struct spmi_controller *ctrl,
>  
>  	if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
>  		dev_err(&ctrl->dev,
> -			"spmi_controller supports 1..%d bytes per trans, but:%ld requested\n",
> +			"spmi_controller supports 1..%d bytes per trans, but:%zu requested\n",
>  			SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
>  		return  -EINVAL;
>  	}
> @@ -251,7 +251,7 @@ static int spmi_write_cmd(struct spmi_controller *ctrl,
>  	spin_unlock_irqrestore(&spmi_controller->lock, flags);
>  
>  	if (rc)
> -		dev_err(&ctrl->dev, "spmi write wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%ld\n",
> +		dev_err(&ctrl->dev, "spmi write wait timeout op:0x%x slave_id:%d slave_addr:0x%x bc:%zu\n",
>  			opc, slave_id, slave_addr, bc);
>  	else
>  		dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, wrote value: %*ph\n",



Thanks,
Mauro

      reply	other threads:[~2020-09-01  6:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  3:57 [PATCH -next] staging: spmi: hisi-spmi-controller: Use proper format in call to dev_err() YueHaibing
2020-09-01  6:27 ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200901082728.5ce6eda1@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.