Re: [RFC 5/7] LTTng instrumentation mm

Dave Hansen
2007-11-19T19:43:18Z

On Mon, 2007-11-19 at 13:52 -0500, Mathieu Desnoyers wrote:
> > > So I guess the result is a pointer ? Should this be expected ?
> >
> > Nope. 'pointer - pointer' is an integer. Just solve this equation for
> > integer:
> >
> > 'pointer + integer = pointer'
> >
>
> Well, using page_to_pfn turns out to be ugly in markers (and in
> printks) then. Depending on the architecture, it will result in either
> an unsigned long (x86_64) or an unsigned int (i386), which corresponds
> to %lu or %u and will print a warning if we don't cast it explicitly.

Casting the i386 one to be an unconditional 'unsigned long' shouldn't be
an issue. We don't generally expect pfns to fit into ints anyway.

-- Dave