From patchwork Wed Jan 31 14:49:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 194804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1953527dyb; Wed, 31 Jan 2024 07:10:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnD5pYvJIyKynxhJuBWynVCuE6ZhsTOnXGnyEIn3LJKrb3nmj1jcU601zLXkoYZGxPeKGJ X-Received: by 2002:a17:903:22c8:b0:1d8:d3fb:6942 with SMTP id y8-20020a17090322c800b001d8d3fb6942mr2375572plg.51.1706713840757; Wed, 31 Jan 2024 07:10:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706713840; cv=pass; d=google.com; s=arc-20160816; b=nIYqLB/Klghyud1t3krBXmeOrAJU6T4cwtqrM7y0+sDGLIjkPuYfvK/NDKkrSYmAOW QA1i245fi4T9XBw0KQe5Z8UsYFErLK1+zwPxePtE9dwkCNemrchfy7w1/r0d+VjE1vbQ 5Cp/AIlQc9rH9/vSvtIynGb331H6ltdmlZfU9nfdQ6OipGbFWaYAWuphsrO/VGC3NoKD u4ptC0zb0CTTwciGtlgH6gP0fJqGEREOCEUhQtprQzl8wlfFkwnPDc3eut5W90F4rB1c N12lzX2AkVOtcz6vPLu6k+zxb0Q8suZtInEIwgh1lw0KtGRqU0uxHS0ZSFfWV2YuRnt+ AALw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=D0K+ei0pYx2M/YIfe+G1/p1ruQcoxU3kcjnOHUIvPQ8=; fh=S4H6qPdmJk5TBkhG3Nvn2hCKSxyKA3gespoDJXmDmuM=; b=VlUuaMLL6fuKiO01M/ym9HAaCVf+kb9tkbMiI2s3ilRuBd4X01H/7vdVNAmiJGBk4u lA7A7czvowyGSoVxj1Ywt080XS9Xetm7PiHi6QB2FQuMfQMlErMUZE39D6vGgVzC2+qq 62+gkTrQuxolxSi5DoFM8vNoLkzkBqeA1L9p1w3q5ZeZeAgt51Do2RTQj/BBIx5a3XyZ f+8vEZpnSU3PeZdvA/xIpIkxwT+T2zJjoVL+BcKDvDnzG0gTT3pWw+BsUYAAQ7pt9XU8 Mes27hs1/y3lAwOOGKbHwvwiPzQhiV3TrVYM+S04dB/9x+2tvP2TtToO3rp+zLi4LCqR E0Hg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=EnWe27ji; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-46637-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46637-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com X-Forwarded-Encrypted: i=1; AJvYcCXJ2YnpXogkWkjdF+2VH3AvLP1TKpqm79DC1BZ8gBEf/+5pt7xA/xnFZO1olorkWq8yK6lC77w9QsayAtRIBdxiJm28BQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jf18-20020a170903269200b001d8aac2072csi8617072plb.172.2024.01.31.07.10.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:10:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46637-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=EnWe27ji; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-46637-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46637-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 91CEE28E229 for ; Wed, 31 Jan 2024 14:52:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1C9C12C53B; Wed, 31 Jan 2024 14:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="EnWe27ji" Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D58812AAEB for ; Wed, 31 Jan 2024 14:50:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706712625; cv=none; b=koqlDmrZN4iNdGM9v1W0vFisYwF0dFDUcFbDVU0EZeILjBtEStvseePoIznen4TVKJN1WNbkQCh7YhhQzv9xz/0MfK/t3AJqKfgBZEciWEVdsebeBqNlvGtcsVzXd/BHpxYSQz6T9czXRAv13iLKFvlhQRb0hm7wDF6XrzJA968= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706712625; c=relaxed/simple; bh=e3KQQ8+zCLINo4Sf2cQoc1an738oG5Ir6NwQFdrDhx8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Xf6ARLPNVYwaVWIecOstr+KpYbdqYuA2HXbRhfhsDk+8MNrwgo2UNkkRV40eCzZv/HGTR1uPdkgPqR7pzEX1lRVPhnzs1WV6EqwkulC5qCpT8HHL+ox+oc235IxS7jfGL3lDF47jLK876GeeN4IVlD0tbyyCkfbgiPmTDTKUC8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=EnWe27ji; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40efcb37373so20757035e9.2 for ; Wed, 31 Jan 2024 06:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1706712620; x=1707317420; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D0K+ei0pYx2M/YIfe+G1/p1ruQcoxU3kcjnOHUIvPQ8=; b=EnWe27jimHreAIc2Gglk5S8rPcxg4/QWlp5h9U4Yxuv1Eaml/kBUfxThxJ07c6w0PD GKZwBF5SsQwroF0Zv5iB6qhQtglLaP8xh5bDgjOWIrGtS099QaUMQQ0EwAUTTPkD/XQk Tw54kuHffg/ntZVXGh73bP1M+rU9Iih307Gf6KmRPjKakmOTgUHJNgfGVwsNJtN29XyC zEabPQsMK+HTozgO4AAvB+0TO8Y+FMj/ZWpdmkuVpmf2F7bdoWCVv6DFMhzT4NRUdT/3 T3BNguXZYk8fGxmCxKNB1XBOYzmloKPLcqd1cr0FTNs8Gmymicz+NjpkD5amr4tTr4cb o76Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706712620; x=1707317420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D0K+ei0pYx2M/YIfe+G1/p1ruQcoxU3kcjnOHUIvPQ8=; b=Tt6Kz0GmnUGMRacNJs82O9zRc6hl2RwzUsI0bTPRBClcj3qDhtEHL9bn1bmWXODRQK MzxnUl1Kdprc/syMhQ+8hp5s0TLmdQxT61aUxlTGfyNNadyTFK430G7rHZSWEiNlPwty MpeQUfpbggyymKDjeFv0KBLx1MmU+0wqAOOv+kvzgRwkEU7MbrF5Ct3VGF/PD9WALQTL 2394uaB77KaOCad0Cjk1rtKSN+FgB2EWpxxaRzCKDdeZRVp11VKAeA/Cd5FfDmCXbvfm HjeHz0V3ZJ7UCTe8niCy+E8WIVwVMeMCzRHsR79q5IbBRpwUOTf5c0N2akSa3QaQ4oCy 5NHw== X-Gm-Message-State: AOJu0YyHLVhiOzdrmuo6Mg26q4alLSkGKYuYESl1ftXg01F/5hTr9FLB NQrIhZxwfE+gY++a9HkN6M3OSf3L5NqRiigZ7pUBtW2cPfHRmJs3vBKESMfyW1P6q+TPPnqGAoH c X-Received: by 2002:a05:6000:dc9:b0:33a:e43a:4b98 with SMTP id dw9-20020a0560000dc900b0033ae43a4b98mr1419615wrb.7.1706712620249; Wed, 31 Jan 2024 06:50:20 -0800 (PST) Received: from raven.blarg.de (p200300dc6f2f5c00023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f2f:5c00:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id ch15-20020a5d5d0f000000b0033905a60689sm13850173wrb.45.2024.01.31.06.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 06:50:20 -0800 (PST) From: Max Kellermann To: linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH 07/28] sysfs.h: move declarations to sysfs_types.h Date: Wed, 31 Jan 2024 15:49:47 +0100 Message-Id: <20240131145008.1345531-8-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240131145008.1345531-1-max.kellermann@ionos.com> References: <20240131145008.1345531-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789619172442251595 X-GMAIL-MSGID: 1789619172442251595 By providing declarations in a lean header, we can reduce header dependencies. Signed-off-by: Max Kellermann --- drivers/firmware/dmi-sysfs.c | 1 + drivers/firmware/memmap.c | 1 + drivers/input/vivaldi-fmap.c | 1 + drivers/of/kobj.c | 1 + .../staging/greybus/audio_manager_module.c | 1 + include/linux/device/bus.h | 2 +- include/linux/iio/buffer_impl.h | 3 +- include/linux/kobject.h | 2 +- include/linux/module.h | 2 +- include/linux/perf_event.h | 2 +- include/linux/sysfs.h | 63 +------------ include/linux/sysfs_types.h | 89 +++++++++++++++++++ include/linux/thermal.h | 2 +- include/net/netdev_rx_queue.h | 2 +- include/rdma/ib_sysfs.h | 2 +- kernel/kheaders.c | 1 + lib/kobject.c | 1 + mm/cma_sysfs.c | 1 + 18 files changed, 107 insertions(+), 70 deletions(-) create mode 100644 include/linux/sysfs_types.h diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c index 8d91997036e4..6bce0273beca 100644 --- a/drivers/firmware/dmi-sysfs.c +++ b/drivers/firmware/dmi-sysfs.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c index a92d17c6fc0f..b87645e67673 100644 --- a/drivers/firmware/memmap.c +++ b/drivers/firmware/memmap.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /* diff --git a/drivers/input/vivaldi-fmap.c b/drivers/input/vivaldi-fmap.c index 0d29ec014e2f..72845c0720f2 100644 --- a/drivers/input/vivaldi-fmap.c +++ b/drivers/input/vivaldi-fmap.c @@ -9,6 +9,7 @@ #include #include #include +#include #include /** diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c index 3dbce1e6f184..95a7a461f8e9 100644 --- a/drivers/of/kobj.c +++ b/drivers/of/kobj.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include #include +#include #include "of_private.h" diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c index 5f9dcbdbc191..2adb1c1fc2a7 100644 --- a/drivers/staging/greybus/audio_manager_module.c +++ b/drivers/staging/greybus/audio_manager_module.c @@ -6,6 +6,7 @@ */ #include +#include #include "audio_manager.h" #include "audio_manager_private.h" diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index bdd8ac64f629..a6fc75a825a3 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -16,7 +16,7 @@ #include #include -#include // for struct attribute +#include // for struct attribute struct device_driver; struct device_node; diff --git a/include/linux/iio/buffer_impl.h b/include/linux/iio/buffer_impl.h index 184f8c399854..df4cad6a8c8e 100644 --- a/include/linux/iio/buffer_impl.h +++ b/include/linux/iio/buffer_impl.h @@ -1,7 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _IIO_BUFFER_GENERIC_IMPL_H_ #define _IIO_BUFFER_GENERIC_IMPL_H_ -#include + +#include // for struct attribute_group #include #ifdef CONFIG_IIO_BUFFER diff --git a/include/linux/kobject.h b/include/linux/kobject.h index fc5c0fffc262..55e7d15aa7cc 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include // for struct attribute #include #include #include diff --git a/include/linux/module.h b/include/linux/module.h index 426d3bdf83bb..ba3c0d129cb5 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -27,7 +27,7 @@ #include #include #include -#include // for struct attribute +#include // for struct attribute #include #include diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index eaf5d5f76e0e..b3aec977b0e4 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -55,7 +55,7 @@ struct perf_guest_info_callbacks { #include #include #include -#include +#include #include #include #include diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 34e29761d125..b0e27637b400 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -13,6 +13,7 @@ #ifndef _SYSFS_H_ #define _SYSFS_H_ +#include #include #include #include @@ -22,16 +23,6 @@ struct kobject; struct module; struct bin_attribute; -struct attribute { - const char *name; - umode_t mode; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - bool ignore_lockdep:1; - struct lock_class_key *key; - struct lock_class_key skey; -#endif -}; - /** * sysfs_attr_init - initialize a dynamically allocated sysfs attribute * @attr: struct attribute to initialize @@ -53,39 +44,6 @@ do { \ #define sysfs_attr_init(attr) do {} while (0) #endif -/** - * struct attribute_group - data structure used to declare an attribute group. - * @name: Optional: Attribute group name - * If specified, the attribute group will be created in - * a new subdirectory with this name. - * @is_visible: Optional: Function to return permissions associated with an - * attribute of the group. Will be called repeatedly for each - * non-binary attribute in the group. Only read/write - * permissions as well as SYSFS_PREALLOC are accepted. Must - * return 0 if an attribute is not visible. The returned value - * will replace static permissions defined in struct attribute. - * @is_bin_visible: - * Optional: Function to return permissions associated with a - * binary attribute of the group. Will be called repeatedly - * for each binary attribute in the group. Only read/write - * permissions as well as SYSFS_PREALLOC are accepted. Must - * return 0 if a binary attribute is not visible. The returned - * value will replace static permissions defined in - * struct bin_attribute. - * @attrs: Pointer to NULL terminated list of attributes. - * @bin_attrs: Pointer to NULL terminated list of binary attributes. - * Either attrs or bin_attrs or both must be provided. - */ -struct attribute_group { - const char *name; - umode_t (*is_visible)(struct kobject *, - struct attribute *, int); - umode_t (*is_bin_visible)(struct kobject *, - struct bin_attribute *, int); - struct attribute **attrs; - struct bin_attribute **bin_attrs; -}; - /* * Use these macros to make defining attributes easier. * See include/linux/device.h for examples.. @@ -163,25 +121,6 @@ static const struct attribute_group _name##_group = { \ }; \ __ATTRIBUTE_GROUPS(_name) -struct file; -struct vm_area_struct; -struct address_space; - -struct bin_attribute { - struct attribute attr; - size_t size; - void *private; - struct address_space *(*f_mapping)(void); - ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, - char *, loff_t, size_t); - ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *, - char *, loff_t, size_t); - loff_t (*llseek)(struct file *, struct kobject *, struct bin_attribute *, - loff_t, int); - int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr, - struct vm_area_struct *vma); -}; - /** * sysfs_bin_attr_init - initialize a dynamically allocated bin_attribute * @attr: struct bin_attribute to initialize diff --git a/include/linux/sysfs_types.h b/include/linux/sysfs_types.h new file mode 100644 index 000000000000..2840a1935ea1 --- /dev/null +++ b/include/linux/sysfs_types.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * sysfs.h - definitions for the device driver filesystem + * + * Copyright (c) 2001,2002 Patrick Mochel + * Copyright (c) 2004 Silicon Graphics, Inc. + * Copyright (c) 2007 SUSE Linux Products GmbH + * Copyright (c) 2007 Tejun Heo + * + * Please see Documentation/filesystems/sysfs.rst for more information. + */ + +#ifndef _SYSFS_TYPES_H_ +#define _SYSFS_TYPES_H_ + +#include +#include + +struct kobject; +struct module; +struct bin_attribute; + +struct attribute { + const char *name; + umode_t mode; +#ifdef CONFIG_DEBUG_LOCK_ALLOC + bool ignore_lockdep:1; + struct lock_class_key *key; + struct lock_class_key skey; +#endif +}; + +/** + * struct attribute_group - data structure used to declare an attribute group. + * @name: Optional: Attribute group name + * If specified, the attribute group will be created in + * a new subdirectory with this name. + * @is_visible: Optional: Function to return permissions associated with an + * attribute of the group. Will be called repeatedly for each + * non-binary attribute in the group. Only read/write + * permissions as well as SYSFS_PREALLOC are accepted. Must + * return 0 if an attribute is not visible. The returned value + * will replace static permissions defined in struct attribute. + * @is_bin_visible: + * Optional: Function to return permissions associated with a + * binary attribute of the group. Will be called repeatedly + * for each binary attribute in the group. Only read/write + * permissions as well as SYSFS_PREALLOC are accepted. Must + * return 0 if a binary attribute is not visible. The returned + * value will replace static permissions defined in + * struct bin_attribute. + * @attrs: Pointer to NULL terminated list of attributes. + * @bin_attrs: Pointer to NULL terminated list of binary attributes. + * Either attrs or bin_attrs or both must be provided. + */ +struct attribute_group { + const char *name; + umode_t (*is_visible)(struct kobject *, + struct attribute *, int); + umode_t (*is_bin_visible)(struct kobject *, + struct bin_attribute *, int); + struct attribute **attrs; + struct bin_attribute **bin_attrs; +}; + +struct file; +struct vm_area_struct; +struct address_space; + +struct bin_attribute { + struct attribute attr; + size_t size; +#ifdef __cplusplus + void *private_; +#else + void *private; +#endif + struct address_space *(*f_mapping)(void); + ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, + char *, loff_t, size_t); + ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *, + char *, loff_t, size_t); + loff_t (*llseek)(struct file *, struct kobject *, struct bin_attribute *, + loff_t, int); + int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr, + struct vm_area_struct *vma); +}; + +#endif /* _SYSFS_TYPES_H_ */ diff --git a/include/linux/thermal.h b/include/linux/thermal.h index db474472e982..f58dcf5712ad 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h index 4841ec031857..7122cb4b7e44 100644 --- a/include/net/netdev_rx_queue.h +++ b/include/net/netdev_rx_queue.h @@ -4,7 +4,7 @@ #include #include -#include +#include #include /* This structure contains an instance of an RX queue. */ diff --git a/include/rdma/ib_sysfs.h b/include/rdma/ib_sysfs.h index 3b77cfd74d9a..ece1b920c690 100644 --- a/include/rdma/ib_sysfs.h +++ b/include/rdma/ib_sysfs.h @@ -5,7 +5,7 @@ #ifndef DEF_RDMA_IB_SYSFS_H #define DEF_RDMA_IB_SYSFS_H -#include +#include struct ib_device; diff --git a/kernel/kheaders.c b/kernel/kheaders.c index 42163c9e94e5..b48bd8a23cda 100644 --- a/kernel/kheaders.c +++ b/kernel/kheaders.c @@ -10,6 +10,7 @@ #include #include #include +#include /* * Define kernel_headers_data and kernel_headers_data_end, within which the diff --git a/lib/kobject.c b/lib/kobject.c index c7b3513158ad..b7aa69ed802e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -21,6 +21,7 @@ #include #include #include +#include /** * kobject_namespace() - Return @kobj's namespace tag. diff --git a/mm/cma_sysfs.c b/mm/cma_sysfs.c index 56347d15b7e8..8af53a35fbc6 100644 --- a/mm/cma_sysfs.c +++ b/mm/cma_sysfs.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "cma.h"