Re: [PATCH] clk: qcom: include cc device name into error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
>         }
>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux