* [PATCH] sh: pci: Fix the wrong format specifier
@ 2024-12-04 11:07 liujing
2024-12-04 12:35 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: liujing @ 2024-12-04 11:07 UTC (permalink / raw)
To: ysato, dalias, glaubitz; +Cc: linux-sh, linux-kernel, liujing
Make a minor change to eliminate a static checker warning. The type
of port->index is unsigned int, so the correct format specifier should be
%u instead of %d.
Signed-off-by: liujing <liujing@cmss.chinamobile.com>
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c
index a78b9a935585..9ccc602d7f86 100644
--- a/arch/sh/drivers/pci/pcie-sh7786.c
+++ b/arch/sh/drivers/pci/pcie-sh7786.c
@@ -219,7 +219,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port)
* on. clock lookups don't help us much at this point, since no
* dev_id is available this early. Lame.
*/
- snprintf(fclk_name, sizeof(fclk_name), "pcie%d_fck", port->index);
+ snprintf(fclk_name, sizeof(fclk_name), "pcie%u_fck", port->index);
port->fclk = clk_get(NULL, fclk_name);
if (IS_ERR(port->fclk)) {
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] sh: pci: Fix the wrong format specifier
2024-12-04 11:07 [PATCH] sh: pci: Fix the wrong format specifier liujing
@ 2024-12-04 12:35 ` Geert Uytterhoeven
2025-01-30 8:24 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-12-04 12:35 UTC (permalink / raw)
To: liujing; +Cc: ysato, dalias, glaubitz, linux-sh, linux-kernel
Hi Liujing,
On Wed, Dec 4, 2024 at 12:10 PM liujing <liujing@cmss.chinamobile.com> wrote:
> Make a minor change to eliminate a static checker warning. The type
> of port->index is unsigned int, so the correct format specifier should be
> %u instead of %d.
>
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>
Thanks for your patch!
> --- a/arch/sh/drivers/pci/pcie-sh7786.c
> +++ b/arch/sh/drivers/pci/pcie-sh7786.c
> @@ -219,7 +219,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port)
> * on. clock lookups don't help us much at this point, since no
> * dev_id is available this early. Lame.
> */
> - snprintf(fclk_name, sizeof(fclk_name), "pcie%d_fck", port->index);
> + snprintf(fclk_name, sizeof(fclk_name), "pcie%u_fck", port->index);
>
> port->fclk = clk_get(NULL, fclk_name);
> if (IS_ERR(port->fclk)) {
LGTM, but there are several more cases to fix in this file.
Please fix all of them in a single patch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] sh: pci: Fix the wrong format specifier
2024-12-04 12:35 ` Geert Uytterhoeven
@ 2025-01-30 8:24 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2025-01-30 8:24 UTC (permalink / raw)
To: Geert Uytterhoeven, liujing; +Cc: ysato, dalias, linux-sh, linux-kernel
Hi Liujing,
On Wed, 2024-12-04 at 13:35 +0100, Geert Uytterhoeven wrote:
> Hi Liujing,
>
> On Wed, Dec 4, 2024 at 12:10 PM liujing <liujing@cmss.chinamobile.com> wrote:
> > Make a minor change to eliminate a static checker warning. The type
> > of port->index is unsigned int, so the correct format specifier should be
> > %u instead of %d.
> >
> > Signed-off-by: liujing <liujing@cmss.chinamobile.com>
>
> Thanks for your patch!
>
> > --- a/arch/sh/drivers/pci/pcie-sh7786.c
> > +++ b/arch/sh/drivers/pci/pcie-sh7786.c
> > @@ -219,7 +219,7 @@ static int __init pcie_clk_init(struct sh7786_pcie_port *port)
> > * on. clock lookups don't help us much at this point, since no
> > * dev_id is available this early. Lame.
> > */
> > - snprintf(fclk_name, sizeof(fclk_name), "pcie%d_fck", port->index);
> > + snprintf(fclk_name, sizeof(fclk_name), "pcie%u_fck", port->index);
> >
> > port->fclk = clk_get(NULL, fclk_name);
> > if (IS_ERR(port->fclk)) {
>
> LGTM, but there are several more cases to fix in this file.
> Please fix all of them in a single patch.
Could you send a V2 of your patch and make the changes recommended by Geert?
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-30 8:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 11:07 [PATCH] sh: pci: Fix the wrong format specifier liujing
2024-12-04 12:35 ` Geert Uytterhoeven
2025-01-30 8:24 ` John Paul Adrian Glaubitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).