Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1940596ybv; Fri, 14 Feb 2020 08:34:56 -0800 (PST) X-Google-Smtp-Source: APXvYqz09LqVk0J3N1URGFgwn1Wnl+oHJapwvKtKE4s6/egwZMG7KGqA5JowkDfhipFPg8h9tHzd X-Received: by 2002:aca:cf12:: with SMTP id f18mr2470080oig.81.1581698096141; Fri, 14 Feb 2020 08:34:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698096; cv=none; d=google.com; s=arc-20160816; b=pX7Ydf0IvN8xM6PEQkcnt6dkmscVVSrLhS5WLqi7mVJzb1imk5mM0JXyu2g++ksymI vBQ4K9jKjgxDRhO/Q9Hq+SwE9FqAvUvkfmpP7sQrITWq5JXnfiBQUF3dZVKXaABKq/lS mGe2h1F3BP2JdSScy6SVNdCF7oZq5LiM/PMFu+bZEmsPYkHWTnkZcK02QLHlRrXtyVRJ bYM/PrKGrL+EJH4qkxoz4pl8Bl1Zgd7DqQRbaExVyn+dTqnyGZK50NX94BNIG4iuVNmk Bxo26qbAUKU92ub5OrDYJqkMyCNlXJlkQwWrhtHNfXLzJtRBKLr8xmlNt7jH6aYYs7pE ygFQ== 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=kUouDnDum/8lwzIH+dJ/k1/AvRC50MxckiZSY6wCY9s=; b=LiN+nw6tawEyvLCfH/75dhPPrWNCcOGWSb9o4VUvEOD/k39gaEhz3Bu4plH/l8bAB0 LX9PSbsgbUqsoQaPb4F1WeW2rdi9OG0fWDS5ArPEdtYT7/A/dqDo/Fkt/WIA3tClNN8e yIBXxl6vC8EAPgm25FloW5Qkcs1A0OniTKsSNbkmkm4ebSubDkiKtk9E12S6TbIFBB0e 2x8VUXQIvSKGCeKHEYXiDev1eDlzXbjD61MKc5j7N82LwhAtFMT89BnkdZR8g2s9+Cml EbdiU99HZcl5tdXFVGY/CA86kVmdVbNi70ISxuT6XRTS5jgIF79Y2OZChOHjoOzln396 EqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qYYHlfFh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si3296208otk.109.2020.02.14.08.34.44; Fri, 14 Feb 2020 08:34:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=qYYHlfFh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405713AbgBNQZT (ORCPT + 99 others); Fri, 14 Feb 2020 11:25:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:59358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405566AbgBNQXP (ORCPT ); Fri, 14 Feb 2020 11:23:15 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DBAD24768; Fri, 14 Feb 2020 16:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697395; bh=wVAFLn1OyiGv+jbPEipLto9iRXEUfr6/MkA/lc67GIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qYYHlfFhnurNt5YdehSnMniCBae3YPNwCSbWMMi/b8meKijcaEByRgwcqryzLyfiz K8E80EMeGyVs6abl1DbnegHA+Op3dd/CMkFwZqDiKpeo52z5yNbTG8/8oph7lR/BJn LSqFi08PP69FYzHue82s1d4IhMi8puS4sy6sGZLg= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Linus Walleij , Jakub Kicinski , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 089/141] wan: ixp4xx_hss: fix compile-testing on 64-bit Date: Fri, 14 Feb 2020 11:20:29 -0500 Message-Id: <20200214162122.19794-89-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 504c28c853ec5c626900b914b5833daf0581a344 ] 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 Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- 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 e7bbdb7af53ac..97968e6a6a4eb 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c @@ -261,7 +261,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; @@ -861,7 +861,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.20.1