lkml.org 
[lkml]   [2002]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] remove 2TB block device limit
Date
On Friday 10 May 2002 11:04, Andrew Morton wrote:
> Anton Altaparmakov wrote:
> >
> > ...
> > >This code:
> > >
> > > printk("%lu%s", some_sector, some_string);
> > >
> > >will work fine with 32-bit sector_t. But with 64-bit sector_t it
> > >will generate a warning at compile-time and an oops at runtime.
> > >
> > >The same problem applies to dma_addr_t. Jeff, davem and I kicked
> > >that around a while back and ended up deciding that although there
> > >are a number of high-tech solutions, the dumb one was best:
> >
> > Why not the even dumber one? Forget FMT_SECTOR_T and always use %Lu and
> > typecast (unsigned long long)sector_t_variable in the printk.
> >
>
> Agree. The nice thing about the typecast is that you
> can format the output with %06Lx, %9Ld, %Lo or whatever.
> The FMT_SECTOR_T thing forces you to use the chosen formatting.

This approach solves the phys_t printk problem as well.

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.039 / U:1.600 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site