From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227RA5DH5OQDnfk6khkBkC/ZgVGa4SeAu7ko6shpEqs+GQms7pj6TsHY+crGFw6ZSf9VqFRa ARC-Seal: i=1; a=rsa-sha256; t=1518826705; cv=none; d=google.com; s=arc-20160816; b=OQMNB95/94UAWC9blq+IO8Az3e70SDF539jfaePHbSP8qYami5on6JA28EH/GkRFIA LyrH/Ngb6/QoaGYGhp75kk/mjfxLd6CpAKHjNB7uN2mSa5cwnd9o2nBMW6+Bv4XNe805 xxQs425CnS14AOLdgdF0Lk8lACOyyMUQvV8QlR+fu86hIVAdEenfk+9n9dmzggS6KIoP Y4m8exC/IOBkOHuH6wwnfbRGJP+hWSuSuvqBNe74kidrcEi6lmOpb/Q6Ngx+aJ7vAZpO U5bnqN46cEMDss7wdRQPU7NFWvrsn+/tax9rj179wxpAEbNthFIhN2RpMqEjUhyt5fXL 1yVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version:user-agent :date:message-id:subject:from:cc:to:dkim-signature :arc-authentication-results; bh=NJ1tY1rRJxw4JBTC7JL2bZ3B7jOMKzXvDmO903Os4zg=; b=WbZA4712sHL5KxvAxDTOflhm/n7iHNJ/ZTZMyb/UHd658Bx3P6gTnxKpn3WCfIiwZr on8uoxW+BL9FMPwMMdNUFkQLNxltUWzNmnTZrVI3PicoADZkaWafgeZ7iF/zCDNSWgcR sJ9h2EdfmU2AJI+e68AHg/Hvp+DFf4w4iYlr+eQ2ZYs3hlTzsZ7CRuuCDZfAOXkqVR86 GmyWGoQGBvzwj5mn4h1N8UyeTMKlUiwrIKbWbbGJGLxXSVSghVjE4U1DLENZx4FwJJHb BrrwCXTsYjwJQhv95h1OFll17kJ/m1HTvRSL3dKMzAexM5+pR0woQNZTFzE9B4nNgfLF S2Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=j19iYUxB; spf=pass (google.com: best guess record for domain of rdunlap@infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom=rdunlap@infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=j19iYUxB; spf=pass (google.com: best guess record for domain of rdunlap@infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom=rdunlap@infradead.org To: Linux MM , LKML , Andrew Morton Cc: Greg Kroah-Hartman , Michael Ellerman , Fengguang Wu , Ingo Molnar , Wei Yongjun , Luis Rodriguez , Mimi Zohar , John Johansen From: Randy Dunlap Subject: [PATCH v2/rollup] headers: untangle kmemleak.h from mm.h Message-ID: Date: Fri, 16 Feb 2018 16:17:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1592605231408079621?= X-GMAIL-MSGID: =?utf-8?q?1592605231408079621?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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. Update: This patch has been extensively build-tested by both the 0day bot & kisskb/ozlabs build farms. Both of them reported 2 build failures for which patches are included here (in v2). [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.] Signed-off-by: Randy Dunlap Reviewed-by: Ingo Molnar Cc: Wei Yongjun Cc: Luis R. Rodriguez Cc: Greg Kroah-Hartman Cc: Mimi Zohar Cc: John Johansen Link: http://kisskb.ellerman.id.au/kisskb/head/13396/ Reported-by: Michael Ellerman # 2 build failures Reported-by: Fengguang Wu # 2 build failures --- v2: add patches for build failures in lib/test_firmware.c and security/integrity/digsig.c. + add Ingo's Reviewed-by: tag. 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 + lib/test_firmware.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 - security/integrity/digsig.c | 1 + 23 files changed, 11 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 --- lnx-416-rc1.orig/lib/test_firmware.c +++ lnx-416-rc1/lib/test_firmware.c @@ -21,6 +21,7 @@ #include #include #include +#include #define TEST_FIRMWARE_NAME "test-firmware.bin" #define TEST_FIRMWARE_NUM_REQS 4 --- lnx-416-rc1.orig/security/integrity/digsig.c +++ lnx-416-rc1/security/integrity/digsig.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include