public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Ameya Palande <ameya.palande@nokia.com>,
	Hiroshi Doyu <Hiroshi.DOYU@nokia.com>,
	Felipe Contreras <felipe.contreras@nokia.com>,
	Nishanth Menon <nm@ti.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>
Subject: [PATCH 1/2] DSPBRIDGE: logic error fix for SleepDSP timeout value
Date: Thu, 18 Feb 2010 15:55:33 -0600	[thread overview]
Message-ID: <1266530134-8186-2-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1266530134-8186-1-git-send-email-omar.ramirez@ti.com>

When leaving the loop waiting for the dsp to transition
from its power state, timeout value will be negative, therefore
a print for "timeout waiting for the dsp" won't be displayed, as
the condition to check for is !timeout.

Reported-by: Berenice Herrera <berenice@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 084f406..96b942b 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
@@ -239,7 +239,7 @@ DSP_STATUS SleepDSP(struct WMD_DEV_CONTEXT *pDevContext, IN u32 dwCmd,
 			&pwrState);
 
 	/* Wait for DSP to move into target power state */
-	while ((pwrState != targetPwrState) && timeout--) {
+	while ((pwrState != targetPwrState) && --timeout) {
 		if (msleep_interruptible(10)) {
 			pr_err("Waiting for DSP to Suspend interrupted\n");
 			return DSP_EFAIL;
-- 
1.6.2.4


  reply	other threads:[~2010-02-18 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 21:55 [PATCH 0/2] DSPBRIDGE: unrelated fixes Omar Ramirez Luna
2010-02-18 21:55 ` Omar Ramirez Luna [this message]
2010-02-18 21:55   ` [PATCH 2/2] DSPBRIDGE: check pointer before dereference Omar Ramirez Luna
2010-02-24  2:11     ` Omar Ramirez Luna
2010-02-24  2:11   ` [PATCH 1/2] DSPBRIDGE: logic error fix for SleepDSP timeout value Omar Ramirez Luna

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=1266530134-8186-2-git-send-email-omar.ramirez@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.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