From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
len.brown@intel.com, rjw@sisk.pl, arjan@linux.intel.com,
jacob.jun.pan@linux.intel.com
Subject: Re: [PATCH v2 2/6] PowerCap: Add class driver
Date: Fri, 04 Oct 2013 13:06:59 -0700 [thread overview]
Message-ID: <524F1FE3.50404@linux.intel.com> (raw)
In-Reply-To: <20131004165120.GA19892@kroah.com>
On 10/04/2013 09:51 AM, Greg KH wrote:
> On Fri, Oct 04, 2013 at 09:36:52AM -0700, Srinivas Pandruvada wrote:
>> +/* Power zone ro attributes define */
>> +#define powercap_attr_ro(_name) \
>> + static DEVICE_ATTR(_name, 0444, show_##_name, NULL)
>> +
>> +/* Power zone rw attributes define */
>> +#define powercap_attr_rw(_name) \
>> + static DEVICE_ATTR(_name, 0644, show_##_name, store_##_name)
>> +
>> +/* constraint attributes define rw */
>> +#define powercap_const_attr_rw(_name) \
>> + static DEVICE_ATTR(_name, 0644, show_constraint_##_name, \
>> + store_constraint_##_name)
>> +/* constraint attributes define ro */
>> +#define powercap_const_attr_ro(_name) \
>> + static DEVICE_ATTR(_name, 0644, show_constraint_##_name, NULL)
> Minor nit:
>
> Why are you using your own defines, why not just use the
> DEVICE_ATTR_RO() and DEVICE_ATTR_RW() macros? That way it makes it
> easier to grep for attributes, and ensure they have set the mode bits
> properly.
I will replace in the next patchset.
Thanks,
Srinivas
next prev parent reply other threads:[~2013-10-04 20:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 16:36 [PATCH v2 0/6] Power Capping Framework and RAPL Driver Srinivas Pandruvada
2013-10-04 16:36 ` [PATCH v2 1/6] PowerCap: Documentation Srinivas Pandruvada
2013-10-04 16:36 ` [PATCH v2 2/6] PowerCap: Add class driver Srinivas Pandruvada
2013-10-04 16:51 ` Greg KH
2013-10-04 20:06 ` Srinivas Pandruvada [this message]
2013-10-04 16:36 ` [PATCH v2 3/6] PowerCap: Added to drivers build Srinivas Pandruvada
2013-10-04 19:24 ` Gene Heskett
2013-10-04 19:38 ` Srinivas Pandruvada
[not found] ` <201310041622.29259.gheskett@wdtv.com>
2013-10-04 20:55 ` Srinivas Pandruvada
2013-10-04 23:17 ` Gene Heskett
2013-10-06 15:50 ` Arjan van de Ven
2013-10-06 20:15 ` Gene Heskett
2013-10-07 15:46 ` Arjan van de Ven
2013-10-04 16:36 ` [PATCH v2 4/6] x86/msr: add 64bit _on_cpu access functions Srinivas Pandruvada
2013-10-04 16:36 ` [PATCH v2 5/6] bitops: Introduce BIT_ULL Srinivas Pandruvada
2013-10-04 16:36 ` [PATCH v2 6/6] Introduce Intel RAPL power capping driver Srinivas Pandruvada
2013-10-04 18:07 ` Joe Perches
2013-10-04 20:12 ` Jacob Pan
2013-10-04 22:14 ` Joe Perches
2013-10-04 23:25 ` Jacob Pan
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=524F1FE3.50404@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/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).