From: Joe Perches <joe@perches.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Platform Driver <platform-driver-x86@vger.kernel.org>,
Matthew Garrett <matthew.garrett@nebula.com>,
Zhang Rui <rui.zhang@intel.com>,
Rafael Wysocki <rafael.j.wysocki@intel.com>,
Len Brown <len.brown@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [PATCH v3 1/1] Introduce Intel RAPL cooling device driver
Date: Tue, 09 Apr 2013 09:26:55 -0700 [thread overview]
Message-ID: <1365524815.6865.54.camel@joe-AO722> (raw)
In-Reply-To: <20130409091517.3b73a583@chromoly>
On Tue, 2013-04-09 at 09:15 -0700, Jacob Pan wrote:
> On Tue, 9 Apr 2013 08:26:38 -0700
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > > + if (NULL == rp->name || rp->flag & RAPL_PRIMITIVE_DUMMY)
> >
> > In Linux we do (rp->name == NULL), or even better yet (!rp->name),
> > please fix that up here and elsewhere in the driver.
> >
> I can fix that. I did that because checkpatch does not complain about
> it. also it avoids common mistake as:
> rp->name = NULL
>
> > > +
> > > +#define PRIMITIVE_INFO_INIT(p, m, s, i, u, f) {#p, m, s, i, u, p,
> > > f}
> >
> > C has named initializers, use them please.
> >
> this macro can save lots of repeated text.
Use the macro. Use named initializers in the macro.
#define PRIMITIVE_INFO_INIT(p, m, s, i, u, f) \
{ \
.name = #p, \
.mask = m, \
.shift = s, \
.id = i, \
.unit = u, \
/* \
(hmm looks like a bug ?) \
enum rapl_primitives pm_id; \
*/ \
.flag = f, \
}
next prev parent reply other threads:[~2013-04-09 16:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 12:46 [PATCH v3 0/1] RAPL (Running Average Power Limit) driver Jacob Pan
2013-04-09 12:46 ` [PATCH v3 1/1] Introduce Intel RAPL cooling device driver Jacob Pan
2013-04-09 15:26 ` Greg Kroah-Hartman
2013-04-09 15:53 ` Joe Perches
2013-04-09 16:07 ` Greg Kroah-Hartman
2013-04-09 16:29 ` Joe Perches
2013-04-09 16:15 ` Jacob Pan
2013-04-09 16:26 ` Joe Perches [this message]
2013-04-09 17:03 ` Jacob Pan
2013-04-09 16:34 ` Greg Kroah-Hartman
2013-04-09 16:00 ` Joe Perches
2013-04-09 23:22 ` 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=1365524815.6865.54.camel@joe-AO722 \
--to=joe@perches.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=matthew.garrett@nebula.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox