mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>,
	platform-driver-x86@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Olof Johansson <olof@lixom.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	dbasehore@google.com, vishwanath.somayaji@intel.com
Subject: Re: [PATCH v5] platform:x86: Add PMC Driver for Intel Core SoC
Date: Tue, 24 May 2016 12:43:02 -0700	[thread overview]
Message-ID: <20160524194302.GK2735@f23x64.localdomain> (raw)
In-Reply-To: <CAHp75Vd8XhcW5xr9ttyOT=5gBy3QBdeGnP8knx5fK=Nea9N0kA@mail.gmail.com>

On Tue, May 24, 2016 at 10:07:32PM +0300, Andy Shevchenko wrote:
> On Tue, May 24, 2016 at 9:54 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Tue, May 24, 2016 at 5:25 PM, Rajneesh Bhardwaj
> > <rajneesh.bhardwaj@intel.com> wrote:
> 
> >> +static int pmc_core_dev_state_show(struct seq_file *s, void *unused)
> >> +{
> >> +       struct pmc_dev *pmcdev = s->private;
> >> +       u32 counter_val;
> >> +
> >> +       counter_val = pmc_core_reg_read(pmcdev,
> >> +                                       SPT_PMC_SLP_S0_RES_COUNTER_OFFSET);
> >> +       seq_printf(s, "%u\n", pmc_core_adjust_slp_s0_step(counter_val));
> >> +
> >> +       return 0;
> >> +}
> >> +
> >> +static int pmc_core_dev_state_open(struct inode *inode, struct file *file)
> >> +{
> >> +       return single_open(file, pmc_core_dev_state_show, inode->i_private);
> >> +}
> >> +
> >> +static const struct file_operations pmc_core_dev_state_ops = {
> >> +       .open           = pmc_core_dev_state_open,
> >> +       .read           = seq_read,
> >> +       .llseek         = seq_lseek,
> >> +       .release        = single_release,
> >> +};
> >
> > I suppose DEFINE_SIMPLE_ATTRIBUTE might reduce amount of LOC.
> 
> Correction:
> DEFINE_DEBUGFS_ATTRIBUTE()

Andy caught the couple things I was going to add and a couple more. Please give
his feedback one more pass (except where I noted we had already covered things
like the header and the module build), and we should still be able to get this
into 4.7 if I have the next rev by tomorrow.

-- 
Darren Hart
Intel Open Source Technology Center

  reply	other threads:[~2016-05-24 19:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 14:25 Rajneesh Bhardwaj
2016-05-24 18:54 ` Andy Shevchenko
2016-05-24 19:07   ` Andy Shevchenko
2016-05-24 19:43     ` Darren Hart [this message]
2016-05-24 20:12       ` Andy Shevchenko
2016-05-25 18:13         ` Rajneesh Bhardwaj
2016-05-24 19:38   ` Darren Hart
2016-05-24 20:10     ` Andy Shevchenko
2016-05-24 20:45       ` Darren Hart

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=20160524194302.GK2735@f23x64.localdomain \
    --to=dvhart@infradead.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=dbasehore@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rajneesh.bhardwaj@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vishwanath.somayaji@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

all inboxes | Powered by JetHome®