Re: [PATCH 01/25] slab: fixup calculate_alignment() argument type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 10, 2018 at 11:47:32PM +0300, Alexey Dobriyan wrote:
> On Tue, Apr 10, 2018 at 01:25:46PM -0700, Matthew Wilcox wrote:
> > I came across this:
> > 
> >         for (order = max(min_order, (unsigned int)get_order(min_objects * size + reserved));
> > 
> > Do you want to work on making get_order() return an unsigned int?
> > 
> > Also, I think get_order(0) should probably be 0, but you might develop
> > a different feeling for it as you work your way around the kernel looking
> > at how it's used.
> 
> IIRC total size increased when I made it return "unsigned int".

Huh, weird.  Did you go so far as to try having it return unsigned char?
We know it's not going to return anything outside the range of 0-63.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux