CIP-dev Archive on lore.kernel.org
 help / color / Atom feed
From: "Chen-Yu Tsai (Moxa)" <wens@csie.org>
To: Pavel Machek <pavel@denx.de>
Cc: "Nobuhiro Iwamatsu" <nobuhiro1.iwamatsu@toshiba.co.jp>,
	cip-dev@lists.cip-project.org,
	"Johnson CH Chen (陳昭勳)" <JohnsonCH.Chen@moxa.com>
Subject: Re: [cip-dev] [PATCH RESEND 4.4.y-cip 08/15] PM / OPP: Parse 'opp-<prop>-<name>' bindings
Date: Thu, 4 Jun 2020 17:21:54 +0800
Message-ID: <CAGb2v66QZGYNbW=bbNUpnO7POr6fNhd=CKXNezKQ3VUDNUY0rg@mail.gmail.com> (raw)
In-Reply-To: <20200604090331.GB18919@duo.ucw.cz>


[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

On Thu, Jun 4, 2020 at 5:03 PM Pavel Machek <pavel@denx.de> wrote:
>
> Hi!
>
> > >  /* TODO: Support multiple regulators */
> > > -static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev)
> > > +static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev,
> > > +                         struct device_opp *dev_opp)
> > >  {
> > >     u32 microvolt[3] = {0};
> > >     u32 val;
> > >     int count, ret;
> > > +   struct property *prop = NULL;
> > > +   char name[NAME_MAX];
> > > +
> > > +   /* Search for "opp-microvolt-<name>" */
> > > +   if (dev_opp->prop_name) {
> > > +           sprintf(name, "opp-microvolt-%s", dev_opp->prop_name);
> > > +           prop = of_find_property(opp->np, name, NULL);
> > > +   }
> > > +
> > > +   if (!prop) {
> > > +           /* Search for "opp-microvolt" */
> > > +           name[13] = '\0';
> > > +           prop = of_find_property(opp->np, name, NULL);
> >
> > If in !dev_opp->prop_name, it will pass uninitialized buffer to
> > of_find_property.
>
> This is fixed in the next patch. But I wonder if we should merge them
> into one for -cip... Unlike mainline, we already know about the
> bug. No need to prepare trap for people doing bisect.

That is a good argument. I suppose we just need to make sure the end
result records both upstream commits, and that all of our automated
tools can handle that.

ChenYu

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4701): https://lists.cip-project.org/g/cip-dev/message/4701
Mute This Topic: https://lists.cip-project.org/mt/74665642/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

  reply index

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  4:17 [cip-dev] [PATCH RESEND 4.4.y-cip 00/15] PM / OPP v2 & cpufreq backports part 1 Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 01/15] PM / OPP: Add debugfs support Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 02/15] PM / OPP: Add "opp-supported-hw" binding Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 03/15] PM / OPP: Add {opp-microvolt|opp-microamp}-<name> binding Chen-Yu Tsai (Moxa)
2020-06-04  8:46   ` Pavel Machek
2020-06-04  9:03     ` Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 04/15] PM / OPP: Remove 'operating-points-names' binding Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 05/15] PM / OPP: Rename OPP nodes as opp@<opp-hz> Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 06/15] PM / OPP: Add missing doc comments Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 07/15] PM / OPP: Parse 'opp-supported-hw' binding Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 08/15] PM / OPP: Parse 'opp-<prop>-<name>' bindings Chen-Yu Tsai (Moxa)
2020-06-04  8:56   ` Pavel Machek
2020-06-04  9:03     ` Pavel Machek
2020-06-04  9:21       ` Chen-Yu Tsai (Moxa) [this message]
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 09/15] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 10/15] PM / OPP: Set cpu_dev->id in cpumask first Chen-Yu Tsai (Moxa)
2020-06-04  6:42   ` Nobuhiro Iwamatsu
2020-06-04  6:54     ` Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 11/15] PM / OPP: Use snprintf() instead of sprintf() Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 12/15] devicetree: bindings: Add optional dynamic-power-coefficient property Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 13/15] cpufreq-dt: Supply power coefficient when registering cooling devices Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 14/15] cpufreq-dt: fix handling regulator_get_voltage() result Chen-Yu Tsai (Moxa)
2020-06-04  4:17 ` [cip-dev] [PATCH RESEND 4.4.y-cip 15/15] cpufreq: cpufreq-dt: avoid uninitialized variable warnings: Chen-Yu Tsai (Moxa)
2020-06-04  6:55 ` [cip-dev] [PATCH RESEND 4.4.y-cip 00/15] PM / OPP v2 & cpufreq backports part 1 Nobuhiro Iwamatsu

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='CAGb2v66QZGYNbW=bbNUpnO7POr6fNhd=CKXNezKQ3VUDNUY0rg@mail.gmail.com' \
    --to=wens@csie.org \
    --cc=JohnsonCH.Chen@moxa.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /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

CIP-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cip-dev/0 cip-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cip-dev cip-dev/ https://lore.kernel.org/cip-dev \
		cip-dev@lists.cip-project.org
	public-inbox-index cip-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.cip-project.lists.cip-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git