All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Paul Walmsley" <paul@pwsan.com>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Sebastian Reichel" <sre@kernel.org>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Felipe Balbi" <balbi@ti.com>, "Nishanth Menon" <nm@ti.com>
Subject: Re: [PATCH] ARM: OMAP2+: Return correct error values from device and hwmod
Date: Fri, 20 Feb 2015 10:50:04 +0100	[thread overview]
Message-ID: <201502201050.04334@pali> (raw)
In-Reply-To: <20150220082226.GB14057@amd>

[-- Attachment #1: Type: Text/Plain, Size: 1174 bytes --]

On Friday 20 February 2015 09:22:26 Pavel Machek wrote:
> On Fri 2015-02-20 00:41:41, Pali Rohár wrote:
> > Without this patch function pm_runtime_get_sync() returns 0
> > even when some omap subfunction fails. This patch properly
> > propagate error codes from omap functions back to caller.
> > 
> > This patch fix problem, when loading omap-aes driver in qemu
> > cause kernel oops.
> 
> "fixes"
> 
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>
> 
> > @@ -3350,16 +3350,17 @@ int omap_hwmod_enable(struct
> > omap_hwmod *oh)
> > 
> >   */
> >  
> >  int omap_hwmod_idle(struct omap_hwmod *oh)
> >  {
> > 
> > +	int r;
> > 
> >  	unsigned long flags;
> >  	
> >  	if (!oh)
> >  	
> >  		return -EINVAL;
> >  	
> >  	spin_lock_irqsave(&oh->_lock, flags);
> > 
> > -	_idle(oh);
> > +	r = _idle(oh);
> > 
> >  	spin_unlock_irqrestore(&oh->_lock, flags);
> > 
> > -	return 0;
> > +	return r;
> > 
> >  }
> 
> Normally, such variable is called ret or res...
> 
> 									Pavel

In other parts of this code is used name "r" not "ret".

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: pali.rohar@gmail.com (Pali Rohár)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: Return correct error values from device and hwmod
Date: Fri, 20 Feb 2015 10:50:04 +0100	[thread overview]
Message-ID: <201502201050.04334@pali> (raw)
In-Reply-To: <20150220082226.GB14057@amd>

On Friday 20 February 2015 09:22:26 Pavel Machek wrote:
> On Fri 2015-02-20 00:41:41, Pali Roh?r wrote:
> > Without this patch function pm_runtime_get_sync() returns 0
> > even when some omap subfunction fails. This patch properly
> > propagate error codes from omap functions back to caller.
> > 
> > This patch fix problem, when loading omap-aes driver in qemu
> > cause kernel oops.
> 
> "fixes"
> 
> > Signed-off-by: Pali Roh?r <pali.rohar@gmail.com>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>
> 
> > @@ -3350,16 +3350,17 @@ int omap_hwmod_enable(struct
> > omap_hwmod *oh)
> > 
> >   */
> >  
> >  int omap_hwmod_idle(struct omap_hwmod *oh)
> >  {
> > 
> > +	int r;
> > 
> >  	unsigned long flags;
> >  	
> >  	if (!oh)
> >  	
> >  		return -EINVAL;
> >  	
> >  	spin_lock_irqsave(&oh->_lock, flags);
> > 
> > -	_idle(oh);
> > +	r = _idle(oh);
> > 
> >  	spin_unlock_irqrestore(&oh->_lock, flags);
> > 
> > -	return 0;
> > +	return r;
> > 
> >  }
> 
> Normally, such variable is called ret or res...
> 
> 									Pavel

In other parts of this code is used name "r" not "ret".

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150220/66029e73/attachment.sig>

  reply	other threads:[~2015-02-20  9:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 23:41 [PATCH] ARM: OMAP2+: Return correct error values from device and hwmod Pali Rohár
2015-02-19 23:41 ` Pali Rohár
2015-02-20  8:22 ` Pavel Machek
2015-02-20  8:22   ` Pavel Machek
2015-02-20  8:22   ` Pavel Machek
2015-02-20  9:50   ` Pali Rohár [this message]
2015-02-20  9:50     ` Pali Rohár

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=201502201050.04334@pali \
    --to=pali.rohar@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=balbi@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.