From patchwork Mon Mar 26 14:44:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Goode X-Patchwork-Id: 891019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=goode.io Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 408xkW6q4nz9s31 for ; Tue, 27 Mar 2018 01:44:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752383AbeCZOoj (ORCPT ); Mon, 26 Mar 2018 10:44:39 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:58491 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbeCZOoi (ORCPT ); Mon, 26 Mar 2018 10:44:38 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 578E021BD7; Mon, 26 Mar 2018 14:44:37 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l1ZqHmA0uH5K; Mon, 26 Mar 2018 14:44:37 +0000 (UTC) Received: from lianli (31-211-236-16.customers.ownit.se [31.211.236.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 908D1219FF; Mon, 26 Mar 2018 14:44:29 +0000 (UTC) Date: Mon, 26 Mar 2018 16:44:14 +0200 From: Emil Goode To: Thierry Reding , Thierry Reding Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] gpu: host1x: Fix compiler errors Message-ID: <20180326144314.xeuocqp5fjpfjm3q@lianli> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org The compiler is complaining with the following errors: drivers/gpu/host1x/cdma.c:94:48: error: passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type [-Werror=incompatible-pointer-types] drivers/gpu/host1x/cdma.c:113:48: error: passing argument 3 of ‘dma_alloc_wc’ from incompatible pointer type [-Werror=incompatible-pointer-types] The expected pointer type of the third argument to dma_alloc_wc() is dma_addr_t but phys_addr_t is passed. Fix this by adding casts to the expected pointer type. Signed-off-by: Emil Goode --- drivers/gpu/host1x/cdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index 28541b280739..5e8b321a751e 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -91,8 +91,8 @@ static int host1x_pushbuffer_init(struct push_buffer *pb) size = iova_align(&host1x->iova, size); - pb->mapped = dma_alloc_wc(host1x->dev, size, &pb->phys, - GFP_KERNEL); + pb->mapped = dma_alloc_wc(host1x->dev, size, + (dma_addr_t *)&pb->phys, GFP_KERNEL); if (!pb->mapped) return -ENOMEM; @@ -110,8 +110,8 @@ static int host1x_pushbuffer_init(struct push_buffer *pb) if (err) goto iommu_free_iova; } else { - pb->mapped = dma_alloc_wc(host1x->dev, size, &pb->phys, - GFP_KERNEL); + pb->mapped = dma_alloc_wc(host1x->dev, size, + (dma_addr_t *)&pb->phys, GFP_KERNEL); if (!pb->mapped) return -ENOMEM;