From: David Mosberger <davidm@napali.hpl.hp.com>
To: Albert Cahalan <albert@users.sourceforge.net>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>,
Andrew Morton OSDL <akpm@osdl.org>
Subject: Re: [patch] u64 casts
Date: Fri, 27 Feb 2004 16:18:53 -0800 [thread overview]
Message-ID: <16447.56941.774257.925722@napali.hpl.hp.com> (raw)
In-Reply-To: <1077915522.2255.28.camel@cube>
>>>>> On 27 Feb 2004 15:58:42 -0500, Albert Cahalan <albert@users.sourceforge.net> said:
Albert> Casts are considered harmful, because they bypass
Albert> type checking, but how do you print a u64 value?
Albert> You cast it to "unsigned long long" like this:
Albert> printk("%llu\n", (unsigned long long)foo);
Albert> Well, this is silly and ugly. As x86-64 has shown,
Albert> even a 64-bit port can use "long long" for 64-bit
Albert> values. This patch changes all other 64-bit ports.
Albert> It now becomes possible to avoid adding new casts
Albert> all over the place; existing ones may be removed
Albert> if so desired.
Did you verify that none of the kernel header files that are still
being used by glibc contain declarations based on __u64 or __s64? If
not, your patch breaks user-level code.
--david
next prev parent reply other threads:[~2004-02-28 0:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 20:58 Albert Cahalan
2004-02-28 0:18 ` David Mosberger [this message]
2004-02-27 22:16 ` Albert Cahalan
2004-02-28 0:45 ` David Mosberger
2004-02-27 22:53 ` Albert Cahalan
2004-02-28 7:44 ` David S. Miller
2004-02-28 10:42 ` Jakub Jelinek
2004-02-28 14:46 ` [patch] new version, u64 cast avoidance Albert Cahalan
2004-02-28 23:58 ` Benjamin Herrenschmidt
2004-02-28 23:59 ` Benjamin Herrenschmidt
2004-02-28 22:21 ` Albert Cahalan
2004-02-29 1:08 ` Benjamin Herrenschmidt
2004-02-28 23:49 ` Albert Cahalan
2004-02-29 3:25 ` Matt Mackall
2004-02-29 1:01 ` [patch] 3rd " Albert Cahalan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16447.56941.774257.925722@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=akpm@osdl.org \
--cc=albert@users.sourceforge.net \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®