From mboxrd@z Thu Jan 1 00:00:00 1970 From: jbrunet@baylibre.com (Jerome Brunet) Date: Sat, 17 Feb 2018 17:38:23 +0100 Subject: [net-next PATCH v1 1/3] net: stmmac: dwmac-meson8b: simplify clock registration In-Reply-To: <20180217140820.30257-2-martin.blumenstingl@googlemail.com> References: <20180217140820.30257-1-martin.blumenstingl@googlemail.com> <20180217140820.30257-2-martin.blumenstingl@googlemail.com> Message-ID: <1518885503.2883.109.camel@baylibre.com> To: linus-amlogic@lists.infradead.org List-Id: linus-amlogic.lists.infradead.org On Sat, 2018-02-17 at 15:08 +0100, Martin Blumenstingl wrote: > To goal of this patch is to simplify the registration of the RGMII TX > clock (and it's parent clocks). This is achieved by: > - introducing the meson8b_dwmac_register_clk helper-function to remove > code duplication when registering a single clock (this saves a few > lines since we have 4 clocks internally) > - using devm_add_action_or_reset to disable the RGMII TX clock > automatically when needed. This also allows us to re-use the standard > stmmac_pltfr_remove function. > - devm_kasprintf() and devm_kstrdup() are not used anymore to generate > the clock name (these are replaced by a variable on the stack) because > the common clock framework already uses kstrdup() internally. > > No functional changes intended. > > Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Brunet Subject: Re: [net-next PATCH v1 1/3] net: stmmac: dwmac-meson8b: simplify clock registration Date: Sat, 17 Feb 2018 17:38:23 +0100 Message-ID: <1518885503.2883.109.camel@baylibre.com> References: <20180217140820.30257-1-martin.blumenstingl@googlemail.com> <20180217140820.30257-2-martin.blumenstingl@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: khilman@baylibre.com, carlo@caione.org, narmstrong@baylibre.com To: Martin Blumenstingl , linux-amlogic@lists.infradead.org, netdev@vger.kernel.org Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:52392 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbeBQQi0 (ORCPT ); Sat, 17 Feb 2018 11:38:26 -0500 Received: by mail-wm0-f68.google.com with SMTP id t3so8155756wmc.2 for ; Sat, 17 Feb 2018 08:38:26 -0800 (PST) In-Reply-To: <20180217140820.30257-2-martin.blumenstingl@googlemail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, 2018-02-17 at 15:08 +0100, Martin Blumenstingl wrote: > To goal of this patch is to simplify the registration of the RGMII TX > clock (and it's parent clocks). This is achieved by: > - introducing the meson8b_dwmac_register_clk helper-function to remove > code duplication when registering a single clock (this saves a few > lines since we have 4 clocks internally) > - using devm_add_action_or_reset to disable the RGMII TX clock > automatically when needed. This also allows us to re-use the standard > stmmac_pltfr_remove function. > - devm_kasprintf() and devm_kstrdup() are not used anymore to generate > the clock name (these are replaced by a variable on the stack) because > the common clock framework already uses kstrdup() internally. > > No functional changes intended. > > Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet