All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@parallels.com>,
	linux-mm@kvack.org, Sachin Kamat <sachin.kamat@linaro.org>
Subject: Re: [PATCH v3] memcg: clean up networking headers file inclusion
Date: Fri, 14 Sep 2012 12:45:05 -0700	[thread overview]
Message-ID: <20120914124505.6d7756d1.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120914120849.GL28039@dhcp22.suse.cz>

On Fri, 14 Sep 2012 14:08:49 +0200
Michal Hocko <mhocko@suse.cz> wrote:

> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -50,8 +50,12 @@
>  #include <linux/cpu.h>
>  #include <linux/oom.h>
>  #include "internal.h"
> +
> +#if defined(CONFIG_MEMCG_KMEM) && defined(CONFIG_INET)
>  #include <net/sock.h>
> +#include <net/ip.h>
>  #include <net/tcp_memcontrol.h>
> +#endif

That wasn't a cleanup!

Why not just unconditionally include them?  That will impact compile
time a teeny bit, but the code is cleaner.

And it's safer, too - conditionally including header files make it more
likely that people will accidentally break the build by not testing all
relevant CONFIG_foo combinations.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-09-14 19:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 11:21 [PATCH v2] memcg: clean up networking headers file inclusion Michal Hocko
2012-09-14 11:21 ` Glauber Costa
2012-09-14 11:34   ` Michal Hocko
2012-09-14 11:35     ` Glauber Costa
2012-09-14 12:01       ` Michal Hocko
2012-09-14  8:05         ` Glauber Costa
2012-09-14 12:13           ` Michal Hocko
2012-09-14 12:08       ` [PATCH v3] " Michal Hocko
2012-09-14  8:14         ` Glauber Costa
2012-09-14 12:24           ` Michal Hocko
2012-09-14 12:41             ` Fengguang Wu
2012-09-14 12:54               ` Michal Hocko
2012-09-14 12:18         ` [PATCH] " Michal Hocko
2012-09-14 19:45         ` Andrew Morton [this message]
2012-09-17 12:02           ` [PATCH v4] memcg: cleanup kmem tcp ifdefs Michal Hocko

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=20120914124505.6d7756d1.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=glommer@parallels.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=sachin.kamat@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.