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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Dec 2013 11:05:20 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Courtney Cavin <courtney.cavin@...ymobile.com>
CC:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 7/8] mfd: pm8921: Migrate to irqdomains

On 12/11/13 13:30, Courtney Cavin wrote:
> On Wed, Dec 11, 2013 at 12:35:22AM +0100, Stephen Boyd wrote:
>> @@ -282,17 +278,14 @@ static struct irq_chip pm8xxx_irq_chip = {
>>   * RETURNS:
>>   * an int indicating the value read on that line
>>   */
>> -int pm8xxx_get_irq_stat(struct pm_irq_chip *chip, int irq)
>> +static int pm8xxx_get_irq_stat(struct pm_irq_chip *chip, int irq)
>>  {
>>         int pmirq, rc;
>>         u8  block, bits, bit;
>>         unsigned long flags;
>> +       struct irq_data *irq_data = irq_get_irq_data(irq);
>>
>> -       if (chip == NULL || irq < chip->irq_base ||
>> -                       irq >= chip->irq_base + chip->num_irqs)
>> -               return -EINVAL;
>> -
>> -       pmirq = irq - chip->irq_base;
>> +       pmirq = irq_data->hwirq;
>>
>>         block = pmirq / 8;
>>         bit = pmirq % 8;
>> @@ -322,64 +315,55 @@ bail_out:
>>  }
>>  EXPORT_SYMBOL_GPL(pm8xxx_get_irq_stat);
> Surely this isn't needed anymore, since the function is now static.

Sure. Deleted.

>
> [...]
>> +static int pm8xxx_irq_init(struct platform_device *pdev, unsigned int irq,
>> +                          unsigned int nirqs)
> 'nirqs' seems to always be 256.  Is there a benefit to keeping this
> dynamic?

I was future coding. Some pmics have less than 256 interrupts. I'll just
hardcode it for now and if/when we support the other pmics we can make
it a parameter.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
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