linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Sean Paul <sean@poorly.run>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	Sean Paul <seanpaul@chromium.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Rob Clark <robdclark@chromium.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [PATCH] drm/msm: Fix uninitialized var usage in dsi_phy_28nm_8960.c
Date: Fri, 7 May 2021 10:02:49 -0700	[thread overview]
Message-ID: <CAF6AEGud9xdEwDpADN3SpA+JMUCYtRL6UEaGLiq49vy5sqwa7A@mail.gmail.com> (raw)
In-Reply-To: <CAF6AEGutiv+0QMNo6QQ8jSDYwxhJ5+62_TZ5zsiT_WxgDm+JiA@mail.gmail.com>

On Fri, May 7, 2021 at 9:43 AM Rob Clark <robdclark@gmail.com> wrote:
>
> On Fri, May 7, 2021 at 7:16 AM Sean Paul <sean@poorly.run> wrote:
> >
> > From: Sean Paul <seanpaul@chromium.org>
> >
> > This patch fixes the following error:
> >
> > drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c:425:11: error: variable 'parent_name' is uninitialized when used here
> > [-Werror,-Wuninitialized]
> >         snprintf(parent_name, 32, "dsi%dvco_clk", pll_28nm->phy->id);
> >                  ^~~~~~~~~~~
> > drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c:385:30:
> > note: initialize the variable 'parent_name' to silence this warning
> >         char *clk_name, *parent_name, *vco_name;
> >                                     ^
> >                                      = NULL
> > 1 error generated.
> > make[5]: ***
> > [scripts/Makefile.build:279: drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.o] Error 1
> >
> > It looks like the allocation was inadvertently deleted.
> >
> > Fixes: 5d13459650b3 ("drm/msm/dsi: push provided clocks handling into a generic code")
> >
> > Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Cc: Stephen Boyd <swboyd@chromium.org>
> > Cc: Abhinav Kumar <abhinavk@codeaurora.org>
> > Cc: Rob Clark <robdclark@chromium.org>
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
>
> Thanks, I'll pick this up for next -fixes pr

Oh, sorry, I lied, I already had the same fix from Dmitry

BR,
-R

>
> > ---
> >  drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
> > index 582b1428f971..86e40a0d41a3 100644
> > --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
> > +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c
> > @@ -405,6 +405,10 @@ static int pll_28nm_register(struct dsi_pll_28nm *pll_28nm, struct clk_hw **prov
> >         if (!vco_name)
> >                 return -ENOMEM;
> >
> > +       parent_name = devm_kzalloc(dev, 32, GFP_KERNEL);
> > +       if (!parent_name)
> > +               return -ENOMEM;
> > +
> >         clk_name = devm_kzalloc(dev, 32, GFP_KERNEL);
> >         if (!clk_name)
> >                 return -ENOMEM;
> > --
> > Sean Paul, Software Engineer, Google / Chromium OS
> >

      reply	other threads:[~2021-05-07 16:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 14:16 Sean Paul
2021-05-07 16:43 ` Rob Clark
2021-05-07 17:02   ` Rob Clark [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=CAF6AEGud9xdEwDpADN3SpA+JMUCYtRL6UEaGLiq49vy5sqwa7A@mail.gmail.com \
    --to=robdclark@gmail.com \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robdclark@chromium.org \
    --cc=sean@poorly.run \
    --cc=seanpaul@chromium.org \
    --cc=swboyd@chromium.org \
    --subject='Re: [PATCH] drm/msm: Fix uninitialized var usage in dsi_phy_28nm_8960.c' \
    /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

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).