Re: [PATCH] Make more redeable the kmalloc function

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

 



On Mon, Jun 03, 2019 at 10:44:54PM -0300, Emmanuel Arias wrote:
> The ``if```check of size > KMALLOC_MAX_CACHE_SIZE was between the same
> preprocessor directive. I join the the directives to be more redeable.

>  static __always_inline void *kmalloc(size_t size, gfp_t flags)
>  {
>  	if (__builtin_constant_p(size)) {
> -#ifndef CONFIG_SLOB
> -		unsigned int index;
> -#endif
>  		if (size > KMALLOC_MAX_CACHE_SIZE)
>  			return kmalloc_large(size, flags);
>  #ifndef CONFIG_SLOB
> +		unsigned int index;
>  		index = kmalloc_index(size);

You didn't get a new warning from -Wdeclaration-after-statement?




[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