* [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
* Re: [PATCH] net: ax88796: avoid 64 bit arithmetic
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
0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2013-04-19 17:36 UTC (permalink / raw)
To: arnd; +Cc: netdev, ben
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 19 Apr 2013 15:06:21 +0200
> 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.
Please provide a proper signoff with your patches, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: ax88796: avoid 64 bit arithmetic
2013-04-19 17:36 ` David Miller
@ 2013-04-19 18:46 ` Arnd Bergmann
2013-04-19 18:47 ` [PATCH v2] " Arnd Bergmann
1 sibling, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2013-04-19 18:46 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ben
On Friday 19 April 2013, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Fri, 19 Apr 2013 15:06:21 +0200
>
> > 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.
>
> Please provide a proper signoff with your patches, thanks.
Sorry about this, I have no idea how this slipped through. I'll
send a new version right away.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] net: ax88796: avoid 64 bit arithmetic
2013-04-19 17:36 ` David Miller
2013-04-19 18:46 ` Arnd Bergmann
@ 2013-04-19 18:47 ` Arnd Bergmann
2013-04-19 21:58 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2013-04-19 18:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ben
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
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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
* Re: [PATCH v2] net: ax88796: avoid 64 bit arithmetic
2013-04-19 18:47 ` [PATCH v2] " Arnd Bergmann
@ 2013-04-19 21:58 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-04-19 21:58 UTC (permalink / raw)
To: arnd; +Cc: netdev, ben
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 19 Apr 2013 20:47:26 +0200
> 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
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
^ permalink raw reply [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).