* [PATCH] net/ethernet/freescale: fix warning for ucc_geth
@ 2017-09-14 12:05 Valentin Longchamp
2017-09-14 13:24 ` Christophe LEROY
0 siblings, 1 reply; 3+ messages in thread
From: Valentin Longchamp @ 2017-09-14 12:05 UTC (permalink / raw)
To: leoli, netdev; +Cc: linuxppc-dev, Valentin Longchamp
Simple printk format warning for the the ucc registers address.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index f77ba9fa257b..56b8fdb35c3b 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -3857,7 +3857,7 @@ static int ucc_geth_probe(struct platform_device* ofdev)
}
if (netif_msg_probe(&debug))
- pr_info("UCC%1d at 0x%8x (irq = %d)\n",
+ pr_info("UCC%1d at 0x%8llx (irq = %d)\n",
ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs,
ug_info->uf_info.irq);
--
2.13.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] net/ethernet/freescale: fix warning for ucc_geth
2017-09-14 12:05 [PATCH] net/ethernet/freescale: fix warning for ucc_geth Valentin Longchamp
@ 2017-09-14 13:24 ` Christophe LEROY
2017-09-14 14:17 ` Longchamp, Valentin
0 siblings, 1 reply; 3+ messages in thread
From: Christophe LEROY @ 2017-09-14 13:24 UTC (permalink / raw)
To: Valentin Longchamp, leoli, netdev; +Cc: linuxppc-dev
Hi,
Le 14/09/2017 à 14:05, Valentin Longchamp a écrit :
> Simple printk format warning for the the ucc registers address.
Did you test your patch with mpc83xx_defconfig ?
I get a new warning with your patch:
CC drivers/net/ethernet/freescale/ucc_geth.o
In file included from ./include/linux/printk.h:6:0,
from ./include/linux/kernel.h:13,
from drivers/net/ethernet/freescale/ucc_geth.c:18:
drivers/net/ethernet/freescale/ucc_geth.c: In function ‘ucc_geth_probe’:
./include/linux/kern_levels.h:4:18: warning: format ‘%llx’ expects
argument of type ‘long long unsigned int’, but argument 3 has type
‘resource_size_t {aka unsigned int}’ [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
./include/linux/kern_levels.h:13:19: note: in expansion of macro ‘KERN_SOH’
#define KERN_INFO KERN_SOH "6" /* informational */
^
./include/linux/printk.h:308:9: note: in expansion of macro ‘KERN_INFO’
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^
drivers/net/ethernet/freescale/ucc_geth.c:3860:3: note: in expansion of
macro ‘pr_info’
pr_info("UCC%1d at 0x%8llx (irq = %d)\n",
^
Christophe
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
> drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
> index f77ba9fa257b..56b8fdb35c3b 100644
> --- a/drivers/net/ethernet/freescale/ucc_geth.c
> +++ b/drivers/net/ethernet/freescale/ucc_geth.c
> @@ -3857,7 +3857,7 @@ static int ucc_geth_probe(struct platform_device* ofdev)
> }
>
> if (netif_msg_probe(&debug))
> - pr_info("UCC%1d at 0x%8x (irq = %d)\n",
> + pr_info("UCC%1d at 0x%8llx (irq = %d)\n",
> ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs,
> ug_info->uf_info.irq);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] net/ethernet/freescale: fix warning for ucc_geth
2017-09-14 13:24 ` Christophe LEROY
@ 2017-09-14 14:17 ` Longchamp, Valentin
0 siblings, 0 replies; 3+ messages in thread
From: Longchamp, Valentin @ 2017-09-14 14:17 UTC (permalink / raw)
To: christophe.leroy@c-s.fr, netdev@vger.kernel.org,
leoli@freescale.com
Cc: linuxppc-dev@lists.ozlabs.org
Hi Christophe,
On Thu, 2017-09-14 at 15:24 +0200, Christophe LEROY wrote:
> Hi,
>
> Le 14/09/2017 à 14:05, Valentin Longchamp a écrit :
> > Simple printk format warning for the the ucc registers address.
>
> Did you test your patch with mpc83xx_defconfig ?
No I only tested on a 85xx where I had another (similar, because the
physical addresses are u64 and not u32) warning.
My quick fix indeed did not take the different typedefs for
phys_addr_t.
I try to come with a v2 that covers this.
Thanks for the feedback.
Valentin
>
> I get a new warning with your patch:
>
> CC drivers/net/ethernet/freescale/ucc_geth.o
> In file included from ./include/linux/printk.h:6:0,
> from ./include/linux/kernel.h:13,
> from drivers/net/ethernet/freescale/ucc_geth.c:18:
> drivers/net/ethernet/freescale/ucc_geth.c: In function
> ‘ucc_geth_probe’:
> ./include/linux/kern_levels.h:4:18: warning: format ‘%llx’ expects
> argument of type ‘long long unsigned int’, but argument 3 has type
> ‘resource_size_t {aka unsigned int}’ [-Wformat=]
> #define KERN_SOH "\001" /* ASCII Start Of Header */
> ^
> ./include/linux/kern_levels.h:13:19: note: in expansion of macro
> ‘KERN_SOH’
> #define KERN_INFO KERN_SOH "6" /* informational */
> ^
> ./include/linux/printk.h:308:9: note: in expansion of macro
> ‘KERN_INFO’
> printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> ^
> drivers/net/ethernet/freescale/ucc_geth.c:3860:3: note: in expansion
> of
> macro ‘pr_info’
> pr_info("UCC%1d at 0x%8llx (irq = %d)\n",
> ^
>
> Christophe
>
> >
> > Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> > ---
> > drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
> > b/drivers/net/ethernet/freescale/ucc_geth.c
> > index f77ba9fa257b..56b8fdb35c3b 100644
> > --- a/drivers/net/ethernet/freescale/ucc_geth.c
> > +++ b/drivers/net/ethernet/freescale/ucc_geth.c
> > @@ -3857,7 +3857,7 @@ static int ucc_geth_probe(struct
> > platform_device* ofdev)
> > }
> >
> > if (netif_msg_probe(&debug))
> > - pr_info("UCC%1d at 0x%8x (irq = %d)\n",
> > + pr_info("UCC%1d at 0x%8llx (irq = %d)\n",
> > ug_info->uf_info.ucc_num + 1, ug_info-
> > >uf_info.regs,
> > ug_info->uf_info.irq);
> >
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-14 14:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14 12:05 [PATCH] net/ethernet/freescale: fix warning for ucc_geth Valentin Longchamp
2017-09-14 13:24 ` Christophe LEROY
2017-09-14 14:17 ` Longchamp, Valentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox