[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140616205919.5740bea0522043fdfd32e98c@skynet.be>
Date: Mon, 16 Jun 2014 20:59:19 +0200
From: Fabian Frederick <fabf@...net.be>
To: Bob Copeland <me@...copeland.com>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH V2] fs/omfs/inode.c: use ULLONG_MAX instead of ~0ULL
On Sun, 15 Jun 2014 12:11:42 -0400
Bob Copeland <me@...copeland.com> wrote:
> On Sun, Jun 15, 2014 at 08:39:20AM +0200, Fabian Frederick wrote:
> > Use more explicit kernel.h definition
> > array_size = DIV_ROUND_UP(bitmap_size, sb->s_blocksize);
> >
> > - if (sbi->s_bitmap_ino == ~0ULL)
> > + if (sbi->s_bitmap_ino == ULLONG_MAX)
> > goto out;
>
> So I agree they are the same, but is there a good reason for the
> change?
>
> Semantically, I think of ~0ULL as "all ones" whereas ULLONG_MAX
> as a maximum of a magnitude comparison, which this is not really.
Well it was meant to clarify code but in this case it doesn't indeed :)
Thanks,
Fabian
>
> --
> Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists