All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: fix potential build error in compaction.h
Date: Tue, 12 Feb 2019 16:38:58 -0700	[thread overview]
Message-ID: <20190212233858.GA95899@google.com> (raw)
In-Reply-To: <20190212120358.GC7584@dhcp22.suse.cz>

On Tue, Feb 12, 2019 at 01:03:58PM +0100, Michal Hocko wrote:
> On Fri 08-02-19 01:04:37, Yu Zhao wrote:
> > Declaration of struct node is required regardless. On UMA system,
> > including compaction.h without proceeding node.h shouldn't cause
> > build error.
> 
> Anybody requiring struct node shouldn't depend on compaction.h to get
> the declaration.

Yes, but the problem is the other way around. Build error happens
when somebody includes compaction.h without definition or
declaration of struct node, if CONFIG_NUMA is not set.

compaction.h already has struct node declaration to avoid the error
when CONFIG_NUMA is set, but we need it for both cases.

> Anyway have you seen an actual build breakage?

Yes. I ran into the problem while trying to include compaction.h
in this order, and had to move it to the bottom as a workaround.

#include <linux/backing-dev.h>
#include <linux/compaction.h>
#include <linux/ctype.h>
#include <linux/freezer.h>
#include <linux/hugetlb.h>
#include <linux/kstaled.h>
#include <linux/kthread.h>
#include <linux/mm_inline.h>
#include <linux/mm_types.h>
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/sched/task_stack.h>
#include <linux/swap.h>

  reply	other threads:[~2019-02-12 23:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  8:04 [PATCH] mm: fix potential build error in compaction.h Yu Zhao
2019-02-12 12:03 ` Michal Hocko
2019-02-12 23:38   ` Yu Zhao [this message]
2019-02-13 13:00     ` 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=20190212233858.GA95899@google.com \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.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.