From: Paul Gortmaker <paul.gortmaker@windriver.com> To: <linux-mips@linux-mips.org> Cc: "Paul Gortmaker" <paul.gortmaker@windriver.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "James Hogan" <james.hogan@imgtec.com>, "Ralf Baechle" <ralf@linux-mips.org>, kvm@vger.kernel.org Subject: [PATCH 5/5] mips/kvm: Audit and remove any unnecessary uses of module.h Date: Sun, 21 Aug 2016 15:58:17 -0400 [thread overview] Message-ID: <20160821195817.5802-6-paul.gortmaker@windriver.com> (raw) In-Reply-To: <20160821195817.5802-1-paul.gortmaker@windriver.com> Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of kvm where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace as needed. In this case, we did not need to add either to any files. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- arch/mips/kvm/commpage.c | 1 - arch/mips/kvm/dyntrans.c | 1 - arch/mips/kvm/emulate.c | 1 - arch/mips/kvm/interrupt.c | 1 - arch/mips/kvm/trap_emul.c | 1 - 5 files changed, 5 deletions(-) diff --git a/arch/mips/kvm/commpage.c b/arch/mips/kvm/commpage.c index a36b77e1705c..f43629979a0e 100644 --- a/arch/mips/kvm/commpage.c +++ b/arch/mips/kvm/commpage.c @@ -12,7 +12,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/dyntrans.c b/arch/mips/kvm/dyntrans.c index d280894915ed..b36c8ddc03ea 100644 --- a/arch/mips/kvm/dyntrans.c +++ b/arch/mips/kvm/dyntrans.c @@ -13,7 +13,6 @@ #include <linux/err.h> #include <linux/highmem.h> #include <linux/kvm_host.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c index e788515f766b..68fd666f8cb9 100644 --- a/arch/mips/kvm/emulate.c +++ b/arch/mips/kvm/emulate.c @@ -13,7 +13,6 @@ #include <linux/err.h> #include <linux/ktime.h> #include <linux/kvm_host.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/interrupt.c b/arch/mips/kvm/interrupt.c index ad28dac6b7e9..e88403b3dcdd 100644 --- a/arch/mips/kvm/interrupt.c +++ b/arch/mips/kvm/interrupt.c @@ -11,7 +11,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/trap_emul.c b/arch/mips/kvm/trap_emul.c index 091553942bcb..21d80274ccff 100644 --- a/arch/mips/kvm/trap_emul.c +++ b/arch/mips/kvm/trap_emul.c @@ -11,7 +11,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/kvm_host.h> -- 2.8.4
WARNING: multiple messages have this Message-ID (diff)
From: Paul Gortmaker <paul.gortmaker@windriver.com> To: linux-mips@linux-mips.org Cc: "Paul Gortmaker" <paul.gortmaker@windriver.com>, "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "James Hogan" <james.hogan@imgtec.com>, "Ralf Baechle" <ralf@linux-mips.org>, kvm@vger.kernel.org Subject: [PATCH 5/5] mips/kvm: Audit and remove any unnecessary uses of module.h Date: Sun, 21 Aug 2016 15:58:17 -0400 [thread overview] Message-ID: <20160821195817.5802-6-paul.gortmaker@windriver.com> (raw) Message-ID: <20160821195817.-epnAvfoG4gBehh91p_s3QaWBibwEW8IY4hIv7eFnGY@z> (raw) In-Reply-To: <20160821195817.5802-1-paul.gortmaker@windriver.com> Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of kvm where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace as needed. In this case, we did not need to add either to any files. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> --- arch/mips/kvm/commpage.c | 1 - arch/mips/kvm/dyntrans.c | 1 - arch/mips/kvm/emulate.c | 1 - arch/mips/kvm/interrupt.c | 1 - arch/mips/kvm/trap_emul.c | 1 - 5 files changed, 5 deletions(-) diff --git a/arch/mips/kvm/commpage.c b/arch/mips/kvm/commpage.c index a36b77e1705c..f43629979a0e 100644 --- a/arch/mips/kvm/commpage.c +++ b/arch/mips/kvm/commpage.c @@ -12,7 +12,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/dyntrans.c b/arch/mips/kvm/dyntrans.c index d280894915ed..b36c8ddc03ea 100644 --- a/arch/mips/kvm/dyntrans.c +++ b/arch/mips/kvm/dyntrans.c @@ -13,7 +13,6 @@ #include <linux/err.h> #include <linux/highmem.h> #include <linux/kvm_host.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c index e788515f766b..68fd666f8cb9 100644 --- a/arch/mips/kvm/emulate.c +++ b/arch/mips/kvm/emulate.c @@ -13,7 +13,6 @@ #include <linux/err.h> #include <linux/ktime.h> #include <linux/kvm_host.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/interrupt.c b/arch/mips/kvm/interrupt.c index ad28dac6b7e9..e88403b3dcdd 100644 --- a/arch/mips/kvm/interrupt.c +++ b/arch/mips/kvm/interrupt.c @@ -11,7 +11,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/bootmem.h> diff --git a/arch/mips/kvm/trap_emul.c b/arch/mips/kvm/trap_emul.c index 091553942bcb..21d80274ccff 100644 --- a/arch/mips/kvm/trap_emul.c +++ b/arch/mips/kvm/trap_emul.c @@ -11,7 +11,6 @@ #include <linux/errno.h> #include <linux/err.h> -#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/kvm_host.h> -- 2.8.4
next prev parent reply other threads:[~2016-08-21 20:00 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-08-21 19:58 [PATCH 0/5] mips: audit and remove needless module.h use from core Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker 2016-08-21 19:58 ` [PATCH 1/5] mips/kernel: Audit and remove any unnecessary uses of module.h Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker 2016-08-21 19:58 ` [PATCH 2/5] mips/mm: " Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker 2016-08-21 19:58 ` [PATCH 3/5] mips/lib: " Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker 2016-08-21 19:58 ` [PATCH 4/5] mips/pci: " Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker 2016-08-21 19:58 ` Paul Gortmaker [this message] 2016-08-21 19:58 ` [PATCH 5/5] mips/kvm: " Paul Gortmaker 2016-08-22 12:14 ` James Hogan 2016-08-29 11:59 ` Paolo Bonzini
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=20160821195817.5802-6-paul.gortmaker@windriver.com \ --to=paul.gortmaker@windriver.com \ --cc=james.hogan@imgtec.com \ --cc=kvm@vger.kernel.org \ --cc=linux-mips@linux-mips.org \ --cc=pbonzini@redhat.com \ --cc=ralf@linux-mips.org \ --cc=rkrcmar@redhat.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: linkBe 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.