Re: [PATCH 1/2] ARM: dma-mapping: its array of pointer

From: Ajeet Yadav
Date: Tue Feb 21 2012 - 22:36:46 EST


thanks, reposted with changes.

Ajeet

On Sat, Feb 18, 2012 at 9:18 PM, Tixy <tixy@xxxxxxxxxx> wrote:
> On Fri, 2012-02-17 at 18:39 +0530, Ajeet Yadav wrote:
>> To be consistant with declaration and usage of
> Â Â Â Â^^^^^^^^^^
> Spelling mistake, should be 'consistent'
>
>> consistent_pte it need to be an array of (pte *)
> Â Â Â Â Â Â Â Â Â Â^^^^
> Grammar mistake, should be 'needs'.
>
>>
>> Signed-off-by: Ajeet Yadav <ajeet.yadav.77@xxxxxxxxx>
>
> The title of this patch is a bit vague, perhaps something like:
> "ARM: dma-mapping: Fix the type used for consistent_pte size
> calculation"
>
> The actual patch looks correct.
>
> --
> Tixy
>
>> ---
>> Âarch/arm/mm/dma-mapping.c | Â Â2 +-
>> Â1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>> index 1aa664a..04bfa76 100644
>> --- a/arch/arm/mm/dma-mapping.c
>> +++ b/arch/arm/mm/dma-mapping.c
>> @@ -170,7 +170,7 @@ static int __init consistent_init(void)
>> Â Â Â unsigned long base = consistent_base;
>> Â Â Â unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT;
>>
>> - Â Â consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL);
>> + Â Â consistent_pte = kmalloc(num_ptes * sizeof(pte_t *), GFP_KERNEL);
>> Â Â Â if (!consistent_pte) {
>> Â Â Â Â Â Â Â pr_err("%s: no memory\n", __func__);
>> Â Â Â Â Â Â Â return -ENOMEM;
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/