Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1944626imm; Thu, 24 May 2018 03:22:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp7ZCRVUvMyOH988Z/cCLOcK+QoBdxeMi/mz6kLPyzIb1/NwnnnHGKPp7P4022THUiHlejW X-Received: by 2002:a65:510c:: with SMTP id f12-v6mr5257882pgq.385.1527157330884; Thu, 24 May 2018 03:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157330; cv=none; d=google.com; s=arc-20160816; b=nR+aIPo48XM7E+MnP70jTH/O3fvSrkI12UYk4Ppoj7EMwgcLOfnctopqj7mBONXOIO 0EQkQSdhOv/zUmouY7DohfNNzcUUdUOQb7WrnRabAE2YvlaU/1qUs14bbKQU+FOd8/7b 6lV76OcgSS7EXcDe9kBiwtWHjdnsSdTtvq1NNzsZFbmNo+AxjEo9vLA2q3klgArwX1dE YJX+M3vlp2qGvX3/rAcRt59/HGSP9KKl9KZtYQymHrn+dZ9seK6ipS8+kQwYxD+q72IB 8+wO9i85fiiAHjqLeRmX3QOr+n1EthfF7ZtqywON1j8DSLzBPPZJCqtYvKHok7zXHv/E hJ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XhwesVIsJ6/Br3mx1FjXhRCCSMOWtIlPlD4WLYPharE=; b=vzvPApYiwlSTqQRJoaHFT3BHEX4fbsn7/Zugm9wBblNyUFtW8ke2UfBPQ0+le+2kAW 2O/TOwSy99VuQOZQ/6booWR/l+aIWTW8nohTULjT4Jx+zwknTKtBDITpoAX81JFVdZOl 0UVZrMBuVddjgfgRLxotmdMCwLqxywW7TlH9VWjjVlW1mLdwlmEH6QIvP7V7Cqatjpjx KxdRBNP48NFs7F1IQZ++fZGvBIEEVR2kguNrqA6wvu8ui6nmp+LShaJxdkKDsucMnm28 /kCv4AC7brwWKvWKYk8IgPRLpARWeumTzJ5Mj/HYZ54BEfiUo0KaoVl+KiGru4PP/rbN /Z0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nuR1wx0K; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8-v6si20517053plp.468.2018.05.24.03.21.55; Thu, 24 May 2018 03:22:10 -0700 (PDT) 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=nuR1wx0K; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031237AbeEXKDN (ORCPT + 99 others); Thu, 24 May 2018 06:03:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:51540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031209AbeEXKDF (ORCPT ); Thu, 24 May 2018 06:03:05 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 409C220890; Thu, 24 May 2018 10:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156184; bh=rCKrS9QREEXFyw95l0Bv4E/YmmpLqRc1lHf/Vcm4z+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nuR1wx0KmV79ErtyBehlloyHRrNdiDGsNpl0DXc7kQevM9COHFUtRTSZoq317zCYB rzDJwani0iqTr2NuILuN7z5krcUHX+S5o3qaLa2gtyO8xPoaGddEztyPJZpIFPzYTc 51Tk/fxp8L11WI6cAbtclueUmG5EmijnNGkxYV3Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ioana Radulescu , Sasha Levin Subject: [PATCH 4.16 093/161] staging: fsl-dpaa2/eth: Fix incorrect casts Date: Thu, 24 May 2018 11:38:38 +0200 Message-Id: <20180524093029.568570633@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ioana Radulescu [ Upstream commit 75c583ab9709692a60871d4719006391cde8dc1d ] 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 Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 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_e } 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); @@ -1908,7 +1908,7 @@ static int setup_rx_flow(struct dpaa2_et 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, @@ -1960,7 +1960,7 @@ static int setup_tx_flow(struct dpaa2_et 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,