linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org
Cc: leonard.crestez@nxp.com, lukasz.luba@arm.com,
	enric.balletbo@collabora.com, hl@rock-chips.com,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	abel.vesa@nxp.com, k.konieczny@samsung.com,
	b.zolnierkie@samsung.com, chanwoo@kernel.org,
	myungjoo.ham@samsung.com, kyungmin.park@samsung.com
Subject: Re: [PATCH v3 2/2] PM / devfreq: Add governor attribute flag for specifc sysfs nodes
Date: Mon, 19 Oct 2020 03:39:35 +0300	[thread overview]
Message-ID: <4cb8ece7-9399-9ee0-5f93-6c19630308d6@gmail.com> (raw)
In-Reply-To: <20201007050703.20759-3-cw00.choi@samsung.com>

...
> @@ -1361,6 +1373,9 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr,
>  		goto out;
>  	}
>  
> +	remove_sysfs_files(df, df->governor);
> +	create_sysfs_files(df, governor);
> +
>  	prev_governor = df->governor;
>  	df->governor = governor;
>  	strncpy(df->governor_name, governor->name, DEVFREQ_NAME_LEN);
> @@ -1460,39 +1475,6 @@ static ssize_t target_freq_show(struct device *dev,
>  }

The further code may revert df->governor to the prev_governor or set it
to NULL. The create_sysfs_files(df->governor) should be invoked at the
very end of the governor_store() and only in a case of success.

  parent reply	other threads:[~2020-10-19  0:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201007045340epcas1p32326a90323a3313f39041e3699e477f0@epcas1p3.samsung.com>
2020-10-07  5:07 ` [PATCH v3 0/2] PM / devfreq: Add governor feature and attribute flag Chanwoo Choi
     [not found]   ` <CGME20201007045340epcas1p4e63955385b1841f44e7a07e2d5d962c4@epcas1p4.samsung.com>
2020-10-07  5:07     ` [PATCH v3 1/2] PM / devfreq: Add governor feature flag Chanwoo Choi
2020-10-19  0:57       ` Dmitry Osipenko
2020-10-19  3:53         ` Chanwoo Choi
2020-10-19 22:39           ` Dmitry Osipenko
2020-10-20  1:53             ` Chanwoo Choi
     [not found]   ` <CGME20201007045340epcas1p3b4d0f9187f5330a45d20d9d9b79f1767@epcas1p3.samsung.com>
2020-10-07  5:07     ` [PATCH v3 2/2] PM / devfreq: Add governor attribute flag for specifc sysfs nodes Chanwoo Choi
2020-10-19  0:38       ` Dmitry Osipenko
2020-10-19  3:55         ` Chanwoo Choi
2020-10-19  0:39       ` Dmitry Osipenko [this message]
2020-10-19  4:11         ` Chanwoo Choi
2020-10-19 10:41           ` Chanwoo Choi

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=4cb8ece7-9399-9ee0-5f93-6c19630308d6@gmail.com \
    --to=digetx@gmail.com \
    --cc=abel.vesa@nxp.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=enric.balletbo@collabora.com \
    --cc=hl@rock-chips.com \
    --cc=jonathanh@nvidia.com \
    --cc=k.konieczny@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=thierry.reding@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).