From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E61AC33CA2 for ; Fri, 10 Jan 2020 08:29:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 393032072E for ; Fri, 10 Jan 2020 08:29:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="k8KUTo3+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbgAJI3a (ORCPT ); Fri, 10 Jan 2020 03:29:30 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39189 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727052AbgAJI3a (ORCPT ); Fri, 10 Jan 2020 03:29:30 -0500 Received: by mail-lf1-f65.google.com with SMTP id y1so805257lfb.6 for ; Fri, 10 Jan 2020 00:29:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dhuWFoLN+p/zW9CrUBh7lo8WyMSn75f3fT5RdnGMkpw=; b=k8KUTo3+/a8j1p7e1vMutnGVrS2UpyEGoz5HeZHhPmzRR8TGdo/Vw3ec/+mOl4xRWa lLNi2rEiI55sZa4w02Umxt/jvuUv+LxseviNlwjFu5eae7ry1W4P7FCOQSrRTgCenH9v f5IgrBYqv1oBEwiKPz8rOVgUvyXRycwnYob9PZxdj0biL233KqEnieKTw/YXKUGkWizZ WscDrv5iZhr/Zmgk7rC+oxvqiJdO5IPruG16akeXPnpgf/8y62fjll2OBfb8Wm6OCBhO PzWV16juKt56XQkQgKgRdZjxOJ3/9MPK+aRrJTRCVghYQAAWfInmYckQAnP0i2cUbGWX m4qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dhuWFoLN+p/zW9CrUBh7lo8WyMSn75f3fT5RdnGMkpw=; b=DdjqWI9Y9Uk2VanrXTJkQXG+/Wmf2UMb0cpyzJcsco+BZ6eXA9djkt1cFQmzMVjLDb WGvMeVR7FsQL1RRfeMN2JsD/kAHmhD4AnPQr3rRjdATclT6auyJSg8NdLD/9kxOLmPst 3AyebVuk03c7QokIhnwWYR+kVlPb7xdzkPLrzrgRHViN3J5ghD4pa4lhGwmAVUaQCOYx RENcSmINhfGu7tJwbw/FyFHeM7IO26vyac1nkvsTNa4cpvrjf/35n49K1Gnse1d9vetF iX6nsgICauHt99nXDyoO2yIGLLUKetB4epqkuWeUwyM1/Q3mQtE+9s9QsGDvE/ipihTQ g/0w== X-Gm-Message-State: APjAAAV4cwsaJ/0U3PdGI8HHIYiG9/qlzRqdJmSC+DXfp/QJtmP1YTrT STj4SJoU8S2stirmsnc4fIyR882JuPurBQ== X-Google-Smtp-Source: APXvYqwcDZ5YZlulFcUhud8askhKNoTgmO20ABf18AKXPogcog8fUA1uFY5jBhueYQikQE/DhzJEhA== X-Received: by 2002:a19:c697:: with SMTP id w145mr1445216lff.54.1578644968247; Fri, 10 Jan 2020 00:29:28 -0800 (PST) Received: from linux.local (c-5ac9225c.014-348-6c756e10.bbcust.telenor.se. [92.34.201.90]) by smtp.gmail.com with ESMTPSA id g24sm606464lfb.85.2020.01.10.00.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 00:29:27 -0800 (PST) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Arnd Bergmann , Jakub Kicinski , Linus Walleij 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 Message-Id: <20200110082837.11473-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200110082837.11473-1-linus.walleij@linaro.org> References: <20200110082837.11473-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 Signed-off-by: Linus Walleij --- 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