linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: via-rhine: fix compiler warning
@ 2014-04-29 17:36 Jan Moskyto Matejka
  2014-04-29 18:09 ` Alexey Charkov
  2014-04-30  8:49 ` David Laight
  0 siblings, 2 replies; 16+ messages in thread
From: Jan Moskyto Matejka @ 2014-04-29 17:36 UTC (permalink / raw)
  To: Alexey Charkov, Roger Luethi, netdev, linux-kernel; +Cc: Jan Moskyto Matejka

Fixed different size cast warning:

	drivers/net/ethernet/via/via-rhine.c: In function ‘rhine_init_one_platform’:
	drivers/net/ethernet/via/via-rhine.c:1132:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
	  revision = (u32)match->data;
		     ^

That code was added in commit 2d283862dc62daead9db0dc89cd0d0351e91f765
("net: via-rhine: add OF bus binding").

Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
---
 drivers/net/ethernet/via/via-rhine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 4fa9201..76d18e0 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -288,7 +288,7 @@ MODULE_DEVICE_TABLE(pci, rhine_pci_tbl);
  * (for quirks etc.)
  */
 static struct of_device_id rhine_of_tbl[] = {
-	{ .compatible = "via,vt8500-rhine", .data = (void *)0x84 },
+	{ .compatible = "via,vt8500-rhine", .data = (u32 []) { 0x84 } },
 	{ }	/* terminate list */
 };
 MODULE_DEVICE_TABLE(of, rhine_of_tbl);
@@ -1129,7 +1129,7 @@ static int rhine_init_one_platform(struct platform_device *pdev)
 	if (!irq)
 		return -EINVAL;
 
-	revision = (u32)match->data;
+	revision = *((u32 *) match->data);
 	if (!revision)
 		return -EINVAL;
 
-- 
1.8.4.5


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

end of thread, other threads:[~2014-05-05 19:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-29 17:36 [PATCH] net: via-rhine: fix compiler warning Jan Moskyto Matejka
2014-04-29 18:09 ` Alexey Charkov
2014-04-29 19:47   ` Jan Moskyto Matejka
2014-04-30  8:49 ` David Laight
2014-04-30  9:22   ` Alexey Charkov
2014-04-30  9:35     ` David Laight
2014-04-30 12:06       ` [PATCH] net: via-rhine: Fix compiler warning re: pointer casting on 64bit Alexey Charkov
2014-04-30 18:21         ` [PATCH] net: via-rhine: Drop revision property, use quirks instead Alexey Charkov
2014-05-02 19:56           ` David Miller
2014-05-03 12:40             ` [PATCH] net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag Alexey Charkov
2014-05-05 19:37               ` David Miller
2014-05-01  9:30         ` [PATCH] net: via-rhine: Fix compiler warning re: pointer casting on 64bit David Laight
2014-05-01 11:33           ` Alexey Charkov
2014-04-30  9:50     ` [PATCH] net: via-rhine: fix compiler warning Jan Moskyto Matejka
2014-04-30  9:57       ` David Laight
2014-04-30 10:08         ` Jan Moskyto Matejka

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).