Commit 4c6491a3 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

staging: spmi: hisi-spmi-controller: Use proper format in call to dev_err()

The correct format string for a size_t argument should be %zu.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20200901035722.9324-1-yuehaibing@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62d2e63c
...@@ -121,7 +121,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl, ...@@ -121,7 +121,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl,
if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) { if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
dev_err(&ctrl->dev, 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); SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
return -EINVAL; return -EINVAL;
} }
...@@ -175,7 +175,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl, ...@@ -175,7 +175,7 @@ static int spmi_read_cmd(struct spmi_controller *ctrl,
spin_unlock_irqrestore(&spmi_controller->lock, flags); spin_unlock_irqrestore(&spmi_controller->lock, flags);
if (rc) if (rc)
dev_err(&ctrl->dev, 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); opc, slave_id, slave_addr, bc + 1);
else else
dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, read value: %*ph\n", 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, ...@@ -197,7 +197,7 @@ static int spmi_write_cmd(struct spmi_controller *ctrl,
if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) { if (bc > SPMI_CONTROLLER_MAX_TRANS_BYTES) {
dev_err(&ctrl->dev, 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); SPMI_CONTROLLER_MAX_TRANS_BYTES, bc);
return -EINVAL; return -EINVAL;
} }
...@@ -251,7 +251,7 @@ static int spmi_write_cmd(struct spmi_controller *ctrl, ...@@ -251,7 +251,7 @@ static int spmi_write_cmd(struct spmi_controller *ctrl,
spin_unlock_irqrestore(&spmi_controller->lock, flags); spin_unlock_irqrestore(&spmi_controller->lock, flags);
if (rc) 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); opc, slave_id, slave_addr, bc);
else else
dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, wrote value: %*ph\n", dev_dbg(&ctrl->dev, "%s: id:%d slave_addr:0x%x, wrote value: %*ph\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment