All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
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, 4 Oct 2013 09:51:20 -0700	[thread overview]
Message-ID: <20131004165120.GA19892@kroah.com> (raw)
In-Reply-To: <1380904616-17519-3-git-send-email-srinivas.pandruvada@linux.intel.com>

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.

thanks,

greg k-h

  reply	other threads:[~2013-10-04 16:51 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 [this message]
2013-10-04 20:06     ` Srinivas Pandruvada
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=20131004165120.GA19892@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arjan@linux.intel.com \
    --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 \
    --cc=srinivas.pandruvada@linux.intel.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 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.