From: Joe Perches <joe@perches.com>
To: "Li, Aubrey" <aubrey.li@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
mingo@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org,
"alan@linux.intel.com" <alan@linux.intel.com>
Subject: Re: [PATCH] x86: new Intel Atom SoC power management controller driver
Date: Thu, 06 Mar 2014 18:21:30 -0800 [thread overview]
Message-ID: <1394158890.16156.46.camel@joe-AO722> (raw)
In-Reply-To: <53192A39.5030309@linux.intel.com>
On Fri, 2014-03-07 at 10:08 +0800, Li, Aubrey wrote:
> The Power Management Controller (PMC) controls many of the power
> management features present in the SoC. This driver provides
> interface to configure the Power Management Controller (PMC).
More trivial notes.
Nothing really that should stop this from being applied.
> diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c
I still think that
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
is useful here.
> +#include <linux/module.h>
> +#include <linux/init.h>
[]
> +#define DRIVER_NAME "pmc_atom"
Maybe
#define DRIVER_NAME KBUILD_MODNAME
too
> +struct pmc_dev_map {
> + char *name;
> + u32 bit_mask;
> +};
>
> +static struct pmc_dev_map dev_map[] = {
static const to reduce data?
struct pmc_dev_map {
const char *name;
u32 bit_mask;
};
> +static struct pmc_dev_map dev_map[] = {
static const struct pmc_dev_map dev_map[] = {
> + {"0 - LPSS1_F0_DMA", BIT_LPSS1_F0_DMA},
> + {"1 - LPSS1_F1_PWM1", BIT_LPSS1_F1_PWM1},
[]
> +static void pmc_power_off(void)
> +{
[]
> + pr_info("%s: Preparing to enter system sleep state S5\n", DRIVER_NAME);
This is larger code than using pr_fmt
> +#ifdef CONFIG_DEBUG_FS
> +static int pmc_dev_state_show(struct seq_file *s, void *unused)
> +{
[]
> + seq_printf(s, "Dev: %-32s\tState: %s [%s]\n",
> + dev_map[dev_index].name,
> + dev_map[dev_index].bit_mask & func_dis_index ?
> + "Disabled" : "Enabled ",
> + (d3_sts_index & dev_map[dev_index].bit_mask) ?
> + "D3" : "D0");
This reverses the order of the 1st and 2nd trigraph test
and to me would be easier to read like:
seq_printf(s, "Dev: %-32s\tState: %s [%s]\n",
dev_map[dev_index].name,
dev_map[dev_index].bit_mask & func_dis_index ?
"Disabled" : "Enabled ",
dev_map[dev_index].bit_mask & d3_sts_index ?
"D3" : "D0");
next prev parent reply other threads:[~2014-03-07 2:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 3:31 Li, Aubrey
2014-03-06 3:49 ` H. Peter Anvin
2014-03-06 5:21 ` Li, Aubrey
2014-03-06 5:28 ` H. Peter Anvin
2014-03-06 5:33 ` Li, Aubrey
2014-03-06 5:52 ` H. Peter Anvin
2014-03-06 5:58 ` Li, Aubrey
2014-03-06 16:30 ` H. Peter Anvin
2014-03-07 0:26 ` Li, Aubrey
2014-03-07 0:41 ` Joe Perches
2014-03-07 2:08 ` Li, Aubrey
2014-03-07 2:21 ` Joe Perches [this message]
2014-03-07 3:04 ` Li, Aubrey
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=1394158890.16156.46.camel@joe-AO722 \
--to=joe@perches.com \
--cc=alan@linux.intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mjg59@srcf.ucam.org \
--cc=tglx@linutronix.de \
/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®