lkml.org 
[lkml]   [2008]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Fix broken debug output reserve_region_with_split()
From
Date

> >
> > +static char *resource_string(char *buf, char *end, struct resource *res, int field_width, int precision, int flags)
> > +{
> > + /* room for the actual numbers, the two "0x", -, [, ] and the final zero */
> > + char sym[4*sizeof(resource_size_t) + 8];
> > + char *p = sym, *pend = sym + sizeof(sym);
> > +
> > + *p++ = '[';
> > + p = number(p, pend, res->start, 16, -1, -1, SPECIAL | SMALL);
> > + *p++ = '-';
> > + p = number(p, pend, res->end, 16, -1, -1, SPECIAL | SMALL);
> > + *p++ = ']';
> > + *p = 0;
> > +
> > + return string(buf, end, sym, field_width, precision, flags);
>
> so x64 64bit,io ports will be print out 8 digital?

With that patch, it will use just as many digits as necessary to display
a given number. The question I'm asking in the comments is whether we
want to instead use fixed digits with zero padding, and in that case,
do we want a hook or something for archs to decide how many digits
for IO vs. memory.

But at least with that in, we can start converting callers. I have a
patch converting PCI that I'll post once that goes in and I'll start
scrubbing arch/powerpc soon.

Cheers,
Ben.



\
 
 \ /
  Last update: 2008-10-17 05:51    [W:0.144 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site