From patchwork Mon Jan 25 15:05:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101134 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1412746lbb; Mon, 25 Jan 2016 07:09:05 -0800 (PST) X-Received: by 10.66.102.8 with SMTP id fk8mr26299380pab.24.1453734545780; Mon, 25 Jan 2016 07:09:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tw5si34222606pac.131.2016.01.25.07.09.05; Mon, 25 Jan 2016 07:09:05 -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; 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 S1757395AbcAYPJE (ORCPT + 30 others); Mon, 25 Jan 2016 10:09:04 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:60463 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757369AbcAYPI5 (ORCPT ); Mon, 25 Jan 2016 10:08:57 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MBIsH-1aE44u2oA1-00AD3x; Mon, 25 Jan 2016 16:05:57 +0100 From: Arnd Bergmann To: Tomi Valkeinen Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jean-Christophe Plagniol-Villard , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: da8xx-fb: remove incorrect type cast Date: Mon, 25 Jan 2016 16:05:18 +0100 Message-Id: <1453734351-1958373-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:0GBURxZhH/LgUsY0/D9Yg8EaFV+8bWlWaWVlSQ+wzfxMlkkWGIC pFamL/3GdHIiPVqu0x+ZtFMFKkZp4KjBp83KDoLEVTUJflBMq/9KjJpGxUpD2840ZOjpW2/ 4Rkp2RQDwoMZCWAHUI/cjq8783uZOx2jE5C8K2TWnlkrEILMakgL9ZmHExL6KQdUXBC3HnR COS8R5kbunsnIZ9QtGPog== X-UI-Out-Filterresults: notjunk:1; V01:K0:j7f9QudLH08=:v/b8ElITtRMquAa4CqIrFS oyUbYKcrJme4147v4zNxLRXoZaxS5JrKUw4QKWMKczjJvREDoqUKUnhhI12JMnJgwyxdgYTSW WkDA3hCJM9LVyFa3wLg1M8g6tP65E8ot2RbCrLygTBrTjJQGdJNVEI3DkYmv7SuuzZqCdkOhE TLrjw4U75Ug/1+q9CiUCvDFH+/HgVtFSSW7httSDhDB8ImEpDICHq2Z+dkWoJKmILPbO/L5pU QszCOsn185X0axMKAW2Ko2mrtSOgXG4jDYNYWfTMb9ZI/ZKGjP+9VqZuRvaSyoQKy5HZDqta/ 7j6iC9ObTAXsH6OFaNXtxfXJjJqLO2el/jKl0HTMpm1C/DoJXDjbV6aHGqlYPI9sRaO0P5wEQ 3Doy1g1tL2VfLYitmjREYczqLyHnJFFStDNXVzHGu6Ap6D+hzbXwJHnYpI8DrI5gPuXg067qk vV4pfzkRzpavHkT1DIb0mT8BgYQFzUwR5PkccSZ6mOTwzEw48nzoe/iHt2Z5XhGQaGviH4V5o HiOkX0IglXjOlmmQnu42+8Z3GTmBu8MbocZyLsZu7rW7aeZn9bOPi6omv5jPhWLzCvpiekwhv hfWIR480K8kSRcMhVkysTCed5YjOM+0K4qfL9RgudKAz8mWitBzqpdhB1gb2P1ZwQhU2+fLgd dQ9zirdp4X5PvQIWFTKyWzfmNSTuDQuxEAakx6WTD1gJctiLga05MflulpeAdkTzLKdU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The probe function correct passes a dma_addr_t pointer into dma_alloc_coherent(), but has a cast to resource_size_t, which might be different from dma_addr_t: drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe': drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types] This removes the cast, which avoids the warning. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/da8xx-fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.0 diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c index 0081725c6b5b..6b2a06d09f2b 100644 --- a/drivers/video/fbdev/da8xx-fb.c +++ b/drivers/video/fbdev/da8xx-fb.c @@ -152,7 +152,7 @@ static void lcdc_write(unsigned int val, unsigned int addr) struct da8xx_fb_par { struct device *dev; - resource_size_t p_palette_base; + dma_addr_t p_palette_base; unsigned char *v_palette_base; dma_addr_t vram_phys; unsigned long vram_size; @@ -1428,7 +1428,7 @@ static int fb_probe(struct platform_device *device) par->vram_virt = dma_alloc_coherent(NULL, par->vram_size, - (resource_size_t *) &par->vram_phys, + &par->vram_phys, GFP_KERNEL | GFP_DMA); if (!par->vram_virt) { dev_err(&device->dev, @@ -1448,7 +1448,7 @@ static int fb_probe(struct platform_device *device) /* allocate palette buffer */ par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE, - (resource_size_t *)&par->p_palette_base, + &par->p_palette_base, GFP_KERNEL | GFP_DMA); if (!par->v_palette_base) { dev_err(&device->dev,