Skip to content

Commit 54630b1

Browse files
arndbgregkh
authored andcommitted
wan: ixp4xx_hss: fix compile-testing on 64-bit
[ Upstream commit 504c28c ] Change the driver to use portable integer types to avoid warnings during compile testing: drivers/net/wan/ixp4xx_hss.c:863:21: error: cast to 'u32 *' (aka 'unsigned int *') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast] memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4); ^ drivers/net/wan/ixp4xx_hss.c:979:12: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &port->desc_tab_phys))) ^~~~~~~~~~~~~~~~~~~~ include/linux/dmapool.h:27:20: note: passing argument to parameter 'handle' here dma_addr_t *handle); ^ Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8257c19 commit 54630b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/wan/ixp4xx_hss.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ struct port {
261261
struct hss_plat_info *plat;
262262
buffer_t *rx_buff_tab[RX_DESCS], *tx_buff_tab[TX_DESCS];
263263
struct desc *desc_tab; /* coherent */
264-
u32 desc_tab_phys;
264+
dma_addr_t desc_tab_phys;
265265
unsigned int id;
266266
unsigned int clock_type, clock_rate, loopback;
267267
unsigned int initialized, carrier;
@@ -861,7 +861,7 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev)
861861
dev->stats.tx_dropped++;
862862
return NETDEV_TX_OK;
863863
}
864-
memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4);
864+
memcpy_swab32(mem, (u32 *)((uintptr_t)skb->data & ~3), bytes / 4);
865865
dev_kfree_skb(skb);
866866
#endif
867867

0 commit comments

Comments
 (0)