lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DC88CAD03C0052499C1907B327FC63229EC65B@DBDE04.ent.ti.com>
Date:	Wed, 19 Jun 2013 01:28:31 +0000
From:	"J, KEERTHY" <j-keerthy@...com>
To:	Stephen Warren <swarren@...dotorg.org>
CC:	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"broonie@...nel.org" <broonie@...nel.org>,
	"ldewangan@...dia.com" <ldewangan@...dia.com>,
	"sameo@...ux.intel.com" <sameo@...ux.intel.com>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"swarren@...dia.com" <swarren@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"gg@...mlogic.co.uk" <gg@...mlogic.co.uk>
Subject: RE: [PATCH v2 1/4] MFD: Palmas: Check if interrupts property exists
 and then only request irq

Hi Stephen,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren@...dotorg.org]
> Sent: Wednesday, June 19, 2013 12:42 AM
> To: J, KEERTHY
> Cc: linux-omap@...r.kernel.org; broonie@...nel.org;
> ldewangan@...dia.com; sameo@...ux.intel.com; grant.likely@...retlab.ca;
> swarren@...dia.com; linux-kernel@...r.kernel.org; linux-
> doc@...r.kernel.org; gg@...mlogic.co.uk
> Subject: Re: [PATCH v2 1/4] MFD: Palmas: Check if interrupts property
> exists and then only request irq
> 
> On 06/18/2013 11:33 AM, J, KEERTHY wrote:
> > Stephen Warren wrote at Tuesday, June 18, 2013 10:53 PM:
> ...>> No, you should just check the IRQ number.
> >
> > Hmmm...so something like (!i2c->irq)
> 
> Yes.

Ok.

> 
> >> Consider this:
> >>
> >> If the device was instantiated from a board file *or* a device tree,
> >> i2c->irq is correctly set. Hence, checking that value works in both
> >> cases.
> >>
> >> If you check the interrupts DT property, that will only work if the
> >> device was instantiated from device tree, and not if it was
> >> instantiated from a board file; the property will never exist in the
> >> board file case, and hence you'll never be able to have a board file
> >> provide an interrupt.
> >
> > The board file approach is getting deprecated for this. I Myself
> > removed board file related pdata stuff in one of the patches.
> >
> > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg90598.html
> >
> > So going the DeviceTree way.
> 
> Even if you're 100% sure this driver will only ever work with DT (which
> seems like a bad assumption to make no matter what the circumstance),
> it'd still be best to detect whether an IRQ was specified in a generic
> way. That way, nobody will read this driver, assume the code is
> generic, and just copy/paste it without thinking.

Ok. I understand. I will incorporate this.

Thanks,
Keerthy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ