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: 8109431 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 550D89F1CC for ; Mon, 25 Jan 2016 15:10:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88FD62021F for ; Mon, 25 Jan 2016 15:10:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0CED201E4 for ; Mon, 25 Jan 2016 15:10:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757387AbcAYPJA (ORCPT ); Mon, 25 Jan 2016 10:09:00 -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-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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,