From patchwork Tue Mar 10 09:57:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 5976101 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 A57A19F380 for ; Tue, 10 Mar 2015 09:57:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CBB720131 for ; Tue, 10 Mar 2015 09:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5710920103 for ; Tue, 10 Mar 2015 09:57:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751280AbbCJJ5Q (ORCPT ); Tue, 10 Mar 2015 05:57:16 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:41098 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbbCJJ5P (ORCPT ); Tue, 10 Mar 2015 05:57:15 -0400 Received: by wiwl15 with SMTP id l15so1465961wiw.0; Tue, 10 Mar 2015 02:57:14 -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=0ooP9Th7gBx5+kVIyV6SXb7/w6F1uL+hW2hWwNEi2VU=; b=DJTYNtsT/vzF7BwZ563BXnlac3CWuRllHs864HELwDT0CLLzd83pERDCQKRQQrYCL5 dvW+VgMqjQj8zSxa7qpOcroJCqZK3syw5kvcaggxYtyw1Uwa2Gp/JF4ZtVCqOfUa7dYb lgnKMADhjoilJ4OAMZcLgfIzWaj5LYIwKJoGVSBXLUbMq5N8+S9FtXpzbt+xIz0VdMt8 pHHZEE8s8az/gLCTRaebuhNZgENqMpUjBzTpN1cjckRrdGiuI+e1DT7vKDW04mK4Se4K bUovt2SqrnjZwNwgd7J1X4XKcrN01bE/2s6HFOw/9wnwsJN4SOnY/mHa8Z60bQhFqA0L ce9w== X-Received: by 10.180.184.165 with SMTP id ev5mr14852853wic.72.1425981434094; Tue, 10 Mar 2015 02:57:14 -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 lj13sm817146wic.9.2015.03.10.02.57.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 02:57:13 -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] staging: sm750fb: Cleanup the type of mmio750 Date: Tue, 10 Mar 2015 09:57:06 +0000 Message-Id: <1425981426-20680-1-git-send-email-lstoakes@gmail.com> X-Mailer: git-send-email 2.3.2 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=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 This patch assigns the more appropriate void* type to the mmio750 variable eliminating an unnecessary volatile qualifier in the process. Additionally it updates parameter types as necessary where those parameters interact with mmio750 and removes unnecessary casts. As a consequence, this patch fixes the following sparse warning:- drivers/staging/sm750fb/ddk750_help.c:12:17: warning: incorrect type in assignment (different address spaces) Signed-off-by: Lorenzo Stoakes --- drivers/staging/sm750fb/ddk750_chip.h | 4 +++- drivers/staging/sm750fb/ddk750_help.c | 4 ++-- drivers/staging/sm750fb/ddk750_help.h | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h index 1c78875..d067b06 100644 --- a/drivers/staging/sm750fb/ddk750_chip.h +++ b/drivers/staging/sm750fb/ddk750_chip.h @@ -3,6 +3,8 @@ #define DEFAULT_INPUT_CLOCK 14318181 /* Default reference clock */ #define SM750LE_REVISION_ID (char)0xfe +#include + /* This is all the chips recognized by this library */ typedef enum _logical_chip_type_t { @@ -70,7 +72,7 @@ logical_chip_type_t getChipType(void); unsigned int calcPllValue(unsigned int request,pll_value_t *pll); unsigned int calcPllValue2(unsigned int,pll_value_t *); unsigned int formatPllReg(pll_value_t *pPLL); -void ddk750_set_mmio(volatile unsigned char *,unsigned short,char); +void ddk750_set_mmio(void __iomem *,unsigned short,char); unsigned int ddk750_getVMSize(void); int ddk750_initHw(initchip_param_t *); unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL); diff --git a/drivers/staging/sm750fb/ddk750_help.c b/drivers/staging/sm750fb/ddk750_help.c index cc00d2b..c68ff3b 100644 --- a/drivers/staging/sm750fb/ddk750_help.c +++ b/drivers/staging/sm750fb/ddk750_help.c @@ -2,12 +2,12 @@ //#include "ddk750_chip.h" #include "ddk750_help.h" -volatile unsigned char __iomem * mmio750 = NULL; +void __iomem * mmio750 = NULL; char revId750 = 0; unsigned short devId750 = 0; /* after driver mapped io registers, use this function first */ -void ddk750_set_mmio(volatile unsigned char * addr,unsigned short devId,char revId) +void ddk750_set_mmio(void __iomem * addr,unsigned short devId,char revId) { mmio750 = addr; devId750 = devId; diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h index 4fc93b5..07c8264 100644 --- a/drivers/staging/sm750fb/ddk750_help.h +++ b/drivers/staging/sm750fb/ddk750_help.h @@ -12,14 +12,14 @@ #if 0 /* if 718 big endian turned on,be aware that don't use this driver for general use,only for ppc big-endian */ #warning "big endian on target cpu and enable nature big endian support of 718 capability !" -#define PEEK32(addr) __raw_readl((void __iomem *)(mmio750)+(addr)) -#define POKE32(addr,data) __raw_writel((data),(void __iomem*)(mmio750)+(addr)) +#define PEEK32(addr) __raw_readl(mmio750 + addr) +#define POKE32(addr,data) __raw_writel(data, mmio750 + addr) #else /* software control endianess */ -#define PEEK32(addr) readl((addr)+mmio750) -#define POKE32(addr,data) writel((data),(addr)+mmio750) +#define PEEK32(addr) readl(addr + mmio750) +#define POKE32(addr,data) writel(data, addr + mmio750) #endif -extern volatile unsigned char __iomem * mmio750; +extern void __iomem * mmio750; extern char revId750; extern unsigned short devId750; #else