mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Satyam Sharma <satyam@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] Introduce U16_MAX and U32_MAX
Date: Wed, 1 Aug 2007 00:54:03 +0530 (IST)	[thread overview]
Message-ID: <alpine.LFD.0.999.0708010042070.28746@enigma.security.iitk.ac.in> (raw)
In-Reply-To: <20070731115729.64c875d4.akpm@linux-foundation.org>



On Tue, 31 Jul 2007, Andrew Morton wrote:

> On Tue, 31 Jul 2007 21:56:12 +0530 (IST)
> Satyam Sharma <satyam@infradead.org> wrote:
> 
> > --- a/include/linux/kernel.h
> > +++ b/include/linux/kernel.h
> > @@ -30,6 +30,9 @@ extern const char linux_proc_banner[];
> >  #define LLONG_MIN	(-LLONG_MAX - 1)
> >  #define ULLONG_MAX	(~0ULL)
> >  
> > +#define U16_MAX		((u16) ~0U)
> > +#define U32_MAX		((u32) ~0U)
> > +
> 
> hm, I'd have thought that there's a risk of gcc warnings here, forcing
> 0xffffffff into a u16, but apparently not.
> 
> Still, I think it'd be tidier here to tell the truth and use plain
> old 0xffff and 0xffffffff?

Hmm, that does make sense, actually -- in fact that's the only _really_
correct way to define u32_max / u16_max, I'd say. I probably got confused
seeing those bad examples in reiserfs and tcp_illinois ;-)

Thanks.

      parent reply	other threads:[~2007-07-31 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 16:26 Satyam Sharma
2007-07-31 18:57 ` Andrew Morton
2007-07-31 19:11   ` Jan Engelhardt
2007-07-31 19:24   ` Satyam Sharma [this message]

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=alpine.LFD.0.999.0708010042070.28746@enigma.security.iitk.ac.in \
    --to=satyam@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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®