public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-pm@vger.kernel.org, viresh.kumar@linaro.org,
	rjw@rjwysocki.net, cpufreq@vger.kernel.org,
	Anson Huang <b20788@freescale.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/4] cpufreq: imx6q: correct VDDSOC/PU voltage scaling when cpufreq is changed
Date: Wed, 18 Dec 2013 09:30:46 +0100	[thread overview]
Message-ID: <20131218093046.6d439329@ipc1.ka-ro> (raw)
In-Reply-To: <20131217121358.GM6691@S2101-09.ap.freescale.net>

Hi,

Shawn Guo wrote:
> On Tue, Dec 17, 2013 at 10:53:47AM +0100, Lothar Waßmann wrote:
> > > > +	if (soc_opp_index >= soc_opp_count) {
> > > 
> > > Can soc_opp_index be possibly greater than soc_opp_count?  Otherwise,
> > > the condition check below is good enough?
> > > 
> > > 	if (soc_opp_index == soc_opp_count)
> > >
> > it doen't harm to be on the safe side and use >= anyway!
> 
> Well, it may confuse reader.  At least, it took me some time understand
> how that ">" condition will happen.  And it turns out never.
> 
man "defensive programming"


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2013-12-18  8:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 21:14 [PATCH 3/4] ARM: imx: add VDDSOC/PU setpoint info into dts Anson Huang
2013-12-16 21:14 ` [PATCH 4/4] cpufreq: imx6q: correct VDDSOC/PU voltage scaling when cpufreq is changed Anson Huang
2013-12-17  2:56   ` Shawn Guo
2013-12-17  7:45     ` Shawn Guo
2013-12-17  9:53     ` Lothar Waßmann
2013-12-17 12:14       ` Shawn Guo
2013-12-17 12:26         ` Anson.Huang
2013-12-18  8:30         ` Lothar Waßmann [this message]
2013-12-17 16:52     ` Anson Huang
2013-12-17  7:02       ` Shawn Guo
2013-12-17  3:10   ` Shawn Guo
2013-12-17  1:40 ` [PATCH 3/4] ARM: imx: add VDDSOC/PU setpoint info into dts Shawn Guo

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=20131218093046.6d439329@ipc1.ka-ro \
    --to=lw@karo-electronics.de \
    --cc=b20788@freescale.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=shawn.guo@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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