lkml.org 
[lkml]   [2018]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] arch/h8300: fix kernel/dma.c build warning
From
Date
On 07/22/2018 02:25 AM, Geert Uytterhoeven wrote:
> CC hexagon
>
> hexagon != H8/300 != SuperH

argh. Thanks.

> On Sat, Jul 21, 2018 at 5:17 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build warning in arch/hexagon/kernel/dma.c by casting a void *
>> to unsigned long to match the function parameter type.
>>
>> ../arch/hexagon/kernel/dma.c: In function 'arch_dma_alloc':
>> ../arch/hexagon/kernel/dma.c:51:5: warning: passing argument 2 of 'gen_pool_add' makes integer from pointer without a cast [enabled by default]
>> ../include/linux/genalloc.h:112:19: note: expected 'long unsigned int' but argument is of type 'void *'
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
>> Cc: Rich Felker <dalias@libc.org>
>> Cc: linux-sh@vger.kernel.org
>> ---
>> arch/hexagon/kernel/dma.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-next-20180717.orig/arch/hexagon/kernel/dma.c
>> +++ linux-next-20180717/arch/hexagon/kernel/dma.c
>> @@ -47,7 +47,7 @@ void *arch_dma_alloc(struct device *dev,
>> panic("Can't create %s() memory pool!", __func__);
>> else
>> gen_pool_add(coherent_pool,
>> - pfn_to_virt(max_low_pfn),
>> + (unsigned long)pfn_to_virt(max_low_pfn),
>> hexagon_coherent_pool_size, -1);
>> }
>>
>
> Gr{oetje,eeting}s,
>
> Geert
>


--
~Randy

\
 
 \ /
  Last update: 2018-07-22 19:26    [W:0.204 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site