From patchwork Fri May 31 12:55:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 2643881 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 03532DFB79 for ; Fri, 31 May 2013 12:57:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754545Ab3EaM45 (ORCPT ); Fri, 31 May 2013 08:56:57 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:34549 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753430Ab3EaM4N (ORCPT ); Fri, 31 May 2013 08:56:13 -0400 Received: by mail-wi0-f177.google.com with SMTP id hr14so658168wib.10 for ; Fri, 31 May 2013 05:56:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:content-type:x-gm-message-state; bh=Us65ysePRoe+DEQ8h1Oq1sv/t7pWOTnJiNBKp8YPOqo=; b=dOrXH5yt8rD9PXhGBAK0r/jrdJE14NzJFdJE68txFYITlkKqtJMTAa1lHBJohJ50V4 IRncJ74saJ1O1+e/RMvI1ZYdDs8bOMc0h6fc7+EezPrV1etGFK+sC2vhafJPFnTNOFkU 3//ufSFxvdgBkVGu1w8yObgA0qrNebIP7mx2nEMWbXHG6cco6M2J8McO/evXL6xDc2zu GcAzJLfhpYPvlJjagTeBT3h7/buhe3I0ZwWnprVOnEMO8nbPsqdOFJ+ZXuirvKlwwXFL Rid7yVWPwrjmSXH+sZJsKgwh2G0j6fAp41mNq/9/XlO4y2ZHZOo3fMqpsVmPOFq/9BYq Y2mA== X-Received: by 10.180.206.135 with SMTP id lo7mr3049287wic.64.1370004970956; Fri, 31 May 2013 05:56:10 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id k10sm3818148wia.4.2013.05.31.05.56.09 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 31 May 2013 05:56:10 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org Cc: Michal Simek , Michal Simek , Arnd Bergmann , Timur Tabi , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org Subject: [PATCH v3 7/8] video: xilinxfb: Fix sparse warnings Date: Fri, 31 May 2013 14:55:37 +0200 Message-Id: X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQk3pnNrXHbgunLX+dAwx8RsHNAJRiJqkFJ4dm3A+iaS4RI7GSgXMhmCP1lTMb/6mFuBSxYs Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Use proper casting for fb_virt variable. Signed-off-by: Michal Simek --- Changes in v3: - New patch in this patchset Changes in v2: None drivers/video/xilinxfb.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) -- 1.8.2.3 diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index f3d4a69..e27a4f6 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c @@ -131,7 +131,7 @@ struct xilinxfb_drvdata { dcr_host_t dcr_host; unsigned int dcr_len; #endif - void *fb_virt; /* virt. address of the frame buffer */ + void __iomem *fb_virt; /* virt. address of the frame buffer */ dma_addr_t fb_phys; /* phys. address of the frame buffer */ int fb_alloced; /* Flag, was the fb memory alloced? */ @@ -273,8 +273,10 @@ static int xilinxfb_assign(struct platform_device *pdev, drvdata->fb_virt = ioremap(pdata->fb_phys, fbsize); } else { drvdata->fb_alloced = 1; - drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize), - &drvdata->fb_phys, GFP_KERNEL); + drvdata->fb_virt = (__force void __iomem *) + dma_alloc_coherent(dev, PAGE_ALIGN(fbsize), + &drvdata->fb_phys, + GFP_KERNEL); } if (!drvdata->fb_virt) { @@ -287,7 +289,7 @@ static int xilinxfb_assign(struct platform_device *pdev, } /* Clear (turn to black) the framebuffer */ - memset_io((void __iomem *)drvdata->fb_virt, 0, fbsize); + memset_io(drvdata->fb_virt, 0, fbsize); /* Tell the hardware where the frame buffer is */ xilinx_fb_out32(drvdata, REG_FB_ADDR, drvdata->fb_phys); @@ -307,7 +309,7 @@ static int xilinxfb_assign(struct platform_device *pdev, /* Fill struct fb_info */ drvdata->info.device = dev; - drvdata->info.screen_base = (void __iomem *)drvdata->fb_virt; + drvdata->info.screen_base = drvdata->fb_virt; drvdata->info.fbops = &xilinxfb_ops; drvdata->info.fix = xilinx_fb_fix; drvdata->info.fix.smem_start = drvdata->fb_phys; @@ -341,8 +343,8 @@ static int xilinxfb_assign(struct platform_device *pdev, if (drvdata->flags & BUS_ACCESS_FLAG) { /* Put a banner in the log (for DEBUG) */ - dev_dbg(dev, "regs: phys=%x, virt=%p\n", drvdata->regs_phys, - drvdata->regs); + dev_dbg(dev, "regs: phys=%x, virt=%p\n", + (u32)drvdata->regs_phys, drvdata->regs); } /* Put a banner in the log (for DEBUG) */ dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n", @@ -355,8 +357,9 @@ err_regfb: err_cmap: if (drvdata->fb_alloced) - dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt, - drvdata->fb_phys); + dma_free_coherent(dev, PAGE_ALIGN(fbsize), + (__force void *)drvdata->fb_virt, + drvdata->fb_phys); else iounmap(drvdata->fb_virt); @@ -388,7 +391,8 @@ static int xilinxfb_release(struct device *dev) if (drvdata->fb_alloced) dma_free_coherent(dev, PAGE_ALIGN(drvdata->info.fix.smem_len), - drvdata->fb_virt, drvdata->fb_phys); + (__force void *)drvdata->fb_virt, + drvdata->fb_phys); else iounmap(drvdata->fb_virt);