Received: by 10.223.185.116 with SMTP id b49csp3940134wrg; Mon, 26 Feb 2018 08:32:35 -0800 (PST) X-Google-Smtp-Source: AH8x225PhAbj+WSBE3xj2PdkU6nnd3/maYBSjzKaOl1HfmeTbyZ/3TvKvwl+W4Ila2jO/dAW2B1q X-Received: by 2002:a17:902:8214:: with SMTP id x20-v6mr10995039pln.182.1519662755680; Mon, 26 Feb 2018 08:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519662755; cv=none; d=google.com; s=arc-20160816; b=ED+Am+loSJ2Vk1VmmWzkNhgO7Lkho9Gsh3XAaIlpdDdUCQvF1ZrTChP/GyAA6HkPyr aBhG4Sgq0oarRUKwrsIdTY+Oy+RSJFipuvl7GTVafJwTravJITREptv9/pqGUXgDYSzx 1RU4G6RpQLGOr6+xLY4pa7X9pfZpGCg8RD7vONxcaHT6w9+vaS6ZiK+mbjlkgWIPlkE6 QtXqooual5R9rafluKWbcH3ChRjp2Wd843qyHAHU+6/1glH2q3ILEQY5FPwOFTkNhotF UrABU0Hw54sm9TjRVHa+90KkfZgyzOGdi3WCxXSgyt3lGSzUuADS0y9aTeMkYwSiUYG/ HtRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gwHhF5g39CiuuiOCzSv3OUM6fkb6I5RyqHyoen6Cip0=; b=Da4Xs6SnmL7xuYxJW5BQIB3g3452pUDBwdFXyaFvGZEKDfCgIlpgpwCWnzQPXHWaa8 kHM247fH/Zo4o6PYNTIKJoPTDAeBBdBgWQwp6edxmgTQf1vaBK1phPjRMGt64d6VUyvz yL4Tcsm8/KilMaw2MnU+eUmKZIayHioA+ZXAhwjOUa10RaUTXZSc7qATbAlHI580EUc7 fIAKQqMtWalcBFR5wIyhZ719bJAmjpNush2ngjWMHP/GqdYKRSxFX+5ej3Pe3bbXWfxg SJVdVKFxAobUMP62O4P0jJgw4ldJyrMZ9dJrO88/aVzlkhpIXIEjGi9SHNMwKUrwCmK5 Gmog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=OlHDWzH0; 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64-v6si6929389plb.472.2018.02.26.08.32.21; Mon, 26 Feb 2018 08:32:35 -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=@nxp.com header.s=selector1 header.b=OlHDWzH0; 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752200AbeBZQag (ORCPT + 99 others); Mon, 26 Feb 2018 11:30:36 -0500 Received: from mail-he1eur01on0052.outbound.protection.outlook.com ([104.47.0.52]:38994 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752081AbeBZQ3u (ORCPT ); Mon, 26 Feb 2018 11:29:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gwHhF5g39CiuuiOCzSv3OUM6fkb6I5RyqHyoen6Cip0=; b=OlHDWzH0JcOaX4aK0mo46LxOljPeAbmb6/xTahncw4GHOT3cYFJ8FkakGjyWKY+bnhgqecgYT/v71ud2aVvWkNbZh7tnIdmFL7gtxI4vIiqKJqzkvQvLRz5D7fVk5jr4kCy4msCSbUuY64jw3E0ts+kMEFGqFSe3mEFquURxe2E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by DB6PR0402MB2696.eurprd04.prod.outlook.com (2603:10a6:4:94::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Mon, 26 Feb 2018 16:28:28 +0000 From: Ioana Radulescu To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, roy.pledge@nxp.com, laurentiu.tudor@nxp.com, bogdan.purcareata@nxp.com Subject: [PATCH 3/4] staging: fsl-dpaa2/eth: Fix incorrect casts Date: Mon, 26 Feb 2018 10:28:06 -0600 Message-Id: <20180226162807.20649-4-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180226162807.20649-1-ruxandra.radulescu@nxp.com> References: <20180226162807.20649-1-ruxandra.radulescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: DM5PR10CA0018.namprd10.prod.outlook.com (2603:10b6:4:2::28) To DB6PR0402MB2696.eurprd04.prod.outlook.com (2603:10a6:4:94::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fa9cb96a-c5d8-44c4-5044-08d57d35f838 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:DB6PR0402MB2696; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0402MB2696;3:MOjmhkzzgenIbKFtRR5AaAgj+og5lfIW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Ltq4T14Ve2tTQB1vT3lE1S01WjjbN0xKSAaYFr9DxdSs3SaKefVzADxn69y69HBcyEazNNmZ41M50Ejx82f+oBesWdVKg+dgu5gri3qd1uJgZq3qAoreUJuSIPY/059Iem/w8O93or0GWbDjXzKiihn2zAFrsSN0syJch8gE4ztnc0hoz8VvaCFlyE0714sksjFOXtyv2lQEsTBPaoVaB3zJFPRMd0xLMdaOY+oYsKf/EzJkXYlu2OJSqOj4JKyJmLNOXW5jmraMIwDUGLdLNwl/N5CYYJ2mUswDM4PNI6hHbFd6Bc7YwYi85AFEToVRq+iIT0Csq;4:x9PTZ6r0vhUBe9RBNl9wvMyUTzJHYPpGBnFGnJ2jle1vh3F2qVzMsgwtMIvrfv7GHVKidjkN6znggunVW8cE+H4iOoAnkRQ0leNlqyG2povVB6/m8dayP3JAtefoS/01E87rxsnWyhDuTK6y+1Bg28A9EhrgEnmD1QfiCa7d9D0MK9mMCpLAGrvIMR4FOsgiPixwlUwqrGDAEkdzda2gP8qx+cMlOf8GAXX26FOOAe6+jQklWeS0imyoPqvulezTOBOIHKGE8JHQ89ZQUsNESGvbBrOdAfMdrOP6RRDFjK4NuJY0dHUgpafTDeaM0++w X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501161)(6055026)(6041288)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:DB6PR0402MB2696;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0402MB2696; X-Forefront-PRVS: 05954A7C45 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(346002)(366004)(39380400002)(376002)(199004)(189003)(2361001)(51416003)(106356001)(50466002)(26005)(16526019)(478600001)(316002)(186003)(105586002)(52116002)(305945005)(7736002)(16586007)(81166006)(25786009)(97736004)(5660300001)(2351001)(86362001)(2906002)(8676002)(2950100002)(6666003)(66066001)(36756003)(4326008)(6486002)(47776003)(6916009)(53936002)(48376002)(81156014)(59450400001)(76176011)(68736007)(6512007)(8936002)(386003)(6506007)(50226002)(1076002)(6116002)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0402MB2696;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DB6PR0402MB2696;23:LPdUdX+z5EboaO6zhs0bx/9MQefE1y8R703hXi9?= =?us-ascii?Q?t+p2UXkU79E7UfHZahnz8GLcyAZPXXpS96lyEDHsfr9qFlBvPTD24KU8/YHy?= =?us-ascii?Q?ECrSDH3GU/nfEGyRpeb0+9EVV0BYMiPeh/n4xqvcf7lD6kHMaOmne2ikKy0x?= =?us-ascii?Q?ku+F/NMBRePbQMFP+u0WaCKUCTC/48UIWolBPHd73BZmDzMqM9YC8f97/oRo?= =?us-ascii?Q?QpuPiA5RkQIRESOtCSC/nJSbzlJtqfBQKkWR25ijXe5k+T72objPWqBntte0?= =?us-ascii?Q?konJngB9Qp0M/o+w6k7j8ZzNgFyXIWZr6nExUH/rh2FcKj4PQWHVe4DSN40g?= =?us-ascii?Q?9Ox+dB1aAKKoAIyqkEWCdwR+1T/604hE0JSABYQ2rGkXfFuPTIJkJOVW5Far?= =?us-ascii?Q?AlgFWOP9dpnoMWyGL4aEDuFxQ120FT3SGgUokO7bGgFPJQT4+4O/ZrKro6k4?= =?us-ascii?Q?mEu+lzJGMQgVorpIp+kJR+L2FsKE6z4mXFOMm0R/XNCCb8eWjsMdru2OL+VF?= =?us-ascii?Q?o5E8FrxVCWa44Nh8hDViaWGk6Di+obVVyv8D1/l2bCTobYrfEVCs90Qexoea?= =?us-ascii?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mVxMqcrXiqdyGG27gfQCkkIubugAxSLe6/bBKyGL+mVbtYRGFIYTztc6XEkFMZ2RZgEX5T2DWVrznnBY433ldcqM+RMcQNpr69I=;5:u2ehjgjb5Dkv+qEvFQHp7abRFhsvhgwl6cx+Js/auMB6LcJLcofdkDG8+sCF2qb0s20n+29FFP1EtNHwbh/zrLSIIN8nlI8gdHhqF4aUZ95/nKY14FKzgGGD5G+pmPuPj45NxomQfuzAyEiwgHdN0gLLNWicZohGNJrPa9DCJFA=;24:pm89hQ/EXwsca+xN6sX/s27dPhMqLfTuR/8QXfRUVrS2vNOsM3gl2hUzUNUdmltvS1hMbeQsUmHapEU19evaAoLxh3iIZXN+8+TLXpZjbOM=;7:miM2ByQgUJbImi76evJkp5bhyPhVqFoxDXatIk6I2obX+1kVPct+1w4cxvnnkSKSOTmxC75ZAqmh0Qmkp9jcspDGMJYMtb8JLvFyFU6h/MERpsroAgEFJ9nLc68jqusSiP0Vzt6WOZHKGUNUQ//9PzjFkADHB18iljCqLeg7o3HIesexK8XbUxFLToZRLXgtEJkPRAaMdaS9Pd2deI9R/WR+7BBoPJGC6kOHApd31mbGu0Laes5+F85HubAft+db SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2018 16:28:28.1471 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa9cb96a-c5d8-44c4-5044-08d57d35f838 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2696 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DPAA2 Ethernet driver incorrectly assumes virtual addresses are always 64b long, which causes compiler errors when building for a 32b platform. Fix this by using explicit casts to uintptr_t where necessary. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index dc7be538..c81a01f 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -324,7 +324,7 @@ static int consume_frames(struct dpaa2_eth_channel *ch) } fd = dpaa2_dq_fd(dq); - fq = (struct dpaa2_eth_fq *)dpaa2_dq_fqd_ctx(dq); + fq = (struct dpaa2_eth_fq *)(uintptr_t)dpaa2_dq_fqd_ctx(dq); fq->stats.frames++; fq->consume(priv, ch, fd, &ch->napi, fq->flowid); @@ -1905,7 +1905,7 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv, queue.destination.id = fq->channel->dpcon_id; queue.destination.type = DPNI_DEST_DPCON; queue.destination.priority = 1; - queue.user_context = (u64)fq; + queue.user_context = (u64)(uintptr_t)fq; err = dpni_set_queue(priv->mc_io, 0, priv->mc_token, DPNI_QUEUE_RX, 0, fq->flowid, DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST, @@ -1957,7 +1957,7 @@ static int setup_tx_flow(struct dpaa2_eth_priv *priv, queue.destination.id = fq->channel->dpcon_id; queue.destination.type = DPNI_DEST_DPCON; queue.destination.priority = 0; - queue.user_context = (u64)fq; + queue.user_context = (u64)(uintptr_t)fq; err = dpni_set_queue(priv->mc_io, 0, priv->mc_token, DPNI_QUEUE_TX_CONFIRM, 0, fq->flowid, DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST, -- 2.7.4