[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=Mcj8LDOigVB76b1w_R-5QTMKgB4xxhbqk_zDuPyMi-oWQ@mail.gmail.com>
Date: Tue, 1 Dec 2020 15:08:18 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Christoph Hellwig <hch@....de>
Cc: Joel Becker <jlbec@...lplan.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: Re: [PATCH v2 2/4] configfs: use BIT() for internal flags
On Tue, Dec 1, 2020 at 12:22 PM Christoph Hellwig <hch@....de> wrote:
>
> On Mon, Nov 30, 2020 at 05:47:02PM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@...libre.com>
> >
> > For better readability and maintenance: use the BIT() macro for flag
> > definitions.
>
> This does not improve readability, as I now need to look up a macro,
> one that doesn't make any sense at all. If you really prefer bit based
> numbering just use the totally obvious (1 << bit) syntax.
(1 << bit) is better than a number in hex but BIT() has been in the
kernel for so long that I doubt anyone needs to look it up.
Anyway, it's your call, it'll be (1 << bit) in v3.
Bartosz
Powered by blists - more mailing lists