Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1989815imm; Thu, 24 May 2018 04:07:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZowV5eRqGy7RIovlesheKopBemNwiPzpIOhKqtd8UIoUd76jopbCU/uQkY15NOHTNQq1BfY X-Received: by 2002:a63:7a5a:: with SMTP id j26-v6mr5556630pgn.421.1527160058817; Thu, 24 May 2018 04:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527160058; cv=none; d=google.com; s=arc-20160816; b=UgdkyGjKc7ZksSIyB+PqWtInLY12Q5i6DXsYmVe4vZEZO+225GnDJgP/WnL3bscH85 1R/hfDUYeJzR9VR3Jd/CRlbvL3fJm53OHTYVbKmfH52H48KJ6xuxgqotKtO8U2D1kxHI +a4Qcw9s7IxBjMpB1QI+b6u3NPVE4fd8fO5B9iLttkL5Oe6Iol2l/5JNGf9Qz+Z/+4ka eUMvjKgpbfYt4SH/xrohnEzB/GzKBz0uGUulXzlkYeKX89fXUs/CR/PV+m2ygs0lJajs bLiUJdtlpO/+3+Vu0bmj+CpUZc205QBS+Teh+rfiu6m8HFF1beBMeiQ+qzaDML+874v8 ilug== 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=mn94+L5rvm8iZxVHVjm2yAKTGI2DrehWW5WsTaqOdm8=; b=n050XPcm/L7LsvtZ3qpv6fi0ZAMppoHNfLqGMd45UYyap3G+ZmM85J7fLm3KXOf4B7 shPy1Hl5Xbi4Fsayw+VABdQq4qtW+3+iBKWge2k67YKRxKIsAX7RpGHDMfXY39LDK1z8 wRs3xjGBx/YWNzXLdnOAQgSgqowlHyris9nHZG+M7Z6furJAU0AxjC1I8DHdQe9ZtaSG X0vuboc3g5XmrrFs5EYabRMWaYDG5gUXMX41e7Mkno/PmRaP6rJZV54IBvQWftLYibBQ PQ3BOk2Y/ElJBCuoQ4Sn1NA33z5UAXZpNmrWwVkRaKYY1UJgNVAgDqdyaUs8A+FConbf Ir2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rv89jNjC; 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 32-v6si21203208ple.319.2018.05.24.04.07.24; Thu, 24 May 2018 04:07:38 -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=rv89jNjC; 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 S1032897AbeEXLGg (ORCPT + 99 others); Thu, 24 May 2018 07:06:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:35228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968260AbeEXJzF (ORCPT ); Thu, 24 May 2018 05:55: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 3032420892; Thu, 24 May 2018 09:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155704; bh=dDufe9dIPitnORh9bEryPkk71W28DuGgqB6AB2PtCH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rv89jNjCA/CjOCRvMi+lCZYk9yv4L7INNlXZxu4riY3jVh/cnMHhaAPmg0L7M57LR P9dOcCYrBpyFGAqwVpBhZW6Fj5J0A5aWS2CdaAj+1C6RTwSX6u4sO7ehVoP7d03DFj lHkHhTig3k/aTxFeo2OAE4qgGITzas+kAZeJFPlY= 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.14 087/165] staging: fsl-dpaa2/eth: Fix incorrect casts Date: Thu, 24 May 2018 11:38:13 +0200 Message-Id: <20180524093625.550700720@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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.14-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 @@ -315,7 +315,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); @@ -1888,7 +1888,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, @@ -1940,7 +1940,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,