From patchwork Mon Feb 12 07:20:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 871907 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zfyH33g0dz9t39 for ; Mon, 12 Feb 2018 18:39:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="fAPHpygw"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zfyH30ZcTzF0hd for ; Mon, 12 Feb 2018 18:39:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="fAPHpygw"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=rdunlap@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="fAPHpygw"; dkim-atps=neutral Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zfyF26lmdzF0hL for ; Mon, 12 Feb 2018 18:37:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Cc:Subject:From:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xUnbhRY4bMDP9wjt9f4Jl6U60gDrnrmD/TRXwk3vyws=; b=fAPHpygwF7Tlt0tXh8MEhQR55S gEbEKxV3K637wxaputefrS/09j6NNYjiznhWnBXRZjctdVYxXMFrCIDQalfK2xJDUj5bNxu1d7K04 fWKRhcf92P9cvaw3H6EsbtrOYDgmT/EJHluzCY2ucdpH44H1ONWGO7EuqnoOnM2x3ll9kOOBRI4H7 /6NOosUKJiTq2m1hrtToY8bj/pFgoT69CFABMj07066eCdFlCnPlJD5Ku5ynk2GZlws5fASA7xxe6 orqRv1BWcNG/NgVIc55a2njSnMh/AjYhfntACGGiyLyWMmAp36YUrmcVYr7IIK6Ru4vy41PXhp91B xjVtIC9w==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.site) by casper.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1el8Q3-0004U3-UJ; Mon, 12 Feb 2018 07:20:56 +0000 To: LKML , Linux MM , Andrew Morton , Fengguang Wu From: Randy Dunlap Subject: [PATCH] headers: untangle kmemleak.h from mm.h Message-ID: Date: Sun, 11 Feb 2018 23:20:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390 , John Johansen , "netdev@vger.kernel.org" , X86 ML , linux-wireless , virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, Greg Kroah-Hartman , sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Randy Dunlap Currently #includes for no obvious reason. It looks like it's only a convenience, so remove kmemleak.h from slab.h and add to any users of kmemleak_* that don't already #include it. Also remove from source files that do not use it. This is tested on i386 allmodconfig and x86_64 allmodconfig. It would be good to run it through the 0day bot for other $ARCHes. I have neither the horsepower nor the storage space for the other $ARCHes. [slab.h is the second most used header file after module.h; kernel.h is right there with slab.h. There could be some minor error in the counting due to some #includes having comments after them and I didn't combine all of those.] This is Lingchi patch #1 (death by a thousand cuts, applied to kernel header files). Signed-off-by: Randy Dunlap --- Fengguang, can you have this patch run thru 0day builds, please? arch/powerpc/sysdev/dart_iommu.c | 1 + arch/powerpc/sysdev/msi_bitmap.c | 1 + arch/s390/kernel/nmi.c | 2 +- arch/s390/kernel/smp.c | 1 - arch/sparc/kernel/irq_64.c | 1 - arch/x86/kernel/pci-dma.c | 1 - drivers/iommu/exynos-iommu.c | 1 + drivers/iommu/mtk_iommu_v1.c | 1 - drivers/net/ethernet/ti/cpsw.c | 1 + drivers/net/wireless/realtek/rtlwifi/pci.c | 1 - drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 1 - drivers/staging/rtl8188eu/hal/fw.c | 2 +- drivers/staging/rtlwifi/pci.c | 1 - drivers/virtio/virtio_ring.c | 1 - include/linux/slab.h | 1 - kernel/ucount.c | 1 + mm/cma.c | 1 + mm/memblock.c | 1 + net/core/sysctl_net_core.c | 1 - net/ipv4/route.c | 1 - security/apparmor/lsm.c | 1 - 21 files changed, 9 insertions(+), 14 deletions(-) --- lnx-416-rc1.orig/include/linux/slab.h +++ lnx-416-rc1/include/linux/slab.h @@ -125,7 +125,6 @@ #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \ (unsigned long)ZERO_SIZE_PTR) -#include #include struct mem_cgroup; --- lnx-416-rc1.orig/kernel/ucount.c +++ lnx-416-rc1/kernel/ucount.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #define UCOUNTS_HASHTABLE_BITS 10 --- lnx-416-rc1.orig/mm/memblock.c +++ lnx-416-rc1/mm/memblock.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include --- lnx-416-rc1.orig/mm/cma.c +++ lnx-416-rc1/mm/cma.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include "cma.h" --- lnx-416-rc1.orig/drivers/staging/rtl8188eu/hal/fw.c +++ lnx-416-rc1/drivers/staging/rtl8188eu/hal/fw.c @@ -30,7 +30,7 @@ #include "rtl8188e_hal.h" #include -#include +#include static void _rtl88e_enable_fw_download(struct adapter *adapt, bool enable) { --- lnx-416-rc1.orig/drivers/iommu/exynos-iommu.c +++ lnx-416-rc1/drivers/iommu/exynos-iommu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include --- lnx-416-rc1.orig/arch/s390/kernel/nmi.c +++ lnx-416-rc1/arch/s390/kernel/nmi.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include --- lnx-416-rc1.orig/arch/powerpc/sysdev/dart_iommu.c +++ lnx-416-rc1/arch/powerpc/sysdev/dart_iommu.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include --- lnx-416-rc1.orig/arch/powerpc/sysdev/msi_bitmap.c +++ lnx-416-rc1/arch/powerpc/sysdev/msi_bitmap.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include --- lnx-416-rc1.orig/drivers/net/ethernet/ti/cpsw.c +++ lnx-416-rc1/drivers/net/ethernet/ti/cpsw.c @@ -35,6 +35,7 @@ #include #include #include +#include #include --- lnx-416-rc1.orig/drivers/virtio/virtio_ring.c +++ lnx-416-rc1/drivers/virtio/virtio_ring.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include --- lnx-416-rc1.orig/security/apparmor/lsm.c +++ lnx-416-rc1/security/apparmor/lsm.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "include/apparmor.h" --- lnx-416-rc1.orig/drivers/iommu/mtk_iommu_v1.c +++ lnx-416-rc1/drivers/iommu/mtk_iommu_v1.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include --- lnx-416-rc1.orig/drivers/staging/rtlwifi/pci.c +++ lnx-416-rc1/drivers/staging/rtlwifi/pci.c @@ -31,7 +31,6 @@ #include "efuse.h" #include #include -#include #include MODULE_AUTHOR("lizhaoming "); --- lnx-416-rc1.orig/drivers/net/wireless/realtek/rtlwifi/pci.c +++ lnx-416-rc1/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -31,7 +31,6 @@ #include "efuse.h" #include #include -#include #include MODULE_AUTHOR("lizhaoming "); --- lnx-416-rc1.orig/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c +++ lnx-416-rc1/drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c @@ -32,7 +32,6 @@ #include "../rtl8192ce/def.h" #include "fw_common.h" #include -#include static void _rtl92c_enable_fw_download(struct ieee80211_hw *hw, bool enable) { --- lnx-416-rc1.orig/arch/s390/kernel/smp.c +++ lnx-416-rc1/arch/s390/kernel/smp.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include --- lnx-416-rc1.orig/arch/sparc/kernel/irq_64.c +++ lnx-416-rc1/arch/sparc/kernel/irq_64.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include --- lnx-416-rc1.orig/arch/x86/kernel/pci-dma.c +++ lnx-416-rc1/arch/x86/kernel/pci-dma.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include --- lnx-416-rc1.orig/net/core/sysctl_net_core.c +++ lnx-416-rc1/net/core/sysctl_net_core.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include --- lnx-416-rc1.orig/net/ipv4/route.c +++ lnx-416-rc1/net/ipv4/route.c @@ -108,7 +108,6 @@ #include #ifdef CONFIG_SYSCTL #include -#include #endif #include #include