linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch/h8300: fix kernel/dma.c build warning
@ 2018-07-21  3:17 Randy Dunlap
  2018-07-22  9:25 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2018-07-21  3:17 UTC (permalink / raw)
  To: LKML, Yoshinori Sato; +Cc: Rich Felker, linux-sh

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);
 	}
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arch/h8300: fix kernel/dma.c build warning
  2018-07-21  3:17 [PATCH] arch/h8300: fix kernel/dma.c build warning Randy Dunlap
@ 2018-07-22  9:25 ` Geert Uytterhoeven
  2018-07-22 17:24   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-07-22  9:25 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Richard Kuo, open list:QUALCOMM HEXAGON...,
	Linux Kernel Mailing List, Yoshinori Sato, Rich Felker,
	Linux-sh list

CC hexagon

hexagon != H8/300 != SuperH

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

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arch/h8300: fix kernel/dma.c build warning
  2018-07-22  9:25 ` Geert Uytterhoeven
@ 2018-07-22 17:24   ` Randy Dunlap
  2018-07-23 21:34     ` Richard Kuo
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2018-07-22 17:24 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Richard Kuo, open list:QUALCOMM HEXAGON...,
	Linux Kernel Mailing List, Yoshinori Sato, Rich Felker,
	Linux-sh list

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arch/h8300: fix kernel/dma.c build warning
  2018-07-22 17:24   ` Randy Dunlap
@ 2018-07-23 21:34     ` Richard Kuo
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Kuo @ 2018-07-23 21:34 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Geert Uytterhoeven, open list:QUALCOMM HEXAGON...,
	Linux Kernel Mailing List, Yoshinori Sato, Rich Felker,
	Linux-sh list

On Sun, Jul 22, 2018 at 10:24:58AM -0700, Randy Dunlap wrote:
> 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(-)
> >>

Thanks all the same!

For Hexagon:


Acked-by: Richard Kuo <rkuo@codeaurora.org>


-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, 
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-23 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-21  3:17 [PATCH] arch/h8300: fix kernel/dma.c build warning Randy Dunlap
2018-07-22  9:25 ` Geert Uytterhoeven
2018-07-22 17:24   ` Randy Dunlap
2018-07-23 21:34     ` Richard Kuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).