[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181106154437.GF3074@bombadil.infradead.org>
Date: Tue, 6 Nov 2018 07:44:37 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
linux-arch@...r.kernel.org
Subject: Re: + fls-change-parameter-to-unsigned-int.patch added to -mm tree
On Tue, Nov 06, 2018 at 06:14:44PM +0300, Alexey Dobriyan wrote:
> On Mon, Nov 05, 2018 at 03:33:01PM -0800, akpm@...ux-foundation.org wrote:
>
> > -static inline int fls(int x)
> > +static inline int fls(unsigned int x)
> > {
> > - return fls64((unsigned int) x);
> > + return fls64(x);
> > }
>
> Should it return "unsigned"? Logically it should.
> I remember doing this and there was some code size increase :-(
Yes, it returns a number in the range [0-32], so it can absolutely
be unsigned. I'm kind of surprised it made any difference.
When you say "doing this", what did you try? unsigned fls(unsigned),
int fls(unsigned) or unsigned fls(int) ?
Powered by blists - more mailing lists