lkml.org 
[lkml]   [2003]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] add new DMA_ADDR_T_SIZE define
From
Date
David S. Miller writes:
> On Wed, 2003-02-19 at 09:28, Ion Badulescu wrote:

>> then you're probably debugging, not performance-tuning,
>> so the cast to u64 is acceptable.
>
> Not true, you must cast to 'long long' as there is no
> appropriate printf format string for u64 that works
> warning-free on all systems.

Casts are ugly and they hide bugs. There is a fix
for this problem: make u64 be "unsigned long long"
for every arch. That works for both 32-bit and 64-bit
systems. Likewise, choose "unsigned" for u32 even
if an "unsigned long" would work for a given arch.


-
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:33    [W:0.041 / U:5.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site