From patchwork Fri May 25 07:51:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 10426561 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 EFFA2601D5 for ; Fri, 25 May 2018 07:53:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46297289E1 for ; Fri, 25 May 2018 07:53:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A02728ADD; Fri, 25 May 2018 07:53:22 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable 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 7FAF8289E1 for ; Fri, 25 May 2018 07:53:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935800AbeEYHxG (ORCPT ); Fri, 25 May 2018 03:53:06 -0400 Received: from mail-db5eur01on0059.outbound.protection.outlook.com ([104.47.2.59]:18496 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964804AbeEYHwE (ORCPT ); Fri, 25 May 2018 03:52:04 -0400 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=cScEh86C1Oi3pI+Y5sJWePa71RRkTz9CnqmRA8b/UmU=; b=Q8mQ3cMlAnxBpol0Rf7sVuOwUql5mMW9vA+1B6IHLmn6PdJHAbaRe7DcNQiIBmjZ4t8sRILCsQG7oX6Wkg777eHw+URc1SN4aFjUgfqxlawCjwEpweRWx37WpY+G6OPMHnapC3daBCDbdlK0q+AKdmZt/jXGYvIDci2ABI44iaE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; Received: from b29396-OptiPlex-7040.ap.freescale.net (119.31.174.66) by AM0PR04MB4210.eurprd04.prod.outlook.com (2603:10a6:208:66::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Fri, 25 May 2018 07:51:58 +0000 From: Dong Aisheng To: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sboyd@kernel.org, mturquette@baylibre.com, shawnguo@kernel.org, Anson.Huang@nxp.com, ping.bai@nxp.com, linux-imx@nxp.com, Dong Aisheng , Stephen Boyd Subject: [PATCH RESEND V4 7/9] clk: imx: make mux parent strings const Date: Fri, 25 May 2018 15:51:09 +0800 Message-Id: <1527234671-31755-8-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1527234671-31755-1-git-send-email-aisheng.dong@nxp.com> References: <1527234671-31755-1-git-send-email-aisheng.dong@nxp.com> MIME-Version: 1.0 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK0P153CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:203:18::23) To AM0PR04MB4210.eurprd04.prod.outlook.com (2603:10a6:208:66::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4210; X-Microsoft-Exchange-Diagnostics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Fj+sexN/LJHx7nRuRQJTbVIpnJIMi5bNrGhBHV8byJKSqQxu/BwFTuIaIyA6qFv5ErALqtZCYf4u9KJ9MUwQA1rsGr60SAG3uBsp6/RGspXIQHuOeJna77UBy8f2Re6eMpLtNgFxJ2a7RhWOUCyP60UW+6RiGKMKFGESqXqwRwf+WG72oRvzhz4K/1uAASQXnRNz02mdCKN8I5urQ0rjjlh+tiX5QcvhJxG3BvNfSaPlH8KRqFyd60ADhuMGscn60iSl/dGVoOMrqR7BlQWhrN+HsFD31+5egiJzGB8m/hsQeK0z3dXVIGhcmMnzfjcZf3HHuQUADsSPLrXgIP46wsWMARbL7R3V8ldaAlmjVkz0xnMEiXxQqPYeg; 4:5VC+Vztb/ocwuqMdimyLEh9tgjxfwrXgeX7iezXn+VxBZvEAKk9eKmdCcoWlP3R246YBomq1Z2XSPfRugFNQYuy9npiIw1y4V70Gm+hnIpRi9d15E2HEnfLPZVVlPL7SqLe6zgqTG9yTBnHdtKh1E4I2VFpzzgikTTwDF9CoIR1HlgyOnjuZubDurM9NpYa733LXs2MNfPMvxEho7fFuDIxdD2yvCjXVT2P6rXJPkc7HnuZ+eNE5UUgQm5F2tEguGnYIhT+oEeP6V1Hbu1G9ihb9kUWP2CDpsIKkR9TYO0C45JTKUcSomvb/NRGnFjkN 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)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR04MB4210; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4210; X-Forefront-PRVS: 06833C6A67 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(366004)(39860400002)(376002)(346002)(199004)(189003)(54534003)(8936002)(6486002)(50226002)(478600001)(2361001)(3846002)(6116002)(53936002)(2906002)(66066001)(6666003)(52116002)(68736007)(51416003)(76176011)(47776003)(6506007)(386003)(59450400001)(6512007)(81166006)(81156014)(8676002)(25786009)(4326008)(6916009)(956004)(16586007)(7736002)(305945005)(50466002)(105586002)(106356001)(48376002)(86362001)(5660300001)(36756003)(2351001)(97736004)(476003)(26005)(486006)(186003)(54906003)(16526019)(316002)(2616005)(446003)(11346002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4210; H:b29396-OptiPlex-7040.ap.freescale.net; 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-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR04MB4210; 23:KoYCCeCdveo2LsijuorDlhvY9R4ZvkEnyPyOZ3Y0l?= =?us-ascii?Q?j+fC/PCxsgHZVOBOcI4o//o0dYRoBGMw1Zes9m7YG0KGMhuYqWj2Hpp1gG0l?= =?us-ascii?Q?arERNYgLvNGJKEdxsr7fzZ3Qrp0ktX+4OoyQ6BIB8V96iGwOeC+IIODSHUi6?= =?us-ascii?Q?VnK+n/ff2JeUnjpcCyxKUXP33Mz1tbiEhxe7fRkLqFnC5CgWIGev63uEE9IS?= =?us-ascii?Q?LjSBdBd+tFe5lkHrvA4ATUmNDbVNMBM9TzJRJEpi+/g9d0mPiqdS+cHP2XsT?= =?us-ascii?Q?Roo4UTVQuJQ1K0fufsX2yCQQogVBbc6agp5uKimZv7Ae1Ps/j3xu2nboaZzE?= =?us-ascii?Q?/Xwk4L4J101rPnzhLNK8mCv1mgV0IG8AaNC/tIWBF00e1xb7wYPoQ3raOI8m?= =?us-ascii?Q?xZzqSLbJcZ/PJrsclNmNZTYDNr92buZqRznrqtOWrZUsYZK5QVylujXuTq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Microsoft-Antispam-Message-Info: IisCww4QrBdASPlLrEMONebaBsIgfapKrQq4cs0T654dUrcbHbEXC/C+lW7I+yYb0ymzwN8GNQwL1rcxgk/iwa2F1KK39aWs85hPF/FteoQGw290MDovgu2bX7HYVj575JhZLZHyz5+ha8gyjLjXNuAtcvt51AMJ7JPPYRycit9wNnXNgu2Xjx8DhzJWHYYQ X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4210; 6:Qvf0OgefWlCjf3PTHRzzt9pn2ildy8/KC7J+UPCao8U/0JoqprzSlwA5Rnqk41O7lcybwuPbVE+zsEF6U0ZWP0ow9pPxslMWHowJaqzJAvBP2MdiZE20hdA6xjGE8mWtn16XzGNwNjrizCCUZARLUClNBGVESKNbv9kZGENsWz9j2sT8lQKHkvRt3KYc9qbemL/uvE6leVSe1UBrlYDBLIWzdvqcZusFDlG4gGpFtf3kRzSzUm4t5UvMwLWIuD6wm5kxHUln/reh5W1fb+Jk7b/rZZFXgQqRH1wIq0GSNvKKyqxA1x7o++nJUAgKtxxa0Gb/Bfk5gqsSLBBkvw+I1d7CZltbLfe7XlV6eOnkkrG4c5IYQfLIjMlqmiZSGweGKK7HgNPY6SPNXz7etRkBUUbgFGn/YIuxFak7h+Uyl+6PonG/aFh9lVIqYMlJViB/zH7y0C4Jv1PhVgkGqkb15g==; 5:SH1QzGmKujziFUo56MsH848GemaSVCM4SESmOpAVsjWtTXCXazZd0ImjLUlRQ1m+kTKwWZRbb8UkdcTC5ysLwqF0bWDI0fRbeUiLsjzq4bGMg1aM8CXTBvBUMZ9KSAtEf3h+REJa+6cC2hmDo9daeZ0bYZ+c6pM3eaFCTRH8SM8=; 24:AVRAETgGsQqtpD8iArKXBlTmSiIkYHZ9Miv9T35v+mZ/4a+R/7wU6zuVUVg0PpIrYnGX8iaSM4XaNSiHBnM06fJJ470mITEln08O7ZKlUcE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4210; 7:axDfDdyeiVCqY6Qcd1mcB823kv01I16Mb+6DqnYxR5Vu+6nFjHA9p+S8Bb8GkjQtwFQpu48/9AlBKoAptxWsPxISMUxxI8VJbCbHCiauhWas9WTLU1D71Ed7Z7Jat3R5uk/5lBY4Oi390Zzi2Xx/L8PVXPsdING1vcX3SXQjEuC44M32BN3T3RLpg9znReI4XPkTysVVEmrE0q7/Iu+qI8rSv6LkvTVZPFVUjmPT2JjaH5r+7mFM22N+z1TlYByc X-MS-Office365-Filtering-Correlation-Id: 3d397658-985d-4b4b-cbef-08d5c214666b X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2018 07:51:58.1763 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d397658-985d-4b4b-cbef-08d5c214666b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4210 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 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->v3: 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 bc43f68..7fca912 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 *imx_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,