lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] m68k/page_no.h: force __va argument to be unsigned long
On Tue 03-07-18 08:05:35, Matthew Wilcox wrote:
> On Tue, Jul 03, 2018 at 06:03:16PM +0300, Mike Rapoport wrote:
> > On Tue, Jul 03, 2018 at 04:20:54PM +0200, Michal Hocko wrote:
> > > On Tue 03-07-18 13:29:54, Mike Rapoport wrote:
> > > > Add explicit casting to unsigned long to the __va() parameter
> > >
> > > Why is this needed?
> >
> > To make it consitent with other architecures and asm-generic :)
> >
> > But more importantly, __memblock_free_late() passes u64 to page_to_pfn().
>
> Why does memblock work in terms of u64 instead of phys_addr_t?

Yes, phys_addr_t was exactly that came to my mind as well. Casting
physical address to unsigned long just screams for potential problems.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-07-03 17:14    [W:0.095 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site