Re: [PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread Ard Biesheuvel
> On 2 Feb 2017, at 20:49, Linus Torvalds wrote: > > On Thu, Feb 2, 2017 at 9:04 AM, Ard Biesheuvel > wrote: >> >> So update order_base_2() to adhere to its own documented interface. > > Ok, looks like you screwed up the types according to the build server. > > Making the return type "unsign

Re: [PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread Linus Torvalds
On Thu, Feb 2, 2017 at 9:04 AM, Ard Biesheuvel wrote: > > So update order_base_2() to adhere to its own documented interface. Ok, looks like you screwed up the types according to the build server. Making the return type "unsigned long" is slightly excessive. If you need an unsigned long to descr

Re: [PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread kbuild test robot
Hi Ard, [auto build test WARNING on linus/master] [also build test WARNING on v4.10-rc6 next-20170202] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/log2-make-order_base_2-behave

Re: [PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread kbuild test robot
Hi Ard, [auto build test WARNING on linus/master] [also build test WARNING on v4.10-rc6 next-20170202] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/log2-make-order_base_2-behave

[PATCH] log2: make order_base_2() behave correctly on const input value zero

2017-02-02 Thread Ard Biesheuvel
The function order_base_2() is defined (according to the comment block) as returning zero on input zero, but subsequently passes the input into roundup_pow_of_two(), which is explicitly undefined for input zero. This has gone unnoticed until now, but optimization passes in GCC 7 may produce consta