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: 10211891 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB50560329 for ; Mon, 12 Feb 2018 07:21:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4C6528B9A for ; Mon, 12 Feb 2018 07:21:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8CD028C01; Mon, 12 Feb 2018 07:21:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0B9728B9A for ; Mon, 12 Feb 2018 07:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202AbeBLHVC (ORCPT ); Mon, 12 Feb 2018 02:21:02 -0500 Received: from casper.infradead.org ([85.118.1.10]:50298 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbeBLHU7 (ORCPT ); Mon, 12 Feb 2018 02:20:59 -0500 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 Cc: iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-s390 , sparclinux@vger.kernel.org, X86 ML , "netdev@vger.kernel.org" , linux-wireless , virtualization@lists.linux-foundation.org, John Johansen , Greg Kroah-Hartman 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ingo Molnar --- 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