|
|
|
Re: [PATCH] [ARM] pxa: use kcalloc in pxa_init_gpio_chip | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Daniel Mack wrote:
> On Thu, Jul 02, 2009 at 01:44:06PM +0300, Mike Rapoport wrote:
>> After introduction of early boot slab the the init_IRQ() function is
>> called with slab allocator initialized, and the pxa_init_gpio_chip
>> function is called from init_IRQ. Therefore, we must not use the
>> bootmem allocator in pxa_init_gpio_chip. Fixes the following
>> boot-time warning:
>
> I sent a patch to fix that already last week. Also with include fixups
> (you need slab.h now and bootmem.h can go away), and the subsequent
> memset(chips, 0, ...) removed.
missed that :)
> Eric seems busy with a long patch queue, that's why it hasn't been taken
> yet.
>
> Daniel
>
>
>
>> ------------[ cut here ]------------
>> WARNING: at mm/bootmem.c:535
>> alloc_arch_preferred_bootmem+0x54/0x68()
>> Modules linked in:
>> ---[ end trace 1b75b31a2719ed1c ]---
>>
>> Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx>
>> ---
>> arch/arm/plat-pxa/gpio.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
>> index abc79d4..1b64947 100644
>> --- a/arch/arm/plat-pxa/gpio.c
>> +++ b/arch/arm/plat-pxa/gpio.c
>> @@ -115,7 +115,7 @@ static int __init pxa_init_gpio_chip(int gpio_end)
>> /* this is early, we have to use bootmem allocator, and we really
>> * want this to be allocated dynamically for different 'gpio_end'
>> */
>> - chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip));
>> + chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL);
>> if (chips == NULL) {
>> pr_err("%s: failed to allocate GPIO chips\n", __func__);
>> return -ENOMEM;
>> --
>> 1.6.0.6
>>
>>
>>
>> --
>> Sincerely yours,
>> Mike.
>>
>>
>> -------------------------------------------------------------------
>> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
>> FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
>> Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
>
--
Sincerely yours,
Mike.
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux Arm] [Fedora ARM] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
|