All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: Duan Fugang-B38611 <B38611@freescale.com>,
	linux-iio@vger.kernel.org,
	Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails
Date: Thu, 09 Oct 2014 20:59:25 +0100	[thread overview]
Message-ID: <5436E91D.4020301@kernel.org> (raw)
In-Reply-To: <CAOMZO5B3_axOM6egCr4dni2mZX3nufBE=-hywFxj-C=jV1uVFg@mail.gmail.com>

On 04/10/14 19:46, Fabio Estevam wrote:
> On Sat, Oct 4, 2014 at 8:26 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>> On 03/10/14 02:25, Fabio Estevam wrote:
>>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>>
>>> There is no need to pass a 'fake' return value when platform_get_irq() fails.
>>>
>>> Propagate the real error instead.
>>>
>>> While at it, only consider negative numbers returned by platform_get_irq()
>>> as error.
>> Returning an irq of 0 is still invalid isn't it?
>> (there was a lot of 'fun' making this true for Arm a few years back).
>> Doesn't it effectively mean no irq is present?
> 
> In practice I cannot see how platform_get_irq() could return 0. Only
> if the dtsi was providing 0 as the irq number for the vf610-adc
> driver, which would mean a very broken dtsi.
> 
> This driver is used only by vf610 and imx6sx and their dtsi provide
> the correct values for the adc irq.
> 
> This type of check:
> 
>        if (irq < 0)
>                return irq;
> 
> is commonly used on the imx drivers and I was not aware of any
> problems in this regard.

Applied to the togreg branch of iio.git.  Will get pushed out as testing
for the autobuilders to play when I'm not hanging out in a clean room
(not that clean as my laptop is in it ;) with no network connection
and a delightful hair net.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      parent reply	other threads:[~2014-10-10 23:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  1:25 [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails Fabio Estevam
2014-10-03  1:25 ` [PATCH 2/5] iio: adc: vf610: Return the error code directly Fabio Estevam
2014-10-04 11:28   ` Jonathan Cameron
2014-10-03  1:25 ` [PATCH 3/5] iio: adc: vf610: Disable the regulator on error Fabio Estevam
2014-10-04 11:30   ` Jonathan Cameron
2014-10-03  1:25 ` [PATCH 4/5] iio: adc: vf610: SIMPLE_DEV_PM_OPS can fit on a single line Fabio Estevam
2014-10-04 11:31   ` Jonathan Cameron
2014-10-03  1:25 ` [PATCH 5/5] iio: adc: vf610: Remove CONFIG_PM_SLEEP ifdef's Fabio Estevam
2014-10-04 11:34   ` Jonathan Cameron
2014-10-04 11:26 ` [PATCH 1/5] iio: adc: vf610: Propagate the real error when platform_get_irq() fails Jonathan Cameron
2014-10-04 18:46   ` Fabio Estevam
2014-10-09 19:57     ` Jonathan Cameron
2014-10-09 19:59     ` Jonathan Cameron [this message]

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=5436E91D.4020301@kernel.org \
    --to=jic23@kernel.org \
    --cc=B38611@freescale.com \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=linux-iio@vger.kernel.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 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.