From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108AbcGNSqX (ORCPT ); Thu, 14 Jul 2016 14:46:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:34668 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbcGNSqW (ORCPT ); Thu, 14 Jul 2016 14:46:22 -0400 Date: Thu, 14 Jul 2016 11:45:52 -0700 From: tip-bot for Paul Gortmaker Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, peterz@infradead.org, paul.gortmaker@windriver.com, tglx@linutronix.de, mingo@kernel.org Reply-To: peterz@infradead.org, paul.gortmaker@windriver.com, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com In-Reply-To: <20160714001901.31603-9-paul.gortmaker@windriver.com> References: <20160714001901.31603-9-paul.gortmaker@windriver.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/headers] x86: Audit and remove any remaining unnecessary uses of module.h Git-Commit-ID: eb008eb6f8b689853d6e9f4ae3ff56ea734e4319 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: eb008eb6f8b689853d6e9f4ae3ff56ea734e4319 Gitweb: http://git.kernel.org/tip/eb008eb6f8b689853d6e9f4ae3ff56ea734e4319 Author: Paul Gortmaker AuthorDate: Wed, 13 Jul 2016 20:19:01 -0400 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 15:07:00 +0200 x86: Audit and remove any remaining unnecessary uses of module.h 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 some of these which are 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 the case of crypto/glue_helper.c we delete a redundant instance of MODULE_LICENSE in order to delete module.h -- the license info is already present at the top of the file. The uncore change warrants a mention too; it is uncore.c that uses module.h and not uncore.h; hence the relocation done there. Signed-off-by: Paul Gortmaker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160714001901.31603-9-paul.gortmaker@windriver.com Signed-off-by: Ingo Molnar --- arch/x86/crypto/glue_helper.c | 4 +--- arch/x86/events/amd/ibs.c | 3 ++- arch/x86/events/amd/iommu.c | 2 +- arch/x86/events/core.c | 3 ++- arch/x86/events/intel/uncore.c | 2 ++ arch/x86/events/intel/uncore.h | 1 - arch/x86/include/asm/livepatch.h | 1 - arch/x86/kernel/cpu/mtrr/if.c | 1 - arch/x86/kernel/cpu/mtrr/main.c | 2 +- arch/x86/pci/xen.c | 2 +- arch/x86/um/delay.c | 2 +- 11 files changed, 11 insertions(+), 12 deletions(-) diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c index 6a85598..3cc4cad 100644 --- a/arch/x86/crypto/glue_helper.c +++ b/arch/x86/crypto/glue_helper.c @@ -25,7 +25,7 @@ * */ -#include +#include #include #include #include @@ -397,5 +397,3 @@ void glue_xts_crypt_128bit_one(void *ctx, u128 *dst, const u128 *src, le128 *iv, u128_xor(dst, dst, (u128 *)&ivblk); } EXPORT_SYMBOL_GPL(glue_xts_crypt_128bit_one); - -MODULE_LICENSE("GPL"); diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c index feb90f6..2d40247 100644 --- a/arch/x86/events/amd/ibs.c +++ b/arch/x86/events/amd/ibs.c @@ -7,7 +7,8 @@ */ #include -#include +#include +#include #include #include #include diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c index 6011a57..b28200d 100644 --- a/arch/x86/events/amd/iommu.c +++ b/arch/x86/events/amd/iommu.c @@ -12,7 +12,7 @@ */ #include -#include +#include #include #include diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 26ced53..154e9e1 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -17,7 +17,8 @@ #include #include #include -#include +#include +#include #include #include #include diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c index fce7406..95726cd 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c @@ -1,3 +1,5 @@ +#include + #include #include "uncore.h" diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index 79766b9..05b71e9 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/arch/x86/include/asm/livepatch.h b/arch/x86/include/asm/livepatch.h index a7f9181..ed80003 100644 --- a/arch/x86/include/asm/livepatch.h +++ b/arch/x86/include/asm/livepatch.h @@ -22,7 +22,6 @@ #define _ASM_X86_LIVEPATCH_H #include -#include #include static inline int klp_check_compiler_support(void) diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index d76f13d..6d9b455 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 7d393ec..28f1b54 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 99ddab7..3a483cb 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -9,7 +9,7 @@ * Konrad Rzeszutek Wilk * Stefano Stabellini */ -#include +#include #include #include #include diff --git a/arch/x86/um/delay.c b/arch/x86/um/delay.c index f3fe1a6..a8fb7ca 100644 --- a/arch/x86/um/delay.c +++ b/arch/x86/um/delay.c @@ -7,7 +7,7 @@ * published by the Free Software Foundation. */ -#include +#include #include #include #include