Received: by 10.213.65.68 with SMTP id h4csp1505703imn; Mon, 26 Mar 2018 08:49:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELtt9MIz0zRc/XCIAEDA5p4eF98dXtOX0zhZv37Ycs5CwAO8k2JX7sxf7T0wEOJBsdbYx5Bp X-Received: by 10.99.183.67 with SMTP id w3mr28755095pgt.153.1522079380328; Mon, 26 Mar 2018 08:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522079380; cv=none; d=google.com; s=arc-20160816; b=Lq2hRSyihw3WU8xuPScyaJgTifNughBOA/lkErrCfwlPtkuZCCNUe0wr7MJfJ2NGz1 Z7EL93KuUI9i6kJw5ULjFvoVQZSfSPpi4UyhVon+0RpGNjDeCGXVMFAhnRL1iHlhf3Sl bLMsEtSGQU0APmVWibrKIdR6pVq1KAd4SB4M2MWTfP7/xFf+Y6z682qhMYeQzwTkvKoE ACqSA/x6qxkLdE1KmohWf0JANvdW7cLU/iT4sVrQ3ookeI3zdRArtgDv9z5arxNVjr/h fiym4SRXZdXtnddcXgOhfkxkdcuyXNbzVe8KP0KRTcD/jn6e3dStHOxXKu1cACQ/NG4q 2LZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=qhtSGniCBg7lL8dqDUnactikI2NabAZxwKys3otPbd8=; b=cc2cNln5IkkkDZ+EfnJe4IifD8/BOFMIzZMXAtHKYlI7oPNTPHBmZvSoydUKZ92kGZ E+wHsvEZFjWRKsjTqid2trTWZmKxE6mB+7P5LWPqa7rfCRUjtU2XtsMVCKr29dHc4puH w4cjff/N4RKJAqtlgUWxQ/fLqrUb4oExZqr3UBhwprs8jlWqJecu0UopV1d337qdKuWQ 7oDrgNVJniaQ6OVKuEaxmKjmBG2rY5FJUgIcebUHdAT9yCpb0Fqn37JsQuiKx1ihXxx5 tdsiJm3LOJxwct2bVoRx9SRS7R+twG+Zc/mHS0Shpj0OysQzg/Fdq2/XTk46lYgbYgGR eQrg== ARC-Authentication-Results: i=1; mx.google.com; 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 u72si10417411pgc.545.2018.03.26.08.49.24; Mon, 26 Mar 2018 08:49:40 -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; 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 S1752490AbeCZPsT (ORCPT + 99 others); Mon, 26 Mar 2018 11:48:19 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:45414 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015AbeCZPsR (ORCPT ); Mon, 26 Mar 2018 11:48:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 2073A4106E; Mon, 26 Mar 2018 15:48:17 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vx0FwLmnUNjB; Mon, 26 Mar 2018 15:48:17 +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 764D240D4E; Mon, 26 Mar 2018 15:48:09 +0000 (UTC) Date: Mon, 26 Mar 2018 17:47:54 +0200 From: Emil Goode To: Thierry Reding Cc: Thierry Reding , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] gpu: host1x: Fix compiler errors Message-ID: <20180326154753.akbdpxlstb4mr3ne@lianli> References: <20180326144314.xeuocqp5fjpfjm3q@lianli> <20180326145734.GA8016@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180326145734.GA8016@ulmo> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, Mar 26, 2018 at 04:57:34PM +0200, Thierry Reding wrote: > On Mon, Mar 26, 2018 at 04:44:14PM +0200, Emil Goode wrote: > > 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(-) > > What compiler do you use? I do regular builds and check for warnings and > errors, and this one is new to me. > > Thierry > I use gcc version 6.3.0 cross compiler for armhf supplied with Debian Stretch. Best regards, Emil > > > > 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; > > > > -- > > 2.11.0 > >