All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Marijn Suijten <marijn.suijten@somainline.org>
Cc: phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Martin Botka <martin.botka@somainline.org>,
	Jami Kettunen <jami.kettunen@somainline.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	Rajeev Nandan <quic_rajeevny@quicinc.com>,
	Vladimir Lypak <vladimir.lypak@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Jonathan Marek <jonathan@marek.ca>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Subject: Re: [PATCH v2 03/11] clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw()
Date: Thu, 09 Jun 2022 15:12:09 -0700	[thread overview]
Message-ID: <20220609221211.684C1C34114@smtp.kernel.org> (raw)
In-Reply-To: <CAA8EJpomtbN0+ocD2pRbkYriUY4D9OnjgoFzL9qNHhPm3Uz5cQ@mail.gmail.com>

Quoting Dmitry Baryshkov (2022-06-02 03:20:19)
> On Thu, 2 Jun 2022 at 01:07, Marijn Suijten
> <marijn.suijten@somainline.org> wrote:
> > diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
> > index 54942d758ee6..fabb98d0cdb2 100644
> > --- a/drivers/clk/clk-fixed-factor.c
> > +++ b/drivers/clk/clk-fixed-factor.c
> > @@ -78,7 +78,8 @@ static void devm_clk_hw_register_fixed_factor_release(struct device *dev, void *
> >
> >  static struct clk_hw *
> >  __clk_hw_register_fixed_factor(struct device *dev, struct device_node *np,
> > -               const char *name, const char *parent_name, int index,
> > +               const char *name, const char *parent_name,
> > +               const struct clk_hw *parent_hw, int index,
> >                 unsigned long flags, unsigned int mult, unsigned int div,
> >                 bool devm)
> >  {
> > @@ -108,7 +109,9 @@ __clk_hw_register_fixed_factor(struct device *dev, struct device_node *np,
> >         init.name = name;
> >         init.ops = &clk_fixed_factor_ops;
> >         init.flags = flags;
> > -       if (parent_name)
> > +       if (parent_hw)
> > +               init.parent_hws = &parent_hw;
> > +       else if (parent_name)
> >                 init.parent_names = &parent_name;
> 
> If you change the order of if clauses, you won't have to introduce
> unnecessary changes.

Indeed, please do that.

> 
> >         else
> >                 init.parent_data = &pdata;
> > @@ -148,17 +151,50 @@ struct clk_hw *devm_clk_hw_register_fixed_factor_index(struct device *dev,
> >                 const char *name, unsigned int index, unsigned long flags,
> >                 unsigned int mult, unsigned int div)
> >  {
> > -       return __clk_hw_register_fixed_factor(dev, NULL, name, NULL, index,
> > -                                             flags, mult, div, true);
> > +       return __clk_hw_register_fixed_factor(dev, NULL, name, NULL, NULL,
> > +                                             index, flags, mult, div, true);
> 
> Here (and several times later) you are inserting an argument and then
> moving arguments to the next line. My slight preference would be to
> just insert the arg (and maybe break the line if it gets too long) w/o
> touching the next lines.

I'd just add the argument at the end because when it is added in the
middle it makes the diff more difficult to read.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Marijn Suijten <marijn.suijten@somainline.org>
Cc: freedreno@lists.freedesktop.org,
	Jonathan Marek <jonathan@marek.ca>, Arnd Bergmann <arnd@arndb.de>,
	Jami Kettunen <jami.kettunen@somainline.org>,
	Rajeev Nandan <quic_rajeevny@quicinc.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Vladimir Lypak <vladimir.lypak@gmail.com>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	David Airlie <airlied@linux.ie>,
	Martin Botka <martin.botka@somainline.org>,
	~postmarketos/upstreaming@lists.sr.ht,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@somainline.org>,
	phone-devel@vger.kernel.org, Sean Paul <sean@poorly.run>,
	linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 03/11] clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw()
Date: Thu, 09 Jun 2022 15:12:09 -0700	[thread overview]
Message-ID: <20220609221211.684C1C34114@smtp.kernel.org> (raw)
In-Reply-To: <CAA8EJpomtbN0+ocD2pRbkYriUY4D9OnjgoFzL9qNHhPm3Uz5cQ@mail.gmail.com>

Quoting Dmitry Baryshkov (2022-06-02 03:20:19)
> On Thu, 2 Jun 2022 at 01:07, Marijn Suijten
> <marijn.suijten@somainline.org> wrote:
> > diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
> > index 54942d758ee6..fabb98d0cdb2 100644
> > --- a/drivers/clk/clk-fixed-factor.c
> > +++ b/drivers/clk/clk-fixed-factor.c
> > @@ -78,7 +78,8 @@ static void devm_clk_hw_register_fixed_factor_release(struct device *dev, void *
> >
> >  static struct clk_hw *
> >  __clk_hw_register_fixed_factor(struct device *dev, struct device_node *np,
> > -               const char *name, const char *parent_name, int index,
> > +               const char *name, const char *parent_name,
> > +               const struct clk_hw *parent_hw, int index,
> >                 unsigned long flags, unsigned int mult, unsigned int div,
> >                 bool devm)
> >  {
> > @@ -108,7 +109,9 @@ __clk_hw_register_fixed_factor(struct device *dev, struct device_node *np,
> >         init.name = name;
> >         init.ops = &clk_fixed_factor_ops;
> >         init.flags = flags;
> > -       if (parent_name)
> > +       if (parent_hw)
> > +               init.parent_hws = &parent_hw;
> > +       else if (parent_name)
> >                 init.parent_names = &parent_name;
> 
> If you change the order of if clauses, you won't have to introduce
> unnecessary changes.

Indeed, please do that.

> 
> >         else
> >                 init.parent_data = &pdata;
> > @@ -148,17 +151,50 @@ struct clk_hw *devm_clk_hw_register_fixed_factor_index(struct device *dev,
> >                 const char *name, unsigned int index, unsigned long flags,
> >                 unsigned int mult, unsigned int div)
> >  {
> > -       return __clk_hw_register_fixed_factor(dev, NULL, name, NULL, index,
> > -                                             flags, mult, div, true);
> > +       return __clk_hw_register_fixed_factor(dev, NULL, name, NULL, NULL,
> > +                                             index, flags, mult, div, true);
> 
> Here (and several times later) you are inserting an argument and then
> moving arguments to the next line. My slight preference would be to
> just insert the arg (and maybe break the line if it gets too long) w/o
> touching the next lines.

I'd just add the argument at the end because when it is added in the
middle it makes the diff more difficult to read.

  reply	other threads:[~2022-06-09 22:12 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 22:07 [PATCH v2 00/11] drm/msm/dsi_phy: Replace parent names with clk_hw pointers Marijn Suijten
2022-06-01 22:07 ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 01/11] clk: divider: Introduce devm_clk_hw_register_divider_parent_hw() Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02 10:14   ` Dmitry Baryshkov
2022-06-02 10:14     ` Dmitry Baryshkov
2022-06-01 22:07 ` [PATCH v2 02/11] clk: mux: Introduce devm_clk_hw_register_mux_parent_hws() Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02 10:15   ` Dmitry Baryshkov
2022-06-02 10:15     ` Dmitry Baryshkov
2022-06-01 22:07 ` [PATCH v2 03/11] clk: fixed-factor: Introduce *clk_hw_register_fixed_factor_parent_hw() Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02 10:20   ` Dmitry Baryshkov
2022-06-02 10:20     ` Dmitry Baryshkov
2022-06-09 22:12     ` Stephen Boyd [this message]
2022-06-09 22:12       ` Stephen Boyd
2022-06-10  7:46       ` Marijn Suijten
2022-06-10  7:46         ` Marijn Suijten
2022-06-10 19:01         ` Stephen Boyd
2022-06-10 19:01           ` Stephen Boyd
2022-06-27 22:36           ` Marijn Suijten
2022-06-27 22:36             ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 04/11] drm/msm/dsi/phy: Reindent and reflow multiline function calls Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02 10:14   ` Dmitry Baryshkov
2022-06-02 10:14     ` Dmitry Baryshkov
2022-06-10  7:35     ` Marijn Suijten
2022-06-10  7:35       ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 05/11] drm/msm/dsi_phy_28nm_8960: Use stack memory for temporary clock names Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 06/11] drm/msm/dsi/phy: Replace hardcoded char-array length with sizeof() Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02  9:41   ` Dmitry Baryshkov
2022-06-02  9:41     ` Dmitry Baryshkov
2022-06-01 22:07 ` [PATCH v2 07/11] drm/msm/dsi_phy_28nm_8960: Replace parent names with clk_hw pointers Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 08/11] drm/msm/dsi_phy_28nm: " Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-02  9:41   ` Dmitry Baryshkov
2022-06-02  9:41     ` Dmitry Baryshkov
2022-06-01 22:07 ` [PATCH v2 09/11] drm/msm/dsi_phy_14nm: " Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 10/11] drm/msm/dsi_phy_10nm: " Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten
2022-06-01 22:07 ` [PATCH v2 11/11] drm/msm/dsi_phy_7nm: " Marijn Suijten
2022-06-01 22:07   ` Marijn Suijten

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=20220609221211.684C1C34114@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=airlied@linux.ie \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=arnd@arndb.de \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jami.kettunen@somainline.org \
    --cc=jonathan@marek.ca \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=mturquette@baylibre.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_rajeevny@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=vladimir.lypak@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.