All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fsl: avoid 64-bit warning on pq_mdio
@ 2015-12-08 15:17 ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-12-08 15:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: Gerlando Falauto, netdev, Shaohui Xie, linux-kernel, linux-arm-kernel

The pq_mdio driver can now be built for ARM64, where we get a format
string warning:

drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
drivers/net/ethernet/freescale/fsl_pq_mdio.c:467:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=]

The argument is an implicit ptrdiff_t from the subtraction of two pointers,
so we should use the %z format string modifier to make this work on 64-bit
architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe761bcb9046 ("net: fsl: expands dependencies of NET_VENDOR_FREESCALE")
---
 drivers/net/ethernet/freescale/fsl_pq_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 55c36230e176..40071dad1c57 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -464,7 +464,7 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
 			 * address). Print error message but continue anyway.
 			 */
 			if ((void *)tbipa > priv->map + resource_size(&res) - 4)
-				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04x to contain TBI address)\n",
+				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04zx to contain TBI address)\n",
 					((void *)tbipa - priv->map) + 4);
 
 			iowrite32be(be32_to_cpup(prop), tbipa);
-- 
2.1.0.rc2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] net: fsl: avoid 64-bit warning on pq_mdio
@ 2015-12-08 15:17 ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-12-08 15:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: linux-arm-kernel, netdev, Gerlando Falauto, linux-kernel, Shaohui Xie

The pq_mdio driver can now be built for ARM64, where we get a format
string warning:

drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
drivers/net/ethernet/freescale/fsl_pq_mdio.c:467:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=]

The argument is an implicit ptrdiff_t from the subtraction of two pointers,
so we should use the %z format string modifier to make this work on 64-bit
architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe761bcb9046 ("net: fsl: expands dependencies of NET_VENDOR_FREESCALE")
---
 drivers/net/ethernet/freescale/fsl_pq_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 55c36230e176..40071dad1c57 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -464,7 +464,7 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
 			 * address). Print error message but continue anyway.
 			 */
 			if ((void *)tbipa > priv->map + resource_size(&res) - 4)
-				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04x to contain TBI address)\n",
+				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04zx to contain TBI address)\n",
 					((void *)tbipa - priv->map) + 4);
 
 			iowrite32be(be32_to_cpup(prop), tbipa);
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] net: fsl: avoid 64-bit warning on pq_mdio
@ 2015-12-08 15:17 ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-12-08 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

The pq_mdio driver can now be built for ARM64, where we get a format
string warning:

drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
drivers/net/ethernet/freescale/fsl_pq_mdio.c:467:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=]

The argument is an implicit ptrdiff_t from the subtraction of two pointers,
so we should use the %z format string modifier to make this work on 64-bit
architectures.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: fe761bcb9046 ("net: fsl: expands dependencies of NET_VENDOR_FREESCALE")
---
 drivers/net/ethernet/freescale/fsl_pq_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 55c36230e176..40071dad1c57 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -464,7 +464,7 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
 			 * address). Print error message but continue anyway.
 			 */
 			if ((void *)tbipa > priv->map + resource_size(&res) - 4)
-				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04x to contain TBI address)\n",
+				dev_err(&pdev->dev, "invalid register map (should be at least 0x%04zx to contain TBI address)\n",
 					((void *)tbipa - priv->map) + 4);
 
 			iowrite32be(be32_to_cpup(prop), tbipa);
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: fsl: avoid 64-bit warning on pq_mdio
  2015-12-08 15:17 ` Arnd Bergmann
@ 2015-12-09  3:52   ` David Miller
  -1 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-12-09  3:52 UTC (permalink / raw)
  To: arnd
  Cc: gerlando.falauto, netdev, Shaohui.Xie, linux-kernel, linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 08 Dec 2015 16:17:29 +0100

> The pq_mdio driver can now be built for ARM64, where we get a format
> string warning:
> 
> drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
> drivers/net/ethernet/freescale/fsl_pq_mdio.c:467:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=]
> 
> The argument is an implicit ptrdiff_t from the subtraction of two pointers,
> so we should use the %z format string modifier to make this work on 64-bit
> architectures.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: fe761bcb9046 ("net: fsl: expands dependencies of NET_VENDOR_FREESCALE")

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] net: fsl: avoid 64-bit warning on pq_mdio
@ 2015-12-09  3:52   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-12-09  3:52 UTC (permalink / raw)
  To: linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 08 Dec 2015 16:17:29 +0100

> The pq_mdio driver can now be built for ARM64, where we get a format
> string warning:
> 
> drivers/net/ethernet/freescale/fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
> drivers/net/ethernet/freescale/fsl_pq_mdio.c:467:25: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=]
> 
> The argument is an implicit ptrdiff_t from the subtraction of two pointers,
> so we should use the %z format string modifier to make this work on 64-bit
> architectures.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: fe761bcb9046 ("net: fsl: expands dependencies of NET_VENDOR_FREESCALE")

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-09  3:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 15:17 [PATCH] net: fsl: avoid 64-bit warning on pq_mdio Arnd Bergmann
2015-12-08 15:17 ` Arnd Bergmann
2015-12-08 15:17 ` Arnd Bergmann
2015-12-09  3:52 ` David Miller
2015-12-09  3:52   ` David Miller

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.