From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Michael Neuling <mikey@neuling.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
"Shreyas B. Prabhu" <shreyasbp@gmail.com>,
Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
Stewart Smith <stewart@linux.vnet.ibm.com>,
Balbir Singh <bsingharora@gmail.com>,
Oliver O'Halloran <oohall@gmail.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, skiboot@lists.ozlabs.org
Subject: Re: [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states.
Date: Tue, 29 Nov 2016 11:39:11 +0530 [thread overview]
Message-ID: <20161129060911.GA30454@in.ibm.com> (raw)
In-Reply-To: <87vavettkb.fsf@concordia.ellerman.id.au>
Hi Michael,
On Wed, Nov 23, 2016 at 08:49:08PM +1100, Michael Ellerman wrote:
> "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> writes:
>
> > diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
> > index 7fe442c..9240e08 100644
> > --- a/drivers/cpuidle/cpuidle-powernv.c
> > +++ b/drivers/cpuidle/cpuidle-powernv.c
> > @@ -243,28 +262,31 @@ static int powernv_add_idle_states(void)
> > */
> > if (latency_ns[i] > POWERNV_THRESHOLD_LATENCY_NS)
> > continue;
> > + /*
> > + * Firmware passes residency and latency values in ns.
> > + * cpuidle expects it in us.
> > + */
> > + exit_latency = ((unsigned int)latency_ns[i]) / 1000;
> > + target_residency = (!rc) ? ((unsigned int)residency_ns[i]) : 0;
> > + target_residency /= 1000;
>
> Urk.
>
> Can you just do it normally:
>
> if (rc == 0)
> target_residency = (unsigned int)residency_ns[i] / 1000;
Wrote this in a non-standard manner since the normal way would exceed
80 chars.
>
> I also don't see why you need the cast?
It is a remnant from the previous code. But I see your point, the cast
is redundant, and removing it will make it possible to implement this
in the normal manner without checkpatch warning about it.
>
> cheers
>
--
Thanks and Regards
gautham.
next prev parent reply other threads:[~2016-11-29 6:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-10 7:54 ` [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Gautham R. Shenoy
2016-11-10 7:54 ` [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states Gautham R. Shenoy
2016-11-10 7:54 ` [PATCH v3 3/3] powernv: Pass PSSCR value and mask to power9_idle_stop Gautham R. Shenoy
[not found] ` <9c2b5cae68b54ec5dcb2651f352f740f1d09051c.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-23 9:49 ` [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states Michael Ellerman
2016-11-29 6:09 ` Gautham R Shenoy [this message]
[not found] ` <f3853e81d3b3a1cf51a920acbbddc8f64238d7b6.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-23 9:51 ` [PATCH v3 3/3] powernv: Pass PSSCR value and mask to power9_idle_stop Michael Ellerman
2016-11-29 6:10 ` Gautham R Shenoy
2016-11-29 6:34 ` [PATCH v3 0/3] powernv:stop: Use psscr_val,mask provided by firmware Balbir Singh
[not found] ` <e3af60739710139801505562b4f09d59a1786f65.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-29 10:42 ` [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Balbir Singh
2016-12-05 9:22 ` Gautham R Shenoy
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=20161129060911.GA30454@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=rjw@rjwysocki.net \
--cc=shilpa.bhat@linux.vnet.ibm.com \
--cc=shreyasbp@gmail.com \
--cc=skiboot@lists.ozlabs.org \
--cc=stewart@linux.vnet.ibm.com \
--cc=svaidy@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).