All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH net-next 1/9 v4] wan: ixp4xx_hss: fix compile-testing on 64-bit
Date: Fri, 10 Jan 2020 09:28:29 +0100	[thread overview]
Message-ID: <20200110082837.11473-2-linus.walleij@linaro.org> (raw)
In-Reply-To: <20200110082837.11473-1-linus.walleij@linaro.org>

From: Arnd Bergmann <arnd@arndb.de>

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 <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v3->v4:
- Drop a stable tag and rebubmit.
ChangeLog v2->v3:
- Rebased on v5.5-rc1
ChangeLog v1->v2:
- Just resending with the rest
---
 drivers/net/wan/ixp4xx_hss.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index ea6ee6a608ce..e7619cec978a 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -258,7 +258,7 @@ struct port {
 	struct hss_plat_info *plat;
 	buffer_t *rx_buff_tab[RX_DESCS], *tx_buff_tab[TX_DESCS];
 	struct desc *desc_tab;	/* coherent */
-	u32 desc_tab_phys;
+	dma_addr_t desc_tab_phys;
 	unsigned int id;
 	unsigned int clock_type, clock_rate, loopback;
 	unsigned int initialized, carrier;
@@ -858,7 +858,7 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev)
 		dev->stats.tx_dropped++;
 		return NETDEV_TX_OK;
 	}
-	memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4);
+	memcpy_swab32(mem, (u32 *)((uintptr_t)skb->data & ~3), bytes / 4);
 	dev_kfree_skb(skb);
 #endif
 
-- 
2.21.0


  reply	other threads:[~2020-01-10  8:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  8:28 [PATCH net-next 0/9 v4] IXP4xx networking cleanups Linus Walleij
2020-01-10  8:28 ` Linus Walleij [this message]
2020-01-10  8:28 ` [PATCH net-next 2/9 v4] wan: ixp4xx_hss: prepare compile testing Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 3/9 v4] ptp: ixp46x: move adjacent to ethernet driver Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 4/9 v4] ixp4xx_eth: move platform_data definition Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 5/9 v4] net: ethernet: ixp4xx: Standard module init Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 6/9 v4] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 7/9 v4] net: ehernet: ixp4xx: Use netdev_* messages Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 8/9 v4] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 9/9 v4] net: ethernet: ixp4xx: Use parent dev for DMA pool Linus Walleij
2020-01-11  7:30 ` [PATCH net-next 0/9 v4] IXP4xx networking cleanups David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200110082837.11473-2-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.