]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ni65: Avoid typecast of pointer to u32
authorGuenter Roeck <linux@roeck-us.net>
Thu, 9 Sep 2021 04:49:53 +0000 (21:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Sep 2021 10:21:19 +0000 (11:21 +0100)
Building alpha:allmodconfig results in the following error.

drivers/net/ethernet/amd/ni65.c: In function 'ni65_stop_start':
drivers/net/ethernet/amd/ni65.c:751:37: error:
cast from pointer to integer of different size
buffer[i] = (u32) isa_bus_to_virt(tmdp->u.buffer);

'buffer[]' is declared as unsigned long, so replace the typecast to u32
with a typecast to unsigned long to fix the problem.

Cc: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/ni65.c

index b5df7ad5a83f18372a541e65548bb0f910bd8b26..032e8922b4829b8e676c0bc35f6857ae552e14c3 100644 (file)
@@ -748,7 +748,7 @@ static void ni65_stop_start(struct net_device *dev,struct priv *p)
 #ifdef XMT_VIA_SKB
                        skb_save[i] = p->tmd_skb[i];
 #endif
-                       buffer[i] = (u32) isa_bus_to_virt(tmdp->u.buffer);
+                       buffer[i] = (unsigned long)isa_bus_to_virt(tmdp->u.buffer);
                        blen[i] = tmdp->blen;
                        tmdp->u.s.status = 0x0;
                }