From patchwork Sat Nov 10 14:34:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10677201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B66B14DB for ; Sat, 10 Nov 2018 14:36:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 281012CF39 for ; Sat, 10 Nov 2018 14:36:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AFB12D502; Sat, 10 Nov 2018 14:36:32 +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=-3.4 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C2932CF39 for ; Sat, 10 Nov 2018 14:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A8G2Adj8yiMZ3OOLd+Zmqer6ifbUGUH13BeC6pGWqLE=; b=r6HAtNqCEJMhTJ h0IqJzBuq4lOi9GBsZbNjfDsQnQNp2FVE/U818y6h6AQSnVJVbHsXvXeS0uL3NBPL4vX8wl7WiOG7 ZyHB6jiYmBWqymSS0EFmFDeP30zAR7gYKfc58T9YYscBPaGMAJrn9B2z7ZUxMtlLIUu+lRdcu9JBt JfoutwkEEx6JEAfIpNo/Gxvn+REdQrGuDvjjYXLESVe9tcQldJAEiUindK1/HiK2HpHcbznV57hVo uFysrFJYxmy13VbnHEVMrzoIFBP8lNz9tqyL7zwLHgixj3oqdOk97j8pZwrhVgMzvgFtSPn3sLrwv XloyDarv/mxwTlo+Gp7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLUN1-0001pF-Fa; Sat, 10 Nov 2018 14:36:19 +0000 Received: from mail-db5eur03on0612.outbound.protection.outlook.com ([2a01:111:f400:fe0a::612] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLULq-0007U2-NG for linux-arm-kernel@lists.infradead.org; Sat, 10 Nov 2018 14:35:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GyjwAL1yIXsoXrVWf7+N2WLsI7mvd+BVE8pT37n19oI=; b=TD0tBUyqLj3Fl11Ji3PbUbbHY7FFk/qvw6KxAFvBTxE2dXFHZ7Oi5JUd7jBDBe7FUgozaJF7u9bOkKNGkY8N4SkQyAQKsgGpIrDDPiR9pO3em6OaAluocRZoOP6s1mginsozgcFOp+Tzh+wvsXx7uqorsPXx8uP9lk0KCPCGFgE= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB4402.eurprd04.prod.outlook.com (52.135.148.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Sat, 10 Nov 2018 14:34:43 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::797a:f972:9281:6d10]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::797a:f972:9281:6d10%2]) with mapi id 15.20.1294.039; Sat, 10 Nov 2018 14:34:43 +0000 From: "A.s. Dong" To: "linux-clk@vger.kernel.org" Subject: [PATCH V5 7/9] clk: imx: make mux parent strings const Thread-Topic: [PATCH V5 7/9] clk: imx: make mux parent strings const Thread-Index: AQHUeQKFB61LRb48akiUiqE0r4Bq0g== Date: Sat, 10 Nov 2018 14:34:43 +0000 Message-ID: <1541860165-401-8-git-send-email-aisheng.dong@nxp.com> References: <1541860165-401-1-git-send-email-aisheng.dong@nxp.com> In-Reply-To: <1541860165-401-1-git-send-email-aisheng.dong@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::20) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:66::21) authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR04MB4402; 6:5ZDGgpAiDID65ptOsNIR67Tiahp2WJQUlb9G03Ky5twst038xcZE1illB15vRM0kAZjpIvg3IISIKJKS17Ndf9zvVuPbuAJ9pZNiLc8wrE0ShjHKTVBAvHLgN2ozfp5EZMwHklPmQRyNosOdn9LlKWmjNkq6G9zMok0Q/v85v1Dxuzxt2Mv3XnlShThRRTFEmDPPBAoLvUJFm/BX5Umj5tiobz+TnbcJLcHKS17nnzECymcqoTVmrG4SXIbq1TmzcdZgudElcUsvKXwBkWKES4P5MpkCnuNFbgjx0UE7BRJ6bu2lwZuGiWTvuZpN4nUPdQ+o/+Wv7cmicmBDC9/4f4ecYoggzz/heW/aZunLGG5tvcA6fm6AdabXwGXb7HQOJ+Xd/YPRzUkyrGDPdvLC7RQKGTyslMK1V6w41ZhzLH+XPK8FMAdDl50wC5+BZ39az0eMQgPyJQJ70O6eUBjKfg==; 5:gBVX/AnvwIOrnnEjp9fLQsKXJOF5SNzr/D753ipRnzl/mou+OGzsdPiDsLtMUww+bjeHjssugRE0YC18n6JRoLJVvmbikgd8UtFFs1aueKYjVZaOkihHGrxVTylHFK7DbYcd6qGRuM51p5iSGaDh0VgiPtoV6VddplA1/RQiINc=; 7:oyDydXPuTw+hLuko5MwGhTh2pRhL9/5phj0JQjI6qPwPpn5S1c47T20p9eUR7uHjPZwIiCq6IFqh4SmAJW+ZkGjJLVYXDQzCaPYAmRtAu34RtSt1AuYSVS1Hhzx7cXqQV0Z8xUvUS+1mGXnCvRrMTA== x-ms-office365-filtering-correlation-id: 88d0808e-9006-44bf-48fc-08d64719a787 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390040)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4402; x-ms-traffictypediagnostic: AM0PR04MB4402: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231382)(944501410)(52105095)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:AM0PR04MB4402; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4402; x-forefront-prvs: 0852EB6797 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(346002)(376002)(136003)(199004)(189003)(54534003)(6512007)(478600001)(102836004)(36756003)(14444005)(4326008)(105586002)(256004)(76176011)(97736004)(71200400001)(71190400001)(106356001)(14454004)(386003)(6506007)(52116002)(2351001)(5660300001)(25786009)(5640700003)(2906002)(81166006)(81156014)(66066001)(6436002)(26005)(186003)(6916009)(8676002)(54906003)(8936002)(3846002)(305945005)(486006)(7736002)(6116002)(2900100001)(446003)(11346002)(68736007)(53936002)(476003)(2501003)(99286004)(6486002)(50226002)(2616005)(316002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4402; H:AM0PR04MB4211.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: +9jBX2nBU98g+lH581cHAu6n2ARTQCKAagnR990bbG4Tg8rSaWvN2CcPkSOT8Z6xI34aorfGgy7Oe7/jqsOyd7Y9l7SfqBLhPFBgFmk4BwrNKhVpBBQ0xv3FyH8oLtvLL6Wybrr1H7TPkdS3/RVk0WeUI+jIUbV8neuVBaUY2UoqgLginmTPSUB7Kx6WP67fGnFwZ9HU78ajzWCU1auuLpuWixcuDwHP6zP3KeCMODS85Ix2sLnK6Cbn43oOORHRjq8Q++nYIQ1VMykMQrOEvjh4zt92FOZgBUmM2K2Ezn5EzNedso9pRJonkCi5lbjrTjNrz+hNoIWP7I9D+rDgJcy+cS7p5re422Z5ybDELQU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88d0808e-9006-44bf-48fc-08d64719a787 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2018 14:34:43.4122 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4402 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181110_063506_900739_BCE1BBB7 X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Jacky Bai , Anson Huang , "sboyd@kernel.org" , "mturquette@baylibre.com" , Stephen Boyd , "linux-kernel@vger.kernel.org" , dl-linux-imx , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As the commit 2893c379461a ("clk: make strings in parent name arrays const"), let's make the parent strings const, otherwise we may meet the following warning when compiling: drivers/clk/imx/clk-imx7ulp.c: In function 'imx7ulp_clocks_init': drivers/clk/imx/clk-imx7ulp.c:73:35: warning: passing argument 5 of 'imx_clk_mux_flags' discards 'const' qualifier from pointer target type clks[IMX7ULP_CLK_APLL_PRE_SEL] = imx_clk_mux_flags("apll_pre_sel", base + 0x508, 0, 1, pll_pre_sels, ARRAY_SIZE(pll_pre_sels), CLK_SET_PARENT_GATE); ^ In file included from drivers/clk/imx/clk-imx7ulp.c:23:0: drivers/clk/imx/clk.h:200:27: note: expected 'const char **' but argument is of type 'const char * const*' ... Cc: Stephen Boyd Cc: Michael Turquette Cc: Shawn Guo Signed-off-by: Dong Aisheng --- ChangeLog: v1->v4: no changes --- drivers/clk/imx/clk-busy.c | 2 +- drivers/clk/imx/clk-fixup-mux.c | 2 +- drivers/clk/imx/clk.h | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/clk/imx/clk-busy.c b/drivers/clk/imx/clk-busy.c index 9903652..e695622 100644 --- a/drivers/clk/imx/clk-busy.c +++ b/drivers/clk/imx/clk-busy.c @@ -154,7 +154,7 @@ static const struct clk_ops clk_busy_mux_ops = { struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, u8 width, void __iomem *busy_reg, u8 busy_shift, - const char **parent_names, int num_parents) + const char * const *parent_names, int num_parents) { struct clk_busy_mux *busy; struct clk *clk; diff --git a/drivers/clk/imx/clk-fixup-mux.c b/drivers/clk/imx/clk-fixup-mux.c index c9b327e..44817c1 100644 --- a/drivers/clk/imx/clk-fixup-mux.c +++ b/drivers/clk/imx/clk-fixup-mux.c @@ -70,7 +70,7 @@ static const struct clk_ops clk_fixup_mux_ops = { }; struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parents, + u8 shift, u8 width, const char * const *parents, int num_parents, void (*fixup)(u32 *val)) { struct clk_fixup_mux *fixup_mux; diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 55a6434..290d4b2 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -69,7 +69,7 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name, struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, u8 width, void __iomem *busy_reg, u8 busy_shift, - const char **parent_names, int num_parents); + const char * const *parent_names, int num_parents); struct clk_hw *imx7ulp_clk_composite(const char *name, const char * const *parent_names, @@ -82,7 +82,7 @@ struct clk *imx_clk_fixup_divider(const char *name, const char *parent, void (*fixup)(u32 *val)); struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parents, + u8 shift, u8 width, const char * const *parents, int num_parents, void (*fixup)(u32 *val)); static inline struct clk *imx_clk_fixed(const char *name, int rate) @@ -91,7 +91,8 @@ static inline struct clk *imx_clk_fixed(const char *name, int rate) } static inline struct clk *imx_clk_mux_ldb(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parents, int num_parents) + u8 shift, u8 width, const char * const *parents, + int num_parents) { return clk_register_mux(NULL, name, parents, num_parents, CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, reg, @@ -204,7 +205,8 @@ static inline struct clk *imx_clk_gate4(const char *name, const char *parent, } static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parents, int num_parents) + u8 shift, u8 width, const char * const *parents, + int num_parents) { return clk_register_mux(NULL, name, parents, num_parents, CLK_SET_RATE_NO_REPARENT, reg, shift, @@ -212,7 +214,8 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg, } static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parents, int num_parents) + u8 shift, u8 width, const char * const *parents, + int num_parents) { return clk_register_mux(NULL, name, parents, num_parents, CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE, @@ -220,8 +223,9 @@ static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg, } static inline struct clk *imx_clk_mux_flags(const char *name, - void __iomem *reg, u8 shift, u8 width, const char **parents, - int num_parents, unsigned long flags) + void __iomem *reg, u8 shift, u8 width, + const char * const *parents, int num_parents, + unsigned long flags) { return clk_register_mux(NULL, name, parents, num_parents, flags | CLK_SET_RATE_NO_REPARENT, reg, shift, width, 0,