[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221208165812.gnmyjkwijoieymb3@skbuf>
Date: Thu, 8 Dec 2022 18:58:12 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Dan Carpenter' <error27@...il.com>,
"David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH net] lib: packing: fix shift wrapping in bit_reverse()
On Wed, Dec 07, 2022 at 07:41:28PM +0000, David Laight wrote:
> From: Dan Carpenter
> > Sent: 07 December 2022 12:21
> ....
> > > > - new_val |= (bit << (width - i - 1));
> > > > + if (val & BIT_ULL(1))
> > >
> > > hmm, why 1 and not i?
> >
> > Because I'm a moron. Let me resend.
>
> Since we're not writing FORTRAN-IV why not use a variable
> name that is harder to confuse with 1?
How about 'k'?
Powered by blists - more mailing lists