public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Evan Green <evgreen@chromium.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Subject: Re: [PATCH] soc: qcom: llcc: Name regmaps to avoid collisions
Date: Tue, 08 Oct 2019 15:57:43 -0700	[thread overview]
Message-ID: <5d9d1468.1c69fb81.1bb45.193a@mx.google.com> (raw)
In-Reply-To: <CAE=gft4Rp_GmoVc1iRFH3tiu_taC=i72_Y+xXzk6eU6J80YhQw@mail.gmail.com>

Quoting Evan Green (2019-10-07 14:20:47)
> On Fri, Oct 4, 2019 at 4:31 PM Stephen Boyd <swboyd@chromium.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@codeaurora.org>
> > Cc: Evan Green <evgreen@chromium.org>
> > Signed-off-by: Stephen Boyd <swboyd@chromium.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?

And have a followup patch to move it to a static local? Sounds ok to me
if you prefer.


      reply	other threads:[~2019-10-08 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 23:31 [PATCH] soc: qcom: llcc: Name regmaps to avoid collisions Stephen Boyd
2019-10-07 21:20 ` Evan Green
2019-10-08 22:57   ` 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=5d9d1468.1c69fb81.1bb45.193a@mx.google.com \
    --to=swboyd@chromium.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=evgreen@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vnkgutta@codeaurora.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