netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ax88796: avoid 64 bit arithmetic
@ 2013-04-19 13:06 Arnd Bergmann
  2013-04-19 17:36 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2013-04-19 13:06 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Ben Dooks

When building ax88796 on an ARM platform with 64-bit resource_size_t,
we currently get

drivers/net/ethernet/8390/ax88796.c:875: undefined reference to `__aeabi_uldivmod'

because we do a division on the length of the MMIO resource.
Since we know that this resource is very short, using an
"unsigned long" instead of "resource_size_t" is entirely
sufficient, and avoids this link-time error.

Cc: Ben Dooks <ben-linux@fluff.org>
Cc: netdev@vger.kernel.org

diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index cab306a..e1d2643 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -828,7 +828,7 @@ static int ax_probe(struct platform_device *pdev)
 	struct ei_device *ei_local;
 	struct ax_device *ax;
 	struct resource *irq, *mem, *mem2;
-	resource_size_t mem_size, mem2_size = 0;
+	unsigned long mem_size, mem2_size = 0;
 	int ret = 0;
 
 	dev = ax__alloc_ei_netdev(sizeof(struct ax_device));

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

end of thread, other threads:[~2013-04-19 21:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 13:06 [PATCH] net: ax88796: avoid 64 bit arithmetic Arnd Bergmann
2013-04-19 17:36 ` David Miller
2013-04-19 18:46   ` Arnd Bergmann
2013-04-19 18:47   ` [PATCH v2] " Arnd Bergmann
2013-04-19 21:58     ` David Miller

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