From: Frank Li <Frank.li@nxp.com>
To: zhangjiao2 <zhangjiao2@cmss.chinamobile.com>
Cc: jassisinghbrar@gmail.com, shawnguo@kernel.org,
s.hauer@pengutronix.de, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mailbox: imx: Modify the incorrect format specifier
Date: Thu, 14 Nov 2024 11:42:00 -0500 [thread overview]
Message-ID: <ZzYoWFVhfNnAcAmy@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20241114055926.38502-1-zhangjiao2@cmss.chinamobile.com>
On Thu, Nov 14, 2024 at 01:59:26PM +0800, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
>
> The format specifier of "unsigned int" in snprintf()
> should be "%u", not "%i".
Replace %i with %u in snprintf() because it is "unsigned int".
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> ---
> drivers/mailbox/imx-mailbox.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> index f815dab3be50..3fe51b2de89e 100644
> --- a/drivers/mailbox/imx-mailbox.c
> +++ b/drivers/mailbox/imx-mailbox.c
> @@ -782,7 +782,7 @@ static int imx_mu_init_generic(struct imx_mu_priv *priv)
> cp->chan = &priv->mbox_chans[i];
> priv->mbox_chans[i].con_priv = cp;
> snprintf(cp->irq_desc, sizeof(cp->irq_desc),
> - "%s[%i-%i]", dev_name(priv->dev), cp->type, cp->idx);
> + "%s[%i-%u]", dev_name(priv->dev), cp->type, cp->idx);
> }
>
> priv->mbox.num_chans = IMX_MU_CHANS;
> @@ -819,7 +819,7 @@ static int imx_mu_init_specific(struct imx_mu_priv *priv)
> cp->chan = &priv->mbox_chans[i];
> priv->mbox_chans[i].con_priv = cp;
> snprintf(cp->irq_desc, sizeof(cp->irq_desc),
> - "%s[%i-%i]", dev_name(priv->dev), cp->type, cp->idx);
> + "%s[%i-%u]", dev_name(priv->dev), cp->type, cp->idx);
> }
>
> priv->mbox.num_chans = num_chans;
> --
> 2.33.0
>
>
>
next prev parent reply other threads:[~2024-11-14 16:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 5:59 [PATCH] mailbox: imx: Modify the incorrect format specifier zhangjiao2
2024-11-14 16:42 ` Frank Li [this message]
2024-11-15 1:18 ` [PATCH v2] " zhangjiao2
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=ZzYoWFVhfNnAcAmy@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=zhangjiao2@cmss.chinamobile.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox