Re: [PATCH v2 1/1] int_sqrt() adjustments
From: Joe Perches
Date: Sun Jan 27 2019 - 15:47:05 EST
On Sun, 2019-01-27 at 21:32 +0100, Florian La Roche wrote:
> Add __attribute_const__ and use normal ints for the right param of "<<".
[]
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
[]
> @@ -513,10 +513,10 @@ extern int __kernel_text_address(unsigned long addr);
> extern int kernel_text_address(unsigned long addr);
> extern int func_ptr_is_kernel_text(void *ptr);
>
> -unsigned long int_sqrt(unsigned long);
> +__attribute_const__ unsigned long int_sqrt(unsigned long);
This might as well return u32 to be consistent with int_sqrt64