Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [GIT PULL] break implicit percpu.h -> slab.h dependency

61 views
Skip to first unread message

Ingo Molnar

unread,
Apr 6, 2010, 5:30:03 AM4/6/10
to

* Tejun Heo <t...@kernel.org> wrote:

> git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git slabh
>
> This is rather unusual pull request at this stage in -rc cycles but
> given the mostly trivial nature and massive size of this change, I
> think it would be beneficial to merge this while the tree isn't
> changing too rapidly and as early as possible so that further
> breakages aren't introduced.

FYI, -tip testing found a build breakage with your changes:

drivers/base/node.c:373: error: implicit declaration of function 'kmalloc'
drivers/base/node.c:377: error: implicit declaration of function 'kfree'

The fix is below. Since my first test today triggered a build failure i'd
expect there to be more - i'll send all subsequent fixes to this thread.

Thanks,

Ingo

Index: linux2/drivers/base/node.c
===================================================================
--- linux2.orig/drivers/base/node.c
+++ linux2/drivers/base/node.c
@@ -16,6 +16,7 @@
#include <linux/device.h>
#include <linux/swap.h>
#include <linux/gfp.h>
+#include <linux/slab.h>

static struct sysdev_class_attribute *node_state_attrs[];

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Tejun Heo

unread,
Apr 6, 2010, 5:40:02 AM4/6/10
to
Hello, Ingo.

On 04/06/2010 06:25 PM, Ingo Molnar wrote:
> FYI, -tip testing found a build breakage with your changes:
>
> drivers/base/node.c:373: error: implicit declaration of function 'kmalloc'
> drivers/base/node.c:377: error: implicit declaration of function 'kfree'

These are NODEMASK_ALLOC() and NODEMASK_FREE() macros which become
kmalloc/kfree() iff NODES_SHIFT > 8. I'll grep for these macros and
commit a proper fix.

> The fix is below. Since my first test today triggered a build failure i'd
> expect there to be more - i'll send all subsequent fixes to this thread.

Thanks. Much appreciated.

--
tejun

Ingo Molnar

unread,
Apr 6, 2010, 6:00:03 AM4/6/10
to

* Tejun Heo <t...@kernel.org> wrote:

> Hello, Ingo.
>
> On 04/06/2010 06:25 PM, Ingo Molnar wrote:
> > FYI, -tip testing found a build breakage with your changes:
> >
> > drivers/base/node.c:373: error: implicit declaration of function 'kmalloc'
> > drivers/base/node.c:377: error: implicit declaration of function 'kfree'
>
> These are NODEMASK_ALLOC() and NODEMASK_FREE() macros which become
> kmalloc/kfree() iff NODES_SHIFT > 8. I'll grep for these macros and
> commit a proper fix.
>
> > The fix is below. Since my first test today triggered a build failure i'd
> > expect there to be more - i'll send all subsequent fixes to this thread.
>
> Thanks. Much appreciated.

It's looking pretty good so far with about a dozen tests passed. Thanks for
doing this transition so carefully!

Ingo

Tejun Heo

unread,
Apr 6, 2010, 5:40:02 PM4/6/10
to
NODEMASK_ALLOC/FREE are mapped to kmalloc/free if NODES_SHIFT > 8.
Among its several users, drivers/base/node.c wasn't including slab.h
leading to build failure if NODES_SHIFT > 8. Include slab.h from
drivers/base/node.c.

This isn't an ideal solution but including slab.h directly from
nodemask.h is not an option because nodemask.h gets included
everywhere. For now, make it work by including slab.h from its users.

Signed-off-by: Tejun Heo <t...@kernel.org>
Reported-by: Ingo Molnar <mi...@elte.hu>
---
drivers/base/node.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index 985abd7..057979a 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -15,7 +15,7 @@
#include <linux/cpu.h>
#include <linux/device.h>
#include <linux/swap.h>
-#include <linux/gfp.h>
+#include <linux/slab.h>

static struct sysdev_class_attribute *node_state_attrs[];

--
1.6.4.2

Tejun Heo

unread,
Apr 6, 2010, 6:00:02 PM4/6/10
to
Linus, can you please pull once more from the slabh branch?

git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git slabh

It has the following single fix for build failure spotted by Ingo
during -tip testing.

Thanks.

Tejun Heo (1):
nodemask: include slab.h from drivers/base/node.c

drivers/base/node.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

--
tejun

0 new messages