From patchwork Tue Nov 8 22:47:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9418201 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2FA1F6022E for ; Tue, 8 Nov 2016 22:48:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22B0F28ACC for ; Tue, 8 Nov 2016 22:48:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15FFB28BAC; Tue, 8 Nov 2016 22:48:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEBAE28ACC for ; Tue, 8 Nov 2016 22:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752226AbcKHWsA (ORCPT ); Tue, 8 Nov 2016 17:48:00 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:57934 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbcKHWr6 (ORCPT ); Tue, 8 Nov 2016 17:47:58 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0E169612C1; Tue, 8 Nov 2016 22:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478645278; bh=IkDmieXLCR3y4PGdQ/BFUhZPL/zaM4/pS4oxX0Jy714=; h=From:To:Cc:Subject:Date:From; b=k3kgt+Ka+3oObFNwculNfQOr0xM+DEviv6IdFuh4atjVtdqoGv04iMBsig/gvSR+w p7XJZFguuIOsC/GXNNUCK4aLeR00XacBbD+XKUbUFjFgS4P34oGW+52mbz8lY3fraU 8eY8q9DhGZQwfecScOJfTMK1mt1xRLLtpz6NawuE= Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4294E612C1; Tue, 8 Nov 2016 22:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1478645277; bh=IkDmieXLCR3y4PGdQ/BFUhZPL/zaM4/pS4oxX0Jy714=; h=From:To:Cc:Subject:Date:From; b=EnBRJwiSItOYksfyTW3kgOMlf4hXRmYKhZzWdSb0bNRw+puvU++Pbu4Vbsh30MAdp nVo4yaGiPEEGdK6n2B1Ay3NiQtFR3dPeD9ypfdYpKq2ZEQX3F8aac1Q7TL1pqAz/fG c3Y3WNZJE6vb2XJj4ovsyiDwHmwwbAtaozfLcSrQ= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 4294E612C1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Robert Jarzmik Subject: [PATCH] clk: pxa: Use __iomem properly and staticize lock variable Date: Tue, 8 Nov 2016 14:47:56 -0800 Message-Id: <20161108224756.25842-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.10.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This function is passed an __iomem pointer but we use a u32 pointer instead which makes checkers like spare complain. Furthermore, "lock" is a pretty poor variable name for a string that will go into lockdep reports and the symbol isn't marked static. Cleanup all this. Cc: Robert Jarzmik Signed-off-by: Stephen Boyd Acked-by: Robert Jarzmik --- drivers/clk/pxa/clk-pxa.c | 7 ++++--- drivers/clk/pxa/clk-pxa.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/clk/pxa/clk-pxa.c b/drivers/clk/pxa/clk-pxa.c index 50fb9d0ea58d..29fc71617bad 100644 --- a/drivers/clk/pxa/clk-pxa.c +++ b/drivers/clk/pxa/clk-pxa.c @@ -38,7 +38,7 @@ #define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2) #define MDREFR_DRI_MASK 0xFFF -DEFINE_SPINLOCK(lock); +static DEFINE_SPINLOCK(pxa_clk_lock); static struct clk *pxa_clocks[CLK_MAX]; static struct clk_onecell_data onecell_data = { @@ -109,7 +109,7 @@ int __init clk_pxa_cken_init(const struct desc_clk_cken *clks, int nb_clks) pxa_clk->lp = clks[i].lp; pxa_clk->hp = clks[i].hp; pxa_clk->gate = clks[i].gate; - pxa_clk->gate.lock = &lock; + pxa_clk->gate.lock = &pxa_clk_lock; clk = clk_register_composite(NULL, clks[i].name, clks[i].parent_names, 2, &pxa_clk->hw, &cken_mux_ops, @@ -155,7 +155,8 @@ void pxa2xx_core_turbo_switch(bool on) } void pxa2xx_cpll_change(struct pxa2xx_freq *freq, - u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, u32 *cccr) + u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr, + void __iomem *cccr) { unsigned int clkcfg = freq->clkcfg; unsigned int unused, preset_mdrefr, postset_mdrefr; diff --git a/drivers/clk/pxa/clk-pxa.h b/drivers/clk/pxa/clk-pxa.h index 58abfa816d53..2b90c5917b32 100644 --- a/drivers/clk/pxa/clk-pxa.h +++ b/drivers/clk/pxa/clk-pxa.h @@ -155,8 +155,8 @@ void clk_pxa_dt_common_init(struct device_node *np); void pxa2xx_core_turbo_switch(bool on); void pxa2xx_cpll_change(struct pxa2xx_freq *freq, - u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, - u32 *cccr); + u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr, + void __iomem *cccr); int pxa2xx_determine_rate(struct clk_rate_request *req, struct pxa2xx_freq *freqs, int nb_freqs);