public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
	Jakub Jelinek <jakub@redhat.com>,
	"David S. Miller" <davem@redhat.com>,
	davidm@hpl.hp.com,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>,
	Andrew Morton OSDL <akpm@osdl.org>
Subject: Re: [patch] new version, u64 cast avoidance
Date: 28 Feb 2004 18:49:23 -0500	[thread overview]
Message-ID: <1078012163.2232.136.camel@cube> (raw)
In-Reply-To: <1078016927.904.17.camel@gaston>

On Sat, 2004-02-28 at 20:08, Benjamin Herrenschmidt wrote:
> > a. my solution, as given
> > b. move u64 and friends to include/linux/*.h
> > c. you promise to never complain about warnings
> > d. printk("Ugly: " U64_FMT "\n", some_u64_value);
> > e. you patch gcc to modify format strings :-)
> > f. ...
> > 
> > In other words, how do you propose to eliminate
> > the casts?
> 
> Can't we live with those casts at least for a while ?
>
> I don't know honestly what is the best solution,
> they all sound equally ugly to me.

They are, until you count the number of occurances.
My solution, as given, puts #if crud in just 6 files.
The existing situation has crud all over the place,
growing day by day.

If there is some patch merging issue, I'd be happy
to send you a separate patch for ppc64.

If you'd prefer, I can create <linux/bit_types.h>
for these types and pull that in. For now it would
be included by all the asm-*/types.h files. Like so:

#if defined(_BROKEN_USER_TYPES) && !defined(__KERNEL__)
typedef unsigned long __u64;
typedef __signed__ long __s64;
#else
#if defined(__GNUC__)
__extension__ typedef unsigned long long __u64;
__extension__ typedef __signed__ long long __s64;
endif
#endif
/* ... */



  reply	other threads:[~2004-02-29  2:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 20:58 [patch] u64 casts Albert Cahalan
2004-02-28  0:18 ` David Mosberger
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 [this message]
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=1078012163.2232.136.camel@cube \
    --to=albert@users.sf.net \
    --cc=akpm@osdl.org \
    --cc=albert@users.sourceforge.net \
    --cc=benh@kernel.crashing.org \
    --cc=davem@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=jakub@redhat.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