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
| ||
|
Date: Wed, 29 Mar 2017 09:04:23 +0100 From: Lee Jones <lee.jones@...aro.org> To: Sebastian Reichel <sre@...nel.org> Cc: Tony Lindgren <tony@...mide.com>, Dmitry Torokhov <dmitry.torokhov@...il.com>, Rob Herring <robh+dt@...nel.org>, Mark Rutland <mark.rutland@....com>, linux-input@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCHv4] mfd: cpcap: implement irq sense helper On Tue, 28 Mar 2017, Sebastian Reichel wrote: > Hi Lee, > > On Tue, Mar 28, 2017 at 11:27:16AM +0100, Lee Jones wrote: > > > +int cpcap_sense_virq(struct regmap *regmap, int virq) > > > +{ > > > + struct regmap_irq_chip_data *d = irq_get_chip_data(virq); > > > + int base = regmap_irq_chip_get_base(d); > > > > What base is this? > > This function takes an Linux irq number. That number is a virtual > irq number, which has nothing to do with the hardware. For example > a platform could look like this: > > linux irq device base device irq > --------------------------------------------- > 0-63 SoC 0 0-63 > 64-127 SoC-GPIO 64 0-63 > 128-191 CPCAP 128 0-63 > > For the above example the function would map 128-191 to 0-63 as > used by the device. In which case may I suggest that you rename the variable, since 'base' is commonly used in the kernel to mean base of a particular IP's memory block. > > Could it be used to avoid some calculations in cpcap_sense_irq()? > > No. > > > > + return cpcap_sense_irq(regmap, virq - base); > > > +} > > > +EXPORT_SYMBOL_GPL(cpcap_sense_virq); > > -- Sebastian -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists