From: Guenter Roeck <linux@roeck-us.net>
To: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Cc: bjorn.andersson@linaro.org, wim@linux-watchdog.org,
agross@kernel.org, linux-arm-msm@vger.kernel.org,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] watchdog: qcom: remove unnecessary variable from private storage
Date: Tue, 10 Sep 2019 11:08:33 -0700 [thread overview]
Message-ID: <20190910180833.GA25692@roeck-us.net> (raw)
In-Reply-To: <20190906205411.31666-3-jorge.ramirez-ortiz@linaro.org>
On Fri, Sep 06, 2019 at 10:54:11PM +0200, Jorge Ramirez-Ortiz wrote:
> there is no need to continue keeping the clock in private storage.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Good catch.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/qcom-wdt.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
> index 935c78a882a3..e98f5a3d83ea 100644
> --- a/drivers/watchdog/qcom-wdt.c
> +++ b/drivers/watchdog/qcom-wdt.c
> @@ -42,7 +42,6 @@ static const u32 reg_offset_data_kpss[] = {
>
> struct qcom_wdt {
> struct watchdog_device wdd;
> - struct clk *clk;
> unsigned long rate;
> void __iomem *base;
> const u32 *layout;
> @@ -189,6 +188,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
> const u32 *regs;
> u32 percpu_offset;
> int irq, ret;
> + struct clk *clk;
>
> regs = of_device_get_match_data(dev);
> if (!regs) {
> @@ -215,19 +215,18 @@ static int qcom_wdt_probe(struct platform_device *pdev)
> if (IS_ERR(wdt->base))
> return PTR_ERR(wdt->base);
>
> - wdt->clk = devm_clk_get(dev, NULL);
> - if (IS_ERR(wdt->clk)) {
> + clk = devm_clk_get(dev, NULL);
> + if (IS_ERR(clk)) {
> dev_err(dev, "failed to get input clock\n");
> - return PTR_ERR(wdt->clk);
> + return PTR_ERR(clk);
> }
>
> - ret = clk_prepare_enable(wdt->clk);
> + ret = clk_prepare_enable(clk);
> if (ret) {
> dev_err(dev, "failed to setup clock\n");
> return ret;
> }
> - ret = devm_add_action_or_reset(dev, qcom_clk_disable_unprepare,
> - wdt->clk);
> + ret = devm_add_action_or_reset(dev, qcom_clk_disable_unprepare, clk);
> if (ret)
> return ret;
>
> @@ -239,7 +238,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
> * that it would bite before a second elapses it's usefulness is
> * limited. Bail if this is the case.
> */
> - wdt->rate = clk_get_rate(wdt->clk);
> + wdt->rate = clk_get_rate(clk);
> if (wdt->rate == 0 ||
> wdt->rate > 0x10000000U) {
> dev_err(dev, "invalid clock rate\n");
prev parent reply other threads:[~2019-09-10 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 20:54 [PATCH 0/2] qcom_wdt bark irq support Jorge Ramirez-Ortiz
2019-09-06 20:54 ` [PATCH 1/2] watchdog: qcom: support pre-timeout when the bark irq is available Jorge Ramirez-Ortiz
2019-09-10 18:06 ` Guenter Roeck
2019-09-12 7:24 ` Jorge Ramirez-Ortiz, Linaro
2019-09-12 18:34 ` Guenter Roeck
2019-09-06 20:54 ` [PATCH 2/2] watchdog: qcom: remove unnecessary variable from private storage Jorge Ramirez-Ortiz
2019-09-10 18:08 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190910180833.GA25692@roeck-us.net \
--to=linux@roeck-us.net \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=jorge.ramirez-ortiz@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).