linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Emmanuel Arias <eamanu@eamanu.com>
Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
	linux-mm@kvack.org, emmanuelarias30@gmail.com
Subject: Re: [PATCH] Make more redeable the kmalloc function
Date: Tue, 4 Jun 2019 04:48:28 -0700	[thread overview]
Message-ID: <20190604114828.GE23346@bombadil.infradead.org> (raw)
In-Reply-To: <20190604014454.6652-1-eamanu@eamanu.com>

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?


      reply	other threads:[~2019-06-04 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  1:44 [PATCH] Make more redeable the kmalloc function Emmanuel Arias
2019-06-04 11:48 ` Matthew Wilcox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190604114828.GE23346@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=eamanu@eamanu.com \
    --cc=emmanuelarias30@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).