[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE=gft4Rp_GmoVc1iRFH3tiu_taC=i72_Y+xXzk6eU6J80YhQw@mail.gmail.com>
Date: Mon, 7 Oct 2019 14:20:47 -0700
From: Evan Green <evgreen@...omium.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Venkata Narendra Kumar Gutta <vnkgutta@...eaurora.org>
Subject: Re: [PATCH] soc: qcom: llcc: Name regmaps to avoid collisions
On Fri, Oct 4, 2019 at 4:31 PM Stephen Boyd <swboyd@...omium.org> wrote:
>
> We'll end up with debugfs collisions if we don't give names to the
> regmaps created inside this driver. Copy the template config over into
> this function and give the regmap the same name as the resource name.
>
> Fixes: 7f9c136216c7 ("soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC)")
> Cc: Venkata Narendra Kumar Gutta <vnkgutta@...eaurora.org>
> Cc: Evan Green <evgreen@...omium.org>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> ---
> drivers/soc/qcom/llcc-slice.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c
> index 9090ea12eaf3..aa342938c403 100644
> --- a/drivers/soc/qcom/llcc-slice.c
> +++ b/drivers/soc/qcom/llcc-slice.c
> @@ -48,13 +48,6 @@
>
> static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER;
>
> -static const struct regmap_config llcc_regmap_config = {
> - .reg_bits = 32,
> - .reg_stride = 4,
> - .val_bits = 32,
> - .fast_io = true,
> -};
> -
> /**
> * llcc_slice_getd - get llcc slice descriptor
> * @uid: usecase_id for the client
> @@ -314,6 +307,12 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev,
> {
> struct resource *res;
> void __iomem *base;
> + static struct regmap_config llcc_regmap_config = {
> + .reg_bits = 32,
> + .reg_stride = 4,
> + .val_bits = 32,
> + .fast_io = true,
> + };
Why did you move this to be a static local? I think it works, but it
makes it look like this is a local variable that's possibly used out
of scope. Maybe leave it as a global?
Powered by blists - more mailing lists