Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b261c20

Browse files
arndbdavem330
authored andcommitted
net: ax88796: avoid 64 bit arithmetic
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 <[email protected]> Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e393ce5 commit b261c20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/8390/ax88796.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ static int ax_probe(struct platform_device *pdev)
828828
struct ei_device *ei_local;
829829
struct ax_device *ax;
830830
struct resource *irq, *mem, *mem2;
831-
resource_size_t mem_size, mem2_size = 0;
831+
unsigned long mem_size, mem2_size = 0;
832832
int ret = 0;
833833

834834
dev = ax__alloc_ei_netdev(sizeof(struct ax_device));

0 commit comments

Comments
 (0)