public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: qcom: include cc device name into error messages
Date: Mon, 17 Apr 2023 16:38:29 -0700	[thread overview]
Message-ID: <9ce2220fef8a49043240cb94adc0db58.sboyd@kernel.org> (raw)
In-Reply-To: <20230417114659.137535-1-dmitry.baryshkov@linaro.org>

Quoting Dmitry Baryshkov (2023-04-17 04:46:59)
> diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
> index 75f09e6e057e..7dcf818e1dd9 100644
> --- a/drivers/clk/qcom/common.c
> +++ b/drivers/clk/qcom/common.c
> @@ -19,6 +19,7 @@
>  
>  struct qcom_cc {
>         struct qcom_reset_controller reset;
> +       struct device *dev;
>         struct clk_regmap **rclks;
>         size_t num_rclks;
>  };
> @@ -227,7 +228,7 @@ static struct clk_hw *qcom_cc_clk_hw_get(struct of_phandle_args *clkspec,
>         unsigned int idx = clkspec->args[0];
>  
>         if (idx >= cc->num_rclks) {
> -               pr_err("%s: invalid index %u\n", __func__, idx);
> +               dev_err(cc->dev, "%s: requested invalid clock index %u\n", __func__, idx);

Maybe also add the regmap name if it is set? Sometimes we have multiple
regmaps for one clk controller device.

And can you remove the function name at the same time? It will be pretty
easy to pinpoint this function now with the device name in it.

>                 return ERR_PTR(-EINVAL);
>         }
>

      reply	other threads:[~2023-04-17 23:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 11:46 [PATCH] clk: qcom: include cc device name into error messages Dmitry Baryshkov
2023-04-17 23:38 ` Stephen Boyd [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=9ce2220fef8a49043240cb94adc0db58.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_tdas@quicinc.com \
    /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