devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org
Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dwalker-zu3NM2574RrQT0dZR+AlfA@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	dsegal-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	bryanh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org
Subject: Re: [PATCH v3 12/13] usb: phy: msm: Properly check core interrupt number
Date: Tue, 15 Oct 2013 10:12:16 +0300	[thread overview]
Message-ID: <1381821136.29983.15.camel@iivanov-dev.int.mm-sol.com> (raw)
In-Reply-To: <20131014225933.GF7446@radagast>

On Mon, 2013-10-14 at 17:59 -0500, Felipe Balbi wrote: 
> On Mon, Oct 14, 2013 at 06:24:39PM +0300, Ivan T. Ivanov wrote:
> > From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
> > 
> > IRQ with number 0 is valid case, so check for negative
> 
> not entirelly correct... IRQ 0 isn't supposed to be used as a linux IRQ
> number IIRC.

I am not really sure. NO_IRQ is -1 at least on ARM. Also when
taking into account irqdomain's zero as interrupt number is valid??

> 
> > numbers instead.
> > 
> > Signed-off-by: Ivan T. Ivanov <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
> > ---
> >  drivers/usb/phy/phy-msm-usb.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> > index ca2abe6..f34c8a9 100644
> > --- a/drivers/usb/phy/phy-msm-usb.c
> > +++ b/drivers/usb/phy/phy-msm-usb.c
> > @@ -1415,7 +1415,7 @@ static int __init msm_otg_probe(struct platform_device *pdev)
> >  	dev_info(&pdev->dev, "OTG regs = %p\n", motg->regs);
> >  
> >  	motg->irq = platform_get_irq(pdev, 0);
> > -	if (!motg->irq) {
> > +	if (motg->irq < 0) {
> 
> this check is correct though, since platform_get_irq() will return
> -ENXIO if it doesn't find IRQ resource.
> 

Thanks,
Ivan

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-10-15  7:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 15:24 [PATCH v3 00/13] usb: phy: msm: Fixes, cleanups and DT support Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 01/13] usb: phy: msm: Move mach depndend code to platform data Ivan T. Ivanov
2013-10-14 22:52   ` Felipe Balbi
2013-10-15  7:01     ` Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 02/13] usb: phy: msm: Move global regulators variables to driver state Ivan T. Ivanov
2013-10-14 22:52   ` Felipe Balbi
2013-10-14 15:24 ` [PATCH v3 03/13] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 04/13] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
     [not found] ` <1381764280-28420-1-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2013-10-14 15:24   ` [PATCH v3 05/13] usb: phy: msm: Fix WARNING: quoted string split across lines Ivan T. Ivanov
2013-10-14 15:24   ` [PATCH v3 06/13] usb: phy: msm: Fix WARNING: Prefer seq_puts to seq_printf Ivan T. Ivanov
2013-10-14 15:24   ` [PATCH v3 09/13] usb: phy: msm: Remove unused pclk_src_name Ivan T. Ivanov
2013-10-14 15:24   ` [PATCH v3 10/13] usb: phy: msm: Switch clock consumer strings Ivan T. Ivanov
2013-10-14 15:24   ` [PATCH v3 12/13] usb: phy: msm: Properly check core interrupt number Ivan T. Ivanov
2013-10-14 22:59     ` Felipe Balbi
2013-10-15  7:12       ` Ivan T. Ivanov [this message]
2013-10-14 15:24 ` [PATCH v3 07/13] usb: phy: msm: Replace custom enum usb_mode_type with enum usb_dr_mode Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 08/13] usb: phy: msm: Drop default usb_dr_mode from platform data Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 11/13] usb: phy: msm: Remove HSUSB prefix from requlator names Ivan T. Ivanov
2013-10-14 15:24 ` [PATCH v3 13/13] usb: phy: msm: Add device tree support and binding information Ivan T. Ivanov

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=1381821136.29983.15.camel@iivanov-dev.int.mm-sol.com \
    --to=iivanov-neyub+7iv8pqt0dzr+alfa@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=bryanh-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dsegal-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=dwalker-zu3NM2574RrQT0dZR+AlfA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jackp-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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;
as well as URLs for NNTP newsgroup(s).