From patchwork Fri Mar 20 15:22:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 6057611 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36D5DBF90F for ; Fri, 20 Mar 2015 15:22:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D03220120 for ; Fri, 20 Mar 2015 15:22:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42C1E2010E for ; Fri, 20 Mar 2015 15:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751147AbbCTPWd (ORCPT ); Fri, 20 Mar 2015 11:22:33 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:38474 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbbCTPWc (ORCPT ); Fri, 20 Mar 2015 11:22:32 -0400 Received: by wibgn9 with SMTP id gn9so17592823wib.1; Fri, 20 Mar 2015 08:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=1gZm2pnxyOUbIi/inhXpkG6Wq37sQGypVdvJEuLYuws=; b=DbHrDmhhl3n28CObxe6VS86l9pFUUGxUU66jwCIh6Qk1h6uFRyqk27PxRrVEb91+4O PyjxMxHHlXm2IdunF4wwAyUdHwOnzo9ZaVarRr7ilkhV1QgHR9XskP1O0J3Tv7xKAS4k TqHRFzDRQhdFnNBDre+zHAF6eRYrnxSQikiWWPUF3x609LL5vfg2JO/CmpBKMpNC5jYa 1Q3o1w8XipuZhgAl0XuTJ0AN14T4oTGSjT7K9wZLX8fTJgpapohg0am7hK3mlDNCyqKx h4Ls+KYakf/FgPGClY/L8nigxIUEmqynfRdoXVSpnFN/2FhgbC+UUU743eAhOtcaV2gb Fcmg== X-Received: by 10.180.216.38 with SMTP id on6mr6105371wic.15.1426864951474; Fri, 20 Mar 2015 08:22:31 -0700 (PDT) Received: from localhost (cpc71925-newt30-2-0-cust4.19-3.cable.virginm.net. [82.35.188.5]) by mx.google.com with ESMTPSA id jt8sm1336661wid.4.2015.03.20.08.22.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Mar 2015 08:22:30 -0700 (PDT) From: Lorenzo Stoakes To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com, gregkh@linuxfoundation.org Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Lorenzo Stoakes Subject: [PATCH RESEND 2 1/5] staging: sm750fb: Use memset_io instead of memset Date: Fri, 20 Mar 2015 15:22:11 +0000 Message-Id: <1426864935-29350-1-git-send-email-lstoakes@gmail.com> X-Mailer: git-send-email 2.3.3 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 This patch takes into account that cursor->vstart, crtc->vScreen and share->pvMem are pointers to memory-mapped I/O and thus we should use memset_io to make this explicit. In addition, some architectures require special treatment of memory-mapped I/O so the previous code could actually break without this change. This fixes the following sparse warnings:- drivers/staging/sm750fb/sm750.c:489:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:490:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:501:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:502:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:833:5: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:1154:9: warning: incorrect type in argument 1 (different address spaces) Signed-off-by: Lorenzo Stoakes Reviewed-by: Dan Carpenter Tested-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index aa0888c..3e36b6a 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -486,8 +486,8 @@ static int lynxfb_resume(struct pci_dev* pdev) par = info->par; crtc = &par->crtc; cursor = &crtc->cursor; - memset(cursor->vstart, 0x0, cursor->size); - memset(crtc->vScreen,0x0,crtc->vidmem_size); + memset_io(cursor->vstart, 0x0, cursor->size); + memset_io(crtc->vScreen, 0x0, crtc->vidmem_size); lynxfb_ops_set_par(info); fb_set_suspend(info, 0); } @@ -498,8 +498,8 @@ static int lynxfb_resume(struct pci_dev* pdev) par = info->par; crtc = &par->crtc; cursor = &crtc->cursor; - memset(cursor->vstart, 0x0, cursor->size); - memset(crtc->vScreen,0x0,crtc->vidmem_size); + memset_io(cursor->vstart, 0x0, cursor->size); + memset_io(crtc->vScreen, 0x0, crtc->vidmem_size); lynxfb_ops_set_par(info); fb_set_suspend(info, 0); } @@ -830,7 +830,7 @@ static int lynxfb_set_fbinfo(struct fb_info* info,int index) crtc->cursor.share = share; - memset(crtc->cursor.vstart, 0, crtc->cursor.size); + memset_io(crtc->cursor.vstart, 0, crtc->cursor.size); if(!g_hwcursor){ lynxfb_ops.fb_cursor = NULL; crtc->cursor.disable(&crtc->cursor); @@ -1151,7 +1151,7 @@ static int lynxfb_pci_probe(struct pci_dev * pdev, } #endif - memset(share->pvMem,0,share->vidmem_size); + memset_io(share->pvMem, 0, share->vidmem_size); pr_info("sm%3x mmio address = %p\n",share->devid,share->pvReg);