From patchwork Mon Oct 21 00:08:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 176996 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp2664893ill; Sun, 20 Oct 2019 17:10:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4fUT0mlkwsGthsLrME+fNVgQHaRIwZv64YuMKNtG/oTV0gPvSZKuHSixV7U/v8e4zCNlG X-Received: by 2002:a50:b6cb:: with SMTP id f11mr305424ede.299.1571616608027; Sun, 20 Oct 2019 17:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571616608; cv=none; d=google.com; s=arc-20160816; b=aDe26RfJsh6pMm3f1RTBvFT/8H1uyJReAwji/eRvqvwvNx2KiZkh3moFtnrFzArudr WWVCYVxURfsfwi6/YRsVovEqPGwCIwPZWcnk3YNUXmemi8R78YOUQ/r5RZCadwsIm/0A OXP7P4lybjtdZc77O/G1aBGhfxd8HpXX3Kq6o4ijfyyfNXuURSQ2SDMbXb3TzZwi3B9l x7ADKlSqbiFmd6d/KilZBCpGYj42HZoWtoellHQFiYx6vQWJBQzr3GFB0FAaV9GO0U+P NrymDoZEfozdnFgdg6dhpxiwv64vWYYsI5Wkw2bycPqJErvgeuxWNxVaZMYWbZaLrMhu 2v2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hqHu8s6QOiWYaaMGUw3zthI3ATM9j5J6bRTqf/L3OEI=; b=WgUvAYY1yyQ45FNhxMP3R17MxngWjr1BoeuHopj4C7JoiUNNyUhw51uSINKJLyMMgN P+gtayhZfhWAS5Iwg8kiS0EMRL5UnjSjfuy7clG3mqvwQqVG6GiJz87La+HOG+6cpuLH 13Fw0LaB/4IYT7umzCe2adcx3pI5lPDiNc0wKxvCMY6TXdqudzjy22+Tn36IH5umw17q 9IQwhHTvNMoKvIay11vGAH6iAC3PIb2yJ76viZYuLvaLs2irBk/68zuwiJ3Fo/3qksLT /6oMuh870UtQWSmiA8QXS49J2HxfXO3vfm3Yiv9ATeyF/2tOH/knifcDhV4ts8P2SN7/ jIog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hdofXcDz; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si8007457ejj.347.2019.10.20.17.10.07; Sun, 20 Oct 2019 17:10:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hdofXcDz; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726796AbfJUAKC (ORCPT + 8 others); Sun, 20 Oct 2019 20:10:02 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40513 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfJUAKC (ORCPT ); Sun, 20 Oct 2019 20:10:02 -0400 Received: by mail-lf1-f68.google.com with SMTP id i15so1128614lfo.7 for ; Sun, 20 Oct 2019 17:10:01 -0700 (PDT) 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=hqHu8s6QOiWYaaMGUw3zthI3ATM9j5J6bRTqf/L3OEI=; b=hdofXcDzV9c8/JVe9WftNKsBEY6LkDmAQNJT/1p4gbRDFU+akneahydrCfADj8Es/e lVLhXdvqDvBvDiX8kc/oKeQ5aX6Rp8C7JB0cHiyp4Xc58rztjUedgdFU13RPvUzvZ8uZ ts06KN1/FeNJD1PTTnoHoovWx0EDziysM13WaUxQ+TRcM+whYLQrInjXdjTv3sApPMi+ 0CgwRU3nO1n4TNFRmOaY44gYMtHGGjeKZ0Ve5cGxkNl/fg6JQVNbwfx4wcEV+DFxXzHB 9ZZsfF8sT2GeOMfW4lePZFK/L/A5SkX7RKph0M6BA4XVJ8jckL5+YTbH7f7TFWp9JFEZ kDgA== 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=hqHu8s6QOiWYaaMGUw3zthI3ATM9j5J6bRTqf/L3OEI=; b=i2+Ig7as3VBB6ma31zDfzm9Zm/4NUEokht72Uf62dBBhPc5JC2OFz3TwCl+iHdeLvN bE0KKfSQqO6o1RtsIfx0Ja6ttBbbVmSE5plWdvVprOnZr1NIVum985dwti/Tfe21XBKh 3zFSfuLf2oqAzVTCxGlQ8jUhEcvWRlBDPeSWlGceKaaSeuQ1ndY62tQeO3G+CKfkrnAu kJnVZU55GoOncha5G6OcL74CshiirXde0XsML4UhAI2lFRHX/AuACJ9IamXmc876RWVt oeLyJySN0eZZMNeSAh6OorDMAAanLJtcSGn5+COxJBC+la4c2GnI9IN4tGMhY1Sn2/69 SJzg== X-Gm-Message-State: APjAAAW8rhRfzy2vQ/b+SmIbLZmTrEI75W5uLOJt4kyvdpV4ggHXFy0M VK4r2bXijlL51wk3msgSoDlwqWmqvww= X-Received: by 2002:a19:4f0b:: with SMTP id d11mr2288071lfb.51.1571616600131; Sun, 20 Oct 2019 17:10:00 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-79c8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.200.121]) by smtp.gmail.com with ESMTPSA id a18sm2723081lfi.15.2019.10.20.17.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2019 17:09:55 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Arnd Bergmann , Linus Walleij Subject: [PATCH 01/10] wan: ixp4xx_hss: fix compile-testing on 64-bit Date: Mon, 21 Oct 2019 02:08:15 +0200 Message-Id: <20191021000824.531-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021000824.531-1-linus.walleij@linaro.org> References: <20191021000824.531-1-linus.walleij@linaro.org> MIME-Version: 1.0 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 --- drivers/net/wan/ixp4xx_hss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0 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