linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Markus Mayer <code@mmayer.net>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Power Management List <linux-pm@vger.kernel.org>,
	Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Markus Mayer <mmayer@broadcom.com>
Subject: Re: [PATCH v2 1/2] cpufreq: add new attribute type cpufreq_freq_attr_wr_perm()
Date: Mon, 7 Nov 2016 10:03:48 +0530	[thread overview]
Message-ID: <20161107043348.GA21030@vireshk-i7> (raw)
In-Reply-To: <20161104165536.20088-2-code@mmayer.net>

On 04-11-16, 09:55, Markus Mayer wrote:
> From: Markus Mayer <mmayer@broadcom.com>
> 
> With the new attribute type, it is possible to create write-only
> CPUfreq attributes.
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> ---
>  include/linux/cpufreq.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
> index 5fa55fc..ed09930 100644
> --- a/include/linux/cpufreq.h
> +++ b/include/linux/cpufreq.h
> @@ -234,6 +234,10 @@ __ATTR(_name, _perm, show_##_name, NULL)
>  static struct freq_attr _name =			\
>  __ATTR(_name, 0644, show_##_name, store_##_name)
>  
> +#define cpufreq_freq_attr_wr_perm(_name, _perm)	\

shouldn't this be _wo_perm ?

Also, I wouldn't mind doing this in the second patch itself.

> +static struct freq_attr _name =			\
> +__ATTR(_name, _perm, NULL, store_##_name)
> +
>  struct global_attr {
>  	struct attribute attr;
>  	ssize_t (*show)(struct kobject *kobj,
> -- 
> 2.7.4

-- 
viresh

  reply	other threads:[~2016-11-07  4:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 16:55 [PATCH v2 0/2] cpufreq: stats: clear statistics Markus Mayer
2016-11-04 16:55 ` [PATCH v2 1/2] cpufreq: add new attribute type cpufreq_freq_attr_wr_perm() Markus Mayer
2016-11-07  4:33   ` Viresh Kumar [this message]
2016-11-07  4:35     ` Viresh Kumar
2016-11-04 16:55 ` [PATCH v2 2/2] cpufreq: stats: clear statistics Markus Mayer
2016-11-07  4:38   ` Viresh Kumar

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=20161107043348.GA21030@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=code@mmayer.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mmayer@broadcom.com \
    --cc=rjw@rjwysocki.net \
    /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).