mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au,
	hidehiro.kawai.ez@hitachi.com, bp@suse.de, mina86@mina86.com,
	linux@rasmusvillemoes.dk, joe@perches.com
Subject: Re: [RFC PATCH] dynamic_debug: only add header when used
Date: Wed, 13 Jul 2016 13:32:54 -0700	[thread overview]
Message-ID: <20160713133254.70078c50b1af9edb8b577499@linux-foundation.org> (raw)
In-Reply-To: <1468429793-16917-1-git-send-email-luisbg@osg.samsung.com>

On Wed, 13 Jul 2016 18:09:53 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> wrote:

> kernel.h header doesn't directly use dynamic debug, instead we can include
> it in module.c (which used it via kernel.h). printk.h only uses it if
> CONFIG_DYNAMIC_DEBUG is on, changing the inclusion to only happen in that
> case.
> 
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
> Hi,
> 
> While studying the problem that surfaced when adding #include <linux/kernel.h>
> in include/linux/string.h to have access to the MAX_SIZE macro [0]. I noticed
> that dynamic_debug.h is included in kernel.h even though it isn't necessary.
> Which in the case of adding kernel.h to string.h would mean a circular
> dependency.
> 
> Not entirely sure if there is a reason for this beyond making dynamic debug
> available to module.c. Which is why I am sending this patch as an RFC.

It would be good if we can do this.

What is it in kernel.h that requires dynamic_debug.h?  I tried your
patch along with

--- a/kernel/module.c~dynamic_debug-only-add-header-when-used-fix
+++ a/kernel/module.c
@@ -60,7 +60,6 @@
 #include <linux/jump_label.h>
 #include <linux/pfn.h>
 #include <linux/bsearch.h>
-#include <linux/dynamic_debug.h>
 #include <uapi/linux/module.h>
 #include "module-internal.h"
 
and module.o builds OK.

  reply	other threads:[~2016-07-13 20:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 17:09 Luis de Bethencourt
2016-07-13 20:32 ` Andrew Morton [this message]
2016-07-13 20:44   ` Luis de Bethencourt
2016-07-13 22:25   ` Luis de Bethencourt

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=20160713133254.70078c50b1af9edb8b577499@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=luisbg@osg.samsung.com \
    --cc=mina86@mina86.com \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®