From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbdBFUYn (ORCPT ); Mon, 6 Feb 2017 15:24:43 -0500 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:25580 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752441AbdBFUYl (ORCPT ); Mon, 6 Feb 2017 15:24:41 -0500 X-ME-Helo: [127.0.0.1] X-ME-Date: Mon, 06 Feb 2017 21:24:39 +0100 X-ME-IP: 92.140.172.61 To: antonynpavlov@gmail.com, antonynpavlov@gmail.com, albeu@free.fr, hackpascal@gmail.com, Stephen Boyd Cc: linux-mips@linux-mips.org, "linux-kernel@vger.kernel.org" , Kernel Janitors From: Marion & Christophe JAILLET Subject: [RFC] mips: ath79: clock:- Unmap region obtained by of_iomap Message-ID: <5fac1423-00e9-e5b2-161d-5ddc2f47bfc9@wanadoo.fr> Date: Mon, 6 Feb 2017 21:24:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 170206-3, 06/02/2017), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I had a patch similar to: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/arch/mips/ath79/clock.c?id=b3d91db3f71d5f70ea60d900425a3f96aeb3d065 in my own tree. However, mine was slightly different and was also freeing the memory mapping in the normal case, when 'pll_base' seems to be no more useful. Best regards, CJ =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index c1102cffe37d..b5d81acb2d7a 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -508,9 +508,11 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np) ar9330_clk_init(ref_clk, pll_base); else { pr_err("%s: could not find any appropriate clk_init()\n", dnfn); - goto err_clk; + goto err_unmap; } + iounmap(pll_base); + if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) { pr_err("%s: could not register clk provider\n", dnfn); goto err_clk; @@ -518,6 +520,8 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np) return; +err_unmap: + iounmap(pll_base); err_clk: clk_put(ref_clk); From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marion & Christophe JAILLET Date: Mon, 06 Feb 2017 20:24:35 +0000 Subject: [RFC] mips: ath79: clock:- Unmap region obtained by of_iomap Message-Id: <5fac1423-00e9-e5b2-161d-5ddc2f47bfc9@wanadoo.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: antonynpavlov@gmail.comantonynpavlov@gmail.com, albeu@free.fr, hackpascal@gmail.com, Stephen Boyd Cc: linux-mips@linux-mips.org, "linux-kernel@vger.kernel.org" , Kernel Janitors Hi, I had a patch similar to: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/arc= h/mips/ath79/clock.c?id=B3d91db3f71d5f70ea60d900425a3f96aeb3d065 in my own tree. However, mine was slightly different and was also freeing the memory=20 mapping in the normal case, when 'pll_base' seems to be no more useful. Best regards, CJ =3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D= +=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+=3D+ diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index c1102cffe37d..b5d81acb2d7a 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -508,9 +508,11 @@ static void __init ath79_clocks_init_dt_ng(struct=20 device_node *np) ar9330_clk_init(ref_clk, pll_base); else { pr_err("%s: could not find any appropriate clk_init()\n", dnfn); - goto err_clk; + goto err_unmap; } + iounmap(pll_base); + if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) { pr_err("%s: could not register clk provider\n", dnfn); goto err_clk; @@ -518,6 +520,8 @@ static void __init ath79_clocks_init_dt_ng(struct=20 device_node *np) return; +err_unmap: + iounmap(pll_base); err_clk: clk_put(ref_clk); -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp09.smtpout.orange.fr ([80.12.242.131]:29996 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990686AbdBFUYokY9xc (ORCPT ); Mon, 6 Feb 2017 21:24:44 +0100 From: Marion & Christophe JAILLET Subject: [RFC] mips: ath79: clock:- Unmap region obtained by of_iomap Message-ID: <5fac1423-00e9-e5b2-161d-5ddc2f47bfc9@wanadoo.fr> Date: Mon, 6 Feb 2017 21:24:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: antonynpavlov@gmail.comantonynpavlov@gmail.com, albeu@free.fr, hackpascal@gmail.com, Stephen Boyd Cc: linux-mips@linux-mips.org, "linux-kernel@vger.kernel.org" , Kernel Janitors Message-ID: <20170206202435.5T4oLrZl5aaV574WHeSb8FezWKDm6klaHEppFt5-0jU@z> Hi, I had a patch similar to: https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/arch/mips/ath79/clock.c?id=b3d91db3f71d5f70ea60d900425a3f96aeb3d065 in my own tree. However, mine was slightly different and was also freeing the memory mapping in the normal case, when 'pll_base' seems to be no more useful. Best regards, CJ =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index c1102cffe37d..b5d81acb2d7a 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c @@ -508,9 +508,11 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np) ar9330_clk_init(ref_clk, pll_base); else { pr_err("%s: could not find any appropriate clk_init()\n", dnfn); - goto err_clk; + goto err_unmap; } + iounmap(pll_base); + if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) { pr_err("%s: could not register clk provider\n", dnfn); goto err_clk; @@ -518,6 +520,8 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np) return; +err_unmap: + iounmap(pll_base); err_clk: clk_put(ref_clk);