From patchwork Tue Oct 6 07:02:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Svensson X-Patchwork-Id: 7333291 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 A61579F2F7 for ; Tue, 6 Oct 2015 07:02:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D615020632 for ; Tue, 6 Oct 2015 07:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFE4120602 for ; Tue, 6 Oct 2015 07:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752078AbbJFHC0 (ORCPT ); Tue, 6 Oct 2015 03:02:26 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:5846 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751987AbbJFHCZ (ORCPT ); Tue, 6 Oct 2015 03:02:25 -0400 From: Lars Svensson To: , , , CC: , , , , , Lars Svensson Subject: [PATCH 2/2] staging: fbtft: fix sparse warning in call to vfree() Date: Tue, 6 Oct 2015 09:02:06 +0200 Message-ID: <1444114926-18000-2-git-send-email-lars1.svensson@sonymobile.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1444114926-18000-1-git-send-email-lars1.svensson@sonymobile.com> References: <1444114926-18000-1-git-send-email-lars1.svensson@sonymobile.com> MIME-Version: 1.0 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, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Member screen_base in struct fb_info is declared __iomem causing a sparse warning as below when passed to vfree(). Instead use non- __iomem pointer screen_buffer to avoid the warning. fbtft-core.c:922:39: warning: incorrect type in argument 1 \ (different address spaces) fbtft-core.c:922:39: expected void const *addr fbtft-core.c:922:39: got char [noderef] *screen_base Signed-off-by: Lars Svensson --- drivers/staging/fbtft/fbtft-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 7f5fa3d..a5fade2 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -779,7 +779,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, if (!info) goto alloc_fail; - info->screen_base = (u8 __force __iomem *)vmem; + info->screen_buffer = vmem; info->fbops = fbops; info->fbdefio = fbdefio; @@ -919,7 +919,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc); void fbtft_framebuffer_release(struct fb_info *info) { fb_deferred_io_cleanup(info); - vfree(info->screen_base); + vfree(info->screen_buffer); framebuffer_release(info); } EXPORT_SYMBOL(fbtft_framebuffer_release);