From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755293AbbDPR3f (ORCPT ); Thu, 16 Apr 2015 13:29:35 -0400 Received: from mail-ig0-f177.google.com ([209.85.213.177]:32992 "EHLO mail-ig0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754219AbbDPR30 (ORCPT ); Thu, 16 Apr 2015 13:29:26 -0400 From: Garret Kelly To: Thomas Petazzoni , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Greg Kroah-Hartman , devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Cc: Garret Kelly Subject: [PATCH] staging: fbtft: force cast to non-__iomem pointer Date: Thu, 16 Apr 2015 13:29:19 -0400 Message-Id: <1429205359-12929-1-git-send-email-gdk@google.com> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fbtft uses fb_info's screen_base field to store a non-__iomem allocation. Cast away the __iomem qualifier when freeing the pointer to suppress the sparse warning. Fixes the following sparse warnings: drivers/staging/fbtft/fbtft-core.c:918:19: warning: incorrect type in argument 1 (different address spaces) drivers/staging/fbtft/fbtft-core.c:918:19: expected void const *addr drivers/staging/fbtft/fbtft-core.c:918:19: got char [noderef] *screen_base Signed-off-by: Garret Kelly --- drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 37dcf7e..1196dda 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -925,7 +925,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc); void fbtft_framebuffer_release(struct fb_info *info) { fb_deferred_io_cleanup(info); - vfree(info->screen_base); + vfree((void __force *)info->screen_base); framebuffer_release(info); } EXPORT_SYMBOL(fbtft_framebuffer_release); -- 2.0.2