Fast kernel headers: reduce header dependencies
Subsystems (452)
PATCH 5/28 kref.h: move declarations to kref_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- arch/arm64/kvm/vgic/vgic.h | 1 + block/bsg-lib.c | 1 + drivers/acpi/acpi_ipmi.c | 1 + drivers/acpi/ec.c | 1 + drivers/ata/libata-core.c | 1 + drivers/base/core.c | 1 + drivers/char/hw_random/core.c | 1 + drivers/char/ipmi/ipmi_msghandler.c | 1 + drivers/char/xillybus/xillyusb.c | 1 + drivers/clk/clk.c | 1 + drivers/comedi/comedi_buf.c | 1 + drivers/comedi/comedi_fops.c | 1 + drivers/dax/bus.c | 1 + drivers/gpu/drm/drm_auth.c | 1 + drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_drv.c | 1 + drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/nouveau/nvkm/core/memory.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 1 + drivers/greybus/connection.c | 1 + drivers/greybus/operation.c | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-cougar.c | 1 + drivers/hid/hid-debug.c | 1 + drivers/hid/hid-logitech-dj.c | 1 + drivers/hid/wacom_sys.c | 1 + drivers/iio/buffer/industrialio-buffer-dma.c | 1 + drivers/iio/industrialio-buffer.c | 1 + drivers/infiniband/core/cache.c | 1 + drivers/infiniband/core/cm.c | 1 + drivers/infiniband/core/counters.c | 2 ++ drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/restrack.c | 1 + drivers/infiniband/hw/erdma/erdma_cm.c | 1 + drivers/infiniband/hw/erdma/erdma_qp.c | 2 ++ drivers/infiniband/hw/qedr/qedr_iw_cm.c | 2 ++ drivers/infiniband/sw/rxe/rxe_pool.h | 2 ++ drivers/infiniband/sw/rxe/rxe_queue.c | 1 + drivers/infiniband/sw/siw/siw.h | 1 + drivers/infiniband/ulp/isert/ib_isert.c | 1 + drivers/infiniband/ulp/rtrs/rtrs.c | 1 + drivers/infiniband/ulp/srpt/ib_srpt.c | 1 + drivers/media/dvb-core/dvb_ca_en50221.c | 1 + drivers/media/dvb-core/dvb_frontend.c | 1 + drivers/media/dvb-core/dvbdev.c | 1 + drivers/misc/genwqe/card_dev.c | 1 + drivers/mtd/mtd_blkdevs.c | 1 + .../net/ethernet/chelsio/inline_crypto/chtls/chtls.h | 1 + .../ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 1 + drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c | 1 + drivers/net/ethernet/intel/ice/ice_sriov.c | 2 ++ drivers/net/ethernet/intel/ice/ice_vf_lib.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 + .../net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c | 1 + drivers/net/ethernet/qlogic/qede/qede_rdma.c | 1 + drivers/net/pse-pd/pse_core.c | 1 + drivers/net/wireless/ath/carl9170/tx.c | 1 + drivers/nvdimm/core.c | 1 + drivers/nvdimm/dimm.c | 1 + drivers/nvdimm/dimm_devs.c | 1 + drivers/of/dynamic.c | 1 + drivers/of/unittest.c | 1 + drivers/pci/hotplug/acpiphp_glue.c | 1 + drivers/pci/slot.c | 1 + drivers/pci/switch/switchtec.c | 1 + drivers/rpmsg/mtk_rpmsg.c | 1 + drivers/rpmsg/qcom_glink_native.c | 1 + drivers/rpmsg/qcom_smd.c | 1 + drivers/rpmsg/virtio_rpmsg_bus.c | 1 + drivers/scsi/bnx2fc/bnx2fc_els.c | 2 ++ drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 1 + drivers/scsi/bnx2fc/bnx2fc_hwi.c | 2 ++ drivers/scsi/bnx2fc/bnx2fc_io.c | 2 ++ drivers/scsi/bnx2fc/bnx2fc_tgt.c | 3 +++ drivers/scsi/ch.c | 1 + drivers/scsi/cxgbi/libcxgbi.h | 1 + drivers/scsi/device_handler/scsi_dh_alua.c | 1 + drivers/scsi/device_handler/scsi_dh_rdac.c | 1 + drivers/scsi/elx/efct/efct_hw.c | 2 ++ drivers/scsi/elx/efct/efct_io.c | 2 ++ drivers/scsi/elx/efct/efct_lio.c | 2 ++ drivers/scsi/elx/efct/efct_scsi.c | 2 ++ drivers/scsi/elx/efct/efct_unsol.c | 2 ++ drivers/scsi/elx/libefc/efc_domain.c | 2 ++ drivers/scsi/elx/libefc/efc_els.c | 1 + drivers/scsi/elx/libefc/efc_node.c | 2 ++ drivers/scsi/elx/libefc/efc_nport.c | 2 ++ drivers/scsi/fcoe/fcoe_ctlr.c | 1 + drivers/scsi/hosts.c | 1 + drivers/scsi/libfc/fc_disc.c | 1 + drivers/scsi/libfc/fc_exch.c | 1 + drivers/scsi/libfc/fc_lport.c | 1 + drivers/scsi/libfc/fc_rport.c | 1 + drivers/scsi/libsas/sas_internal.h | 1 + drivers/scsi/lpfc/lpfc_bsg.c | 1 + drivers/scsi/lpfc/lpfc_debugfs.c | 1 + drivers/scsi/lpfc/lpfc_els.c | 1 + drivers/scsi/lpfc/lpfc_hbadisc.c | 1 + drivers/scsi/lpfc/lpfc_init.c | 1 + drivers/scsi/lpfc/lpfc_nportdisc.c | 1 + drivers/scsi/lpfc/lpfc_nvme.c | 1 + drivers/scsi/lpfc/lpfc_nvmet.c | 1 + drivers/scsi/lpfc/lpfc_sli.c | 1 + drivers/scsi/mpi3mr/mpi3mr.h | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/qedf/qedf_els.c | 2 ++ drivers/scsi/qedf/qedf_io.c | 1 + drivers/scsi/qedf/qedf_main.c | 1 + drivers/scsi/qla2xxx/qla_inline.h | 3 +++ drivers/scsi/qla4xxx/ql4_isr.c | 2 ++ drivers/scsi/qla4xxx/ql4_os.c | 1 + drivers/scsi/scsi_scan.c | 1 + drivers/scsi/scsi_sysfs.c | 1 + drivers/scsi/sg.c | 1 + drivers/soc/qcom/smem_state.c | 1 + drivers/staging/greybus/authentication.c | 1 + drivers/staging/greybus/fw-download.c | 1 + drivers/staging/greybus/fw-management.c | 1 + drivers/target/iscsi/iscsi_target.c | 1 + drivers/target/iscsi/iscsi_target_nego.c | 1 + drivers/target/iscsi/iscsi_target_tpg.c | 1 + drivers/target/target_core_device.c | 1 + drivers/target/target_core_pr.c | 1 + drivers/target/target_core_tmr.c | 2 ++ drivers/target/target_core_tpg.c | 1 + drivers/target/target_core_transport.c | 1 + drivers/target/target_core_user.c | 1 + drivers/usb/core/config.c | 1 + drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 1 + drivers/usb/core/message.c | 1 + drivers/usb/core/urb.c | 1 + drivers/usb/gadget/function/f_fs.c | 1 + drivers/usb/host/oxu210hp-hcd.c | 1 + drivers/usb/misc/usblcd.c | 1 + drivers/vfio/container.c | 1 + drivers/vhost/scsi.c | 1 + drivers/video/fbdev/smscufx.c | 1 + drivers/xen/xen-scsiback.c | 1 + drivers/xen/xenbus/xenbus_dev_frontend.c | 1 + fs/configfs/item.c | 1 + include/drm/drm_atomic.h | 2 ++ include/drm/drm_auth.h | 2 +- include/drm/drm_device.h | 2 +- include/drm/drm_framebuffer.h | 1 + include/drm/drm_mode_object.h | 2 +- include/kvm/arm_vgic.h | 2 +- include/linux/backing-dev-defs.h | 2 +- include/linux/backing-dev.h | 1 + include/linux/ceph/messenger.h | 2 +- include/linux/ceph/mon_client.h | 2 +- include/linux/ceph/osd_client.h | 2 +- include/linux/comedi/comedidev.h | 2 +- include/linux/configfs.h | 2 +- include/linux/cpu_rmap.h | 2 +- include/linux/dmaengine.h | 1 + include/linux/greybus/connection.h | 2 +- include/linux/greybus/operation.h | 2 +- include/linux/hugetlb.h | 2 +- include/linux/hw_random.h | 2 +- include/linux/iio/buffer-dma.h | 2 +- include/linux/iio/buffer_impl.h | 2 +- include/linux/interrupt.h | 2 +- include/linux/klist.h | 2 +- include/linux/kobject.h | 2 +- include/linux/kref.h | 5 +---- include/linux/kref_types.h | 12 ++++++++++++ include/linux/lockd/lockd.h | 2 +- include/linux/memory-tiers.h | 2 +- include/linux/mm_inline.h | 4 ++++ include/linux/mm_types.h | 2 +- include/linux/mtd/blktrans.h | 2 +- include/linux/nfs_page.h | 2 +- include/linux/relay.h | 2 +- include/linux/rpmsg.h | 2 +- include/linux/sh_clk.h | 2 +- include/linux/sunrpc/xprt.h | 2 +- include/linux/surface_aggregator/serial_hub.h | 2 +- include/linux/tee_drv.h | 2 +- include/linux/usb.h | 2 +- include/linux/usb/serial.h | 2 +- include/linux/watch_queue.h | 2 +- include/media/media-request.h | 1 + include/media/v4l2-device.h | 2 ++ include/net/bluetooth/hci_core.h | 1 + include/net/tls_toe.h | 2 +- include/rdma/ib_verbs.h | 2 +- include/rdma/restrack.h | 2 +- include/rdma/uverbs_types.h | 1 + kernel/irq/manage.c | 1 + kernel/relay.c | 1 + kernel/watch_queue.c | 1 + lib/klist.c | 1 + lib/kobject.c | 1 + mm/memory-tiers.c | 1 + mm/z3fold.c | 1 + mm/zswap.c | 1 + net/can/j1939/main.c | 1 + net/can/j1939/transport.c | 1 + net/dsa/dsa.c | 1 + net/nfc/llcp_core.c | 1 + net/qrtr/af_qrtr.c | 1 + net/rds/message.c | 1 + net/rds/rdma.c | 1 + net/tipc/node.c | 2 ++ net/tipc/subscr.c | 2 ++ net/tipc/topsrv.c | 1 + net/tls/tls_toe.c | 1 + sound/soc/qcom/qdsp6/q6apm.c | 1 + 213 files changed, 257 insertions(+), 41 deletions(-) create mode 100644 include/linux/kref_types.h
arch/arm64/kvm/vgic/vgic.h +1 -0
@@ -6,6 +6,7 @@#define __KVM_ARM_VGIC_NEW_H__#include <linux/irqchip/arm-gic-common.h> +#include <linux/kref.h> #include <asm/kvm_mmu.h> #define PRODUCT_ID_KVM 0x4b/* ASCII code K */
block/bsg-lib.c +1 -0
@@ -9,6 +9,7 @@#include <linux/bsg.h> #include <linux/slab.h> #include <linux/blk-mq.h> +#include <linux/kref.h> #include <linux/delay.h> #include <linux/scatterlist.h> #include <linux/bsg-lib.h>
drivers/acpi/acpi_ipmi.c +1 -0
@@ -11,6 +11,7 @@#include <linux/acpi.h> #include <linux/ipmi.h> #include <linux/spinlock.h> +#include <linux/kref.h> MODULE_AUTHOR ("Zhao Yakui" );MODULE_DESCRIPTION ("ACPI IPMI Opregion driver" );
drivers/acpi/ec.c +1 -0
@@ -28,6 +28,7 @@#include <linux/suspend.h> #include <linux/acpi.h> #include <linux/dmi.h> +#include <linux/kref.h> #include <asm/io.h> #include "internal.h"
drivers/ata/libata-core.c +1 -0
@@ -45,6 +45,7 @@#include <linux/log2.h> #include <linux/slab.h> #include <linux/glob.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h>
drivers/base/core.c +1 -0
@@ -14,6 +14,7 @@#include <linux/err.h> #include <linux/fwnode.h> #include <linux/init.h> +#include <linux/kref.h> #include <linux/kstrtox.h> #include <linux/module.h> #include <linux/slab.h>
drivers/char/hw_random/core.c +1 -0
@@ -25,6 +25,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/uaccess.h> +#include <linux/kref.h> #define RNG_MODULE_NAME "hw_random"
drivers/char/ipmi/ipmi_msghandler.c +1 -0
@@ -37,6 +37,7 @@#include <linux/nospec.h> #include <linux/vmalloc.h> #include <linux/delay.h> +#include <linux/kref.h> #define IPMI_DRIVER_VERSION "39.2"
drivers/char/xillybus/xillyusb.c +1 -0
@@ -28,6 +28,7 @@#include <linux/poll.h> #include <linux/delay.h> #include <linux/usb.h> +#include <linux/kref.h> #include "xillybus_class.h"
drivers/clk/clk.c +1 -0
@@ -9,6 +9,7 @@#include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/clk/clk-conf.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/spinlock.h>
drivers/comedi/comedi_buf.c +1 -0
@@ -9,6 +9,7 @@#include <linux/vmalloc.h> #include <linux/slab.h> +#include <linux/kref.h> #include <linux/comedi/comedidev.h> #include "comedi_internal.h"
drivers/comedi/comedi_fops.c +1 -0
@@ -25,6 +25,7 @@#include <linux/fs.h> #include <linux/comedi/comedidev.h> #include <linux/cdev.h> +#include <linux/kref.h> #include <linux/io.h> #include <linux/uaccess.h>
drivers/dax/bus.c +1 -0
@@ -7,6 +7,7 @@#include <linux/slab.h> #include <linux/dax.h> #include <linux/io.h> +#include <linux/kref.h> #include "dax-private.h" #include "bus.h"
drivers/gpu/drm/drm_auth.c +1 -0
@@ -29,6 +29,7 @@*/ #include <linux/slab.h> +#include <linux/kref.h> #include <drm/drm_auth.h> #include <drm/drm_drv.h>
drivers/gpu/drm/drm_connector.c +1 -0
@@ -35,6 +35,7 @@#include <linux/property.h> #include <linux/uaccess.h> +#include <linux/kref.h> #include <video/cmdline.h>
drivers/gpu/drm/drm_drv.c +1 -0
@@ -34,6 +34,7 @@#include <linux/pseudo_fs.h> #include <linux/slab.h> #include <linux/srcu.h> +#include <linux/kref.h> #include <drm/drm_accel.h> #include <drm/drm_cache.h>
drivers/gpu/drm/msm/msm_gem.h +1 -0
@@ -9,6 +9,7 @@#include <linux/kref.h> #include <linux/dma-resv.h> +#include <linux/ratelimit.h> #include "drm/drm_exec.h" #include "drm/gpu_scheduler.h" #include "msm_drv.h"
drivers/gpu/drm/nouveau/nvkm/core/memory.c +2 -0
@@ -26,6 +26,8 @@#include <subdev/fb.h> #include <subdev/instmem.h> +#include <linux/kref.h> +void nvkm_memory_tags_put (struct nvkm_memory *memory,struct nvkm_device *device,struct nvkm_tags **ptags)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.c +1 -0
@@ -27,6 +27,7 @@#include <core/gpuobj.h> #include <subdev/mmu.h> +#include <linux/kref.h> static void nvkm_cgrp_ectx_put (struct nvkm_cgrp *cgrp,struct nvkm_ectx **pectx)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/chid.c +2 -0
@@ -21,6 +21,8 @@*/ #include "chid.h" +#include <linux/kref.h> +void nvkm_chid_put (struct nvkm_chid *chid,int id,spinlock_t *data_lock) {
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c +1 -0
@@ -23,6 +23,7 @@#include "vmm.h" #include <subdev/fb.h> +#include <linux/kref.h> static void nvkm_vmm_pt_del (struct nvkm_vmm_pt **ppgt)
drivers/greybus/connection.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/workqueue.h> +#include <linux/kref.h> #include <linux/greybus.h> #include "greybus_trace.h"
drivers/greybus/operation.c +1 -0
@@ -13,6 +13,7 @@#include <linux/wait.h> #include <linux/workqueue.h> #include <linux/greybus.h> +#include <linux/kref.h> #include "greybus_trace.h"
drivers/hid/hid-core.c +1 -0
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/list.h> #include <linux/mm.h> #include <linux/spinlock.h>
drivers/hid/hid-cougar.c +1 -0
@@ -8,6 +8,7 @@#include <linux/hid.h> #include <linux/module.h> #include <linux/printk.h> +#include <linux/kref.h> #include "hid-ids.h"
drivers/hid/hid-debug.c +1 -0
@@ -19,6 +19,7 @@#include <linux/debugfs.h> #include <linux/seq_file.h> #include <linux/kfifo.h> +#include <linux/kref.h> #include <linux/sched/signal.h> #include <linux/export.h> #include <linux/slab.h>
drivers/hid/hid-logitech-dj.c +1 -0
@@ -11,6 +11,7 @@#include <linux/hid.h> #include <linux/module.h> #include <linux/kfifo.h> +#include <linux/kref.h> #include <linux/delay.h> #include <linux/usb.h> /* For to_usb_interface for kvm extra intf check */ #include <asm/unaligned.h>
drivers/hid/wacom_sys.c +1 -0
@@ -6,6 +6,7 @@#include "wacom_wac.h" #include "wacom.h" #include <linux/input/mt.h> +#include <linux/kref.h> #define WAC_MSG_RETRIES 5#define WAC_CMD_RETRIES 10
drivers/iio/buffer/industrialio-buffer-dma.c +1 -0
@@ -6,6 +6,7 @@#include <linux/slab.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/device.h> #include <linux/workqueue.h>
drivers/iio/industrialio-buffer.c +1 -0
@@ -19,6 +19,7 @@#include <linux/slab.h> #include <linux/poll.h> #include <linux/sched/signal.h> +#include <linux/kref.h> #include <linux/iio/iio.h> #include <linux/iio/iio-opaque.h>
drivers/infiniband/core/cache.c +1 -0
@@ -38,6 +38,7 @@#include <linux/slab.h> #include <linux/workqueue.h> #include <linux/netdevice.h> +#include <linux/kref.h> #include <net/addrconf.h> #include <rdma/ib_cache.h>
drivers/infiniband/core/cm.c +1 -0
@@ -10,6 +10,7 @@#include <linux/completion.h> #include <linux/dma-mapping.h> #include <linux/device.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/err.h> #include <linux/idr.h>
drivers/infiniband/core/counters.c +2 -0
@@ -8,6 +8,8 @@#include "core_priv.h" #include "restrack.h" +#include <linux/kref.h> +#define ALL_AUTO_MODE_MASKS (RDMA_COUNTER_MASK_QP_TYPE | RDMA_COUNTER_MASK_PID) static int __counter_set_mode(struct rdma_port_counter *port_counter,
drivers/infiniband/core/device.c +1 -0
@@ -35,6 +35,7 @@#include <linux/string.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/netdevice.h>
drivers/infiniband/core/restrack.c +1 -0
@@ -10,6 +10,7 @@#include <linux/mutex.h> #include <linux/sched/task.h> #include <linux/pid_namespace.h> +#include <linux/kref.h> #include "cma_priv.h" #include "restrack.h"
drivers/infiniband/hw/erdma/erdma_cm.c +1 -0
@@ -11,6 +11,7 @@/* Copyright (c) 2017, Open Grid Computing, Inc. */ #include <linux/workqueue.h> +#include <linux/kref.h> #include <trace/events/sock.h> #include "erdma.h"
drivers/infiniband/hw/erdma/erdma_qp.c +2 -0
@@ -9,6 +9,8 @@#include "erdma_cm.h" #include "erdma_verbs.h" +#include <linux/kref.h> +void erdma_qp_llp_close (struct erdma_qp *qp) {struct erdma_qp_attrs qp_attrs;
drivers/infiniband/hw/qedr/qedr_iw_cm.c +2 -0
@@ -39,6 +39,8 @@#include "qedr.h" #include "qedr_iw_cm.h" +#include <linux/kref.h> +static inline void qedr_fill_sockaddr4 (const struct qed_iwarp_cm_info *cm_info,struct iw_cm_event *event)
drivers/infiniband/sw/rxe/rxe_pool.h +2 -0
@@ -7,6 +7,8 @@#ifndef RXE_POOL_H #define RXE_POOL_H +#include <linux/kref.h> +enum rxe_elem_type {RXE_TYPE_UC , RXE_TYPE_PD,
drivers/infiniband/sw/rxe/rxe_queue.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/vmalloc.h> +#include <linux/kref.h> #include "rxe.h" #include "rxe_loc.h" #include "rxe_queue.h"
drivers/infiniband/sw/siw/siw.h +1 -0
@@ -10,6 +10,7 @@#include <rdma/restrack.h> #include <linux/socket.h> #include <linux/skbuff.h> +#include <linux/kref.h> #include <crypto/hash.h> #include <linux/crc32.h> #include <linux/crc32c.h>
drivers/infiniband/ulp/isert/ib_isert.c +1 -0
@@ -14,6 +14,7 @@#include <linux/socket.h> #include <linux/in.h> #include <linux/in6.h> +#include <linux/kref.h> #include <rdma/ib_verbs.h> #include <rdma/ib_cm.h> #include <rdma/rdma_cm.h>
drivers/infiniband/ulp/rtrs/rtrs.c +1 -0
@@ -11,6 +11,7 @@#include <linux/module.h> #include <linux/inet.h> +#include <linux/kref.h> #include "rtrs-pri.h" #include "rtrs-log.h"
drivers/infiniband/ulp/srpt/ib_srpt.c +1 -0
@@ -38,6 +38,7 @@#include <linux/err.h> #include <linux/ctype.h> #include <linux/kthread.h> +#include <linux/kref.h> #include <linux/string.h> #include <linux/delay.h> #include <linux/atomic.h>
drivers/media/dvb-core/dvb_ca_en50221.c +1 -0
@@ -26,6 +26,7 @@#include <linux/spinlock.h> #include <linux/sched/signal.h> #include <linux/kthread.h> +#include <linux/kref.h> #include <media/dvb_ca_en50221.h> #include <media/dvb_ringbuffer.h>
drivers/media/dvb-core/dvb_frontend.c +1 -0
@@ -22,6 +22,7 @@#include <linux/slab.h> #include <linux/poll.h> #include <linux/semaphore.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/nospec.h> #include <linux/list.h>
drivers/media/dvb-core/dvbdev.c +1 -0
@@ -21,6 +21,7 @@#include <linux/fs.h> #include <linux/cdev.h> #include <linux/mutex.h> +#include <linux/kref.h> #include <media/dvbdev.h> /* Due to enum tuner_pad_index */
drivers/misc/genwqe/card_dev.c +1 -0
@@ -25,6 +25,7 @@#include <linux/wait.h> #include <linux/delay.h> #include <linux/atomic.h> +#include <linux/kref.h> #include "card_base.h" #include "card_ddcb.h"
drivers/mtd/mtd_blkdevs.c +1 -0
@@ -20,6 +20,7 @@#include <linux/hdreg.h> #include <linux/mutex.h> #include <linux/uaccess.h> +#include <linux/kref.h> #include "mtdcore.h"
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h +1 -0
@@ -20,6 +20,7 @@#include <crypto/scatterwalk.h> #include <crypto/internal/hash.h> #include <linux/tls.h> +#include <linux/kref.h> #include <net/tls.h> #include <net/tls_prot.h> #include <net/tls_toe.h>
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c +1 -0
@@ -14,6 +14,7 @@#include <linux/inetdevice.h> #include <linux/ip.h> #include <linux/tcp.h> +#include <linux/kref.h> #include <linux/sched/signal.h> #include <linux/kallsyms.h> #include <linux/kprobes.h>
drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c +1 -0
@@ -47,6 +47,7 @@#include <linux/skbuff.h> #include <linux/pci.h> #include <linux/scatterlist.h> +#include <linux/kref.h> #include "libcxgb_ppm.h"
drivers/net/ethernet/intel/ice/ice_sriov.c +2 -0
@@ -14,6 +14,8 @@#include "ice_vf_vsi_vlan_ops.h" #include "ice_vlan.h" +#include <linux/kref.h> +/** * ice_free_vf_entries - Free all VF entries from the hash table * @pf: pointer to the PF structure
drivers/net/ethernet/intel/ice/ice_vf_lib.c +2 -0
@@ -7,6 +7,8 @@#include "ice_fltr.h" #include "ice_virtchnl_allowlist.h" +#include <linux/kref.h> +/* Public functions which may be accessed by all driver files */ /**
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +1 -0
@@ -35,6 +35,7 @@#include <linux/mlx5/driver.h> #include <linux/mlx5/eswitch.h> #include <linux/mlx5/vport.h> +#include <linux/kref.h> #include "lib/devcom.h" #include "mlx5_core.h" #include "eswitch.h"
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c +1 -0
@@ -3,6 +3,7 @@#include <linux/mlx5/vport.h> #include <linux/list.h> +#include <linux/kref.h> #include "lib/devcom.h" #include "mlx5_core.h"
drivers/net/ethernet/mellanox/mlx5/core/uar.c +1 -0
@@ -31,6 +31,7 @@*/ #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/mlx5/driver.h> #include "mlx5_core.h"
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c +1 -0
@@ -19,6 +19,7 @@#include <linux/sched.h> #include <linux/slab.h> #include <linux/wait.h> +#include <linux/kref.h> #include "nfp_arm.h" #include "nfp_cpp.h"
drivers/net/ethernet/qlogic/qede/qede_rdma.c +1 -0
@@ -7,6 +7,7 @@#include <linux/pci.h> #include <linux/netdevice.h> #include <linux/list.h> +#include <linux/kref.h> #include <linux/mutex.h> #include <linux/qed/qede_rdma.h> #include "qede.h"
drivers/net/pse-pd/pse_core.c +1 -0
@@ -8,6 +8,7 @@#include <linux/device.h> #include <linux/of.h> #include <linux/pse-pd/pse.h> +#include <linux/kref.h> static DEFINE_MUTEX (pse_list_mutex);static LIST_HEAD (pse_controller_list);
drivers/net/wireless/ath/carl9170/tx.c +1 -0
@@ -40,6 +40,7 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/etherdevice.h> +#include <linux/kref.h> #include <net/mac80211.h> #include "carl9170.h" #include "hw.h"
drivers/nvdimm/core.c +1 -0
@@ -14,6 +14,7 @@#include <linux/mutex.h> #include <linux/slab.h> #include <linux/io.h> +#include <linux/kref.h> #include "nd-core.h" #include "nd.h"
drivers/nvdimm/dimm.c +1 -0
@@ -10,6 +10,7 @@#include <linux/slab.h> #include <linux/mm.h> #include <linux/nd.h> +#include <linux/kref.h> #include "label.h" #include "nd.h"
drivers/nvdimm/dimm_devs.c +1 -0
@@ -11,6 +11,7 @@#include <linux/io.h> #include <linux/fs.h> #include <linux/mm.h> +#include <linux/kref.h> #include "nd-core.h" #include "label.h" #include "pmem.h"
drivers/of/dynamic.c +1 -0
@@ -14,6 +14,7 @@#include <linux/slab.h> #include <linux/string.h> #include <linux/proc_fs.h> +#include <linux/kref.h> #include "of_private.h"
drivers/of/unittest.c +1 -0
@@ -11,6 +11,7 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/hashtable.h> +#include <linux/kref.h> #include <linux/libfdt.h> #include <linux/of.h> #include <linux/of_address.h>
drivers/pci/hotplug/acpiphp_glue.c +1 -0
@@ -37,6 +37,7 @@#include <linux/mutex.h> #include <linux/slab.h> #include <linux/acpi.h> +#include <linux/kref.h> #include "../pci.h" #include "acpiphp.h"
drivers/pci/slot.c +1 -0
@@ -10,6 +10,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/err.h> +#include <linux/kref.h> #include "pci.h" struct kset *pci_slots_kset;
drivers/pci/switch/switchtec.c +1 -0
@@ -16,6 +16,7 @@#include <linux/wait.h> #include <linux/io-64-nonatomic-lo-hi.h> #include <linux/nospec.h> +#include <linux/kref.h> MODULE_DESCRIPTION ("Microsemi Switchtec(tm) PCIe Management Driver" );MODULE_VERSION ("0.1" );
drivers/rpmsg/mtk_rpmsg.c +1 -0
@@ -10,6 +10,7 @@#include <linux/rpmsg/mtk_rpmsg.h> #include <linux/slab.h> #include <linux/workqueue.h> +#include <linux/kref.h> #include "rpmsg_internal.h"
drivers/rpmsg/qcom_glink_native.c +1 -0
@@ -19,6 +19,7 @@#include <linux/wait.h> #include <linux/workqueue.h> #include <linux/mailbox_client.h> +#include <linux/kref.h> #include "rpmsg_internal.h" #include "qcom_glink_native.h"
drivers/rpmsg/qcom_smd.c +1 -0
@@ -20,6 +20,7 @@#include <linux/wait.h> #include <linux/rpmsg.h> #include <linux/rpmsg/qcom_smd.h> +#include <linux/kref.h> #include "rpmsg_internal.h"
drivers/rpmsg/virtio_rpmsg_bus.c +1 -0
@@ -15,6 +15,7 @@#include <linux/idr.h> #include <linux/jiffies.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/rpmsg.h>
drivers/scsi/bnx2fc/bnx2fc_els.c +2 -0
@@ -16,6 +16,8 @@#include "bnx2fc.h" +#include <linux/kref.h> +static void bnx2fc_logo_resp (struct fc_seq *seq,struct fc_frame *fp,void *arg); static void bnx2fc_flogi_resp(struct fc_seq *seq, struct fc_frame *fp,
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +1 -0
@@ -17,6 +17,7 @@#include "bnx2fc.h" #include <linux/ethtool.h> +#include <linux/kref.h> static struct list_head adapter_list;static struct list_head if_list;
drivers/scsi/bnx2fc/bnx2fc_hwi.c +2 -0
@@ -15,6 +15,8 @@#include "bnx2fc.h" +#include <linux/kref.h> + DECLARE_PER_CPU(struct bnx2fc_percpu_s, bnx2fc_percpu); static void bnx2fc_fastpath_notification(struct bnx2fc_hba *hba,
drivers/scsi/bnx2fc/bnx2fc_io.c +2 -0
@@ -14,6 +14,8 @@#include "bnx2fc.h" +#include <linux/kref.h> +#define RESERVE_FREE_LIST_INDEX num_possible_cpus() static int bnx2fc_split_bd(struct bnx2fc_cmd *io_req, u64 addr, int sg_len,
drivers/scsi/bnx2fc/bnx2fc_tgt.c +3 -0
@@ -14,6 +14,9 @@*/ #include "bnx2fc.h" + +#include <linux/kref.h> +static void bnx2fc_upld_timer (struct timer_list *t);static void bnx2fc_ofld_timer (struct timer_list *t); static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt,
drivers/scsi/ch.c +1 -0
@@ -24,6 +24,7 @@#include <linux/mutex.h> #include <linux/idr.h> #include <linux/slab.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h>
drivers/scsi/cxgbi/libcxgbi.h +1 -0
@@ -15,6 +15,7 @@#define __LIBCXGBI_H__#include <linux/kernel.h> +#include <linux/kref.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/debugfs.h>
drivers/scsi/device_handler/scsi_dh_alua.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/slab.h> #include <linux/delay.h> +#include <linux/kref.h> #include <linux/module.h> #include <asm/unaligned.h> #include <scsi/scsi.h>
drivers/scsi/device_handler/scsi_dh_rdac.c +1 -0
@@ -25,6 +25,7 @@#include <linux/workqueue.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/kref.h> #define RDAC_NAME "rdac"#define RDAC_RETRY_COUNT 5
drivers/scsi/elx/efct/efct_hw.c +2 -0
@@ -8,6 +8,8 @@#include "efct_hw.h" #include "efct_unsol.h" +#include <linux/kref.h> +struct efct_hw_link_stat_cb_arg {void (*cb)(int status,u32 num_counters,struct efct_hw_link_stat_counts *counters,void *arg);
drivers/scsi/elx/efct/efct_io.c +2 -0
@@ -8,6 +8,8 @@#include "efct_hw.h" #include "efct_io.h" +#include <linux/kref.h> +struct efct_io_pool {struct efct *efct;spinlock_t lock;/* IO pool lock */
drivers/scsi/elx/efct/efct_lio.c +2 -0
@@ -9,6 +9,8 @@#include "efct_driver.h" #include "efct_lio.h" +#include <linux/kref.h> +/* * lio_wq is used to call the LIO backed during creation or deletion of * sessions. This brings serialization to the session management as we create
drivers/scsi/elx/efct/efct_scsi.c +2 -0
@@ -7,6 +7,8 @@#include "efct_driver.h" #include "efct_hw.h" +#include <linux/kref.h> +#define enable_tsend_auto_resp (efct) 1#define enable_treceive_auto_resp (efct) 0
drivers/scsi/elx/efct/efct_unsol.c +2 -0
@@ -7,6 +7,8 @@#include "efct_driver.h" #include "efct_unsol.h" +#include <linux/kref.h> +#define frame_printf (efct, hdr, fmt, ...) \ do { \ char s_id_text[16]; \
drivers/scsi/elx/libefc/efc_domain.c +2 -0
@@ -10,6 +10,8 @@#include "efc.h" +#include <linux/kref.h> +int efc_domain_cb (void *arg,int event,void *data) {
drivers/scsi/elx/libefc/efc_els.c +1 -0
@@ -11,6 +11,7 @@#include "efc.h" #include "efc_els.h" #include "../libefc_sli/sli4.h" +#include <linux/kref.h> #define EFC_LOG_ENABLE_ELS_TRACE (efc) \ (((efc) != NULL) ? (((efc)->logmask & (1U << 1)) != 0) : 0)
drivers/scsi/elx/libefc/efc_node.c +2 -0
@@ -6,6 +6,8 @@#include "efc.h" +#include <linux/kref.h> +int efc_remote_node_cb (void *arg,int event,void *data) {
drivers/scsi/elx/libefc/efc_nport.c +2 -0
@@ -27,6 +27,8 @@#include "efc.h" +#include <linux/kref.h> +void efc_nport_cb (void *arg,int event,void *data) {
drivers/scsi/fcoe/fcoe_ctlr.c +1 -0
@@ -20,6 +20,7 @@#include <linux/errno.h> #include <linux/bitops.h> #include <linux/slab.h> +#include <linux/kref.h> #include <net/rtnetlink.h> #include <scsi/fc/fc_els.h>
drivers/scsi/hosts.c +1 -0
@@ -35,6 +35,7 @@#include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/idr.h> +#include <linux/kref.h> #include <scsi/scsi_device.h> #include <scsi/scsi_host.h> #include <scsi/scsi_transport.h>
drivers/scsi/libfc/fc_disc.c +1 -0
@@ -25,6 +25,7 @@#include <linux/err.h> #include <linux/export.h> #include <linux/list.h> +#include <linux/kref.h> #include <asm/unaligned.h>
drivers/scsi/libfc/fc_exch.c +1 -0
@@ -16,6 +16,7 @@#include <linux/err.h> #include <linux/export.h> #include <linux/log2.h> +#include <linux/kref.h> #include <scsi/fc/fc_fc2.h>
drivers/scsi/libfc/fc_lport.c +1 -0
@@ -79,6 +79,7 @@#include <linux/delay.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/kref.h> #include <asm/unaligned.h> #include <scsi/fc/fc_gs.h>
drivers/scsi/libfc/fc_rport.c +1 -0
@@ -54,6 +54,7 @@#include <linux/workqueue.h> #include <linux/export.h> #include <linux/rculist.h> +#include <linux/kref.h> #include <asm/unaligned.h>
drivers/scsi/libsas/sas_internal.h +1 -0
@@ -15,6 +15,7 @@#include <scsi/libsas.h> #include <scsi/sas_ata.h> #include <linux/pm_runtime.h> +#include <linux/kref.h> #ifdef pr_fmt#undef pr_fmt
drivers/scsi/lpfc/lpfc_bsg.c +1 -0
@@ -28,6 +28,7 @@#include <linux/list.h> #include <linux/bsg-lib.h> #include <linux/vmalloc.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h>
drivers/scsi/lpfc/lpfc_debugfs.c +1 -0
@@ -27,6 +27,7 @@#include <linux/idr.h> #include <linux/interrupt.h> #include <linux/kthread.h> +#include <linux/kref.h> #include <linux/slab.h> #include <linux/pci.h> #include <linux/spinlock.h>
drivers/scsi/lpfc/lpfc_els.c +1 -0
@@ -26,6 +26,7 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h>
drivers/scsi/lpfc/lpfc_hbadisc.c +1 -0
@@ -29,6 +29,7 @@#include <linux/interrupt.h> #include <linux/lockdep.h> #include <linux/utsname.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h>
drivers/scsi/lpfc/lpfc_init.c +1 -0
@@ -28,6 +28,7 @@#include <linux/interrupt.h> #include <linux/module.h> #include <linux/kthread.h> +#include <linux/kref.h> #include <linux/pci.h> #include <linux/spinlock.h> #include <linux/sched/clock.h>
drivers/scsi/lpfc/lpfc_nportdisc.c +1 -0
@@ -25,6 +25,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/interrupt.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h>
drivers/scsi/lpfc/lpfc_nvme.c +1 -0
@@ -23,6 +23,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/interrupt.h> +#include <linux/kref.h> #include <linux/delay.h> #include <asm/unaligned.h> #include <linux/crc-t10dif.h>
drivers/scsi/lpfc/lpfc_nvmet.c +1 -0
@@ -23,6 +23,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/interrupt.h> +#include <linux/kref.h> #include <linux/delay.h> #include <asm/unaligned.h> #include <linux/crc-t10dif.h>
drivers/scsi/lpfc/lpfc_sli.c +1 -0
@@ -25,6 +25,7 @@#include <linux/pci.h> #include <linux/interrupt.h> #include <linux/delay.h> +#include <linux/kref.h> #include <linux/slab.h> #include <linux/lockdep.h>
drivers/scsi/mpi3mr/mpi3mr.h +1 -0
@@ -20,6 +20,7 @@#include <linux/io.h> #include <linux/interrupt.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/miscdevice.h> #include <linux/module.h> #include <linux/pci.h>
drivers/scsi/mpt3sas/mpt3sas_base.h +1 -0
@@ -68,6 +68,7 @@#include <linux/pci.h> #include <linux/poll.h> #include <linux/irq_poll.h> +#include <linux/kref.h> #include "mpt3sas_debug.h" #include "mpt3sas_trigger_diag.h"
drivers/scsi/qedf/qedf_els.c +2 -0
@@ -5,6 +5,8 @@*/ #include "qedf.h" +#include <linux/kref.h> +/* It's assumed that the lock is held when calling this function. */ static int qedf_initiate_els(struct qedf_rport *fcport, unsigned int op, void *data, uint32_t data_len,
drivers/scsi/qedf/qedf_io.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/spinlock.h> #include <linux/vmalloc.h> +#include <linux/kref.h> #include "qedf.h" #include <scsi/scsi_tcq.h>
drivers/scsi/qedf/qedf_main.c +1 -0
@@ -20,6 +20,7 @@#include <linux/if_ether.h> #include <linux/if_vlan.h> #include <linux/cpu.h> +#include <linux/kref.h> #include "qedf.h" #include "qedf_dbg.h" #include <uapi/linux/pci_regs.h>
drivers/scsi/qla2xxx/qla_inline.h +3 -0
@@ -5,6 +5,9 @@*/ #include "qla_target.h" + +#include <linux/kref.h> +/** * qla24xx_calc_iocbs() - Determine number of Command Type 3 and * Continuation Type 1 IOCBs to allocate.
drivers/scsi/qla4xxx/ql4_isr.c +2 -0
@@ -9,6 +9,8 @@#include "ql4_dbg.h" #include "ql4_inline.h" +#include <linux/kref.h> +/** * qla4xxx_copy_sense - copy sense data into cmd sense buffer * @ha: Pointer to host adapter structure.
drivers/scsi/qla4xxx/ql4_os.c +1 -0
@@ -8,6 +8,7 @@#include <linux/blkdev.h> #include <linux/iscsi_boot_sysfs.h> #include <linux/inet.h> +#include <linux/kref.h> #include <scsi/scsi_tcq.h> #include <scsi/scsicam.h>
drivers/scsi/scsi_scan.c +1 -0
@@ -35,6 +35,7 @@#include <linux/spinlock.h> #include <linux/async.h> #include <linux/slab.h> +#include <linux/kref.h> #include <asm/unaligned.h> #include <scsi/scsi.h>
drivers/scsi/scsi_sysfs.c +1 -0
@@ -14,6 +14,7 @@#include <linux/device.h> #include <linux/pm_runtime.h> #include <linux/bsg.h> +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_device.h>
drivers/scsi/sg.c +1 -0
@@ -48,6 +48,7 @@ static int sg_version_num = 30536; /* 2 digits for each component */#include <linux/ratelimit.h> #include <linux/uio.h> #include <linux/cred.h> /* for sg_check_file_access() */ +#include <linux/kref.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h>
drivers/soc/qcom/smem_state.c +1 -0
@@ -9,6 +9,7 @@#include <linux/of.h> #include <linux/slab.h> #include <linux/soc/qcom/smem_state.h> +#include <linux/kref.h> static LIST_HEAD (smem_states);static DEFINE_MUTEX (list_lock);
drivers/staging/greybus/authentication.c +1 -0
@@ -11,6 +11,7 @@#include <linux/fs.h> #include <linux/ioctl.h> #include <linux/uaccess.h> +#include <linux/kref.h> #include "greybus_authentication.h" #include "firmware.h"
drivers/staging/greybus/fw-download.c +1 -0
@@ -8,6 +8,7 @@#include <linux/firmware.h> #include <linux/jiffies.h> +#include <linux/kref.h> #include <linux/mutex.h> #include <linux/workqueue.h> #include <linux/greybus.h>
drivers/staging/greybus/fw-management.c +1 -0
@@ -14,6 +14,7 @@#include <linux/ioctl.h> #include <linux/uaccess.h> #include <linux/greybus.h> +#include <linux/kref.h> #include "firmware.h" #include "greybus_firmware.h"
drivers/target/iscsi/iscsi_target.c +1 -0
@@ -16,6 +16,7 @@#include <linux/vmalloc.h> #include <linux/idr.h> #include <linux/delay.h> +#include <linux/kref.h> #include <linux/sched/signal.h> #include <asm/unaligned.h> #include <linux/inet.h>
drivers/target/iscsi/iscsi_target_nego.c +1 -0
@@ -12,6 +12,7 @@#include <linux/kthread.h> #include <linux/slab.h> #include <linux/sched/signal.h> +#include <linux/kref.h> #include <net/sock.h> #include <trace/events/sock.h> #include <scsi/iscsi_proto.h>
drivers/target/iscsi/iscsi_target_tpg.c +1 -0
@@ -9,6 +9,7 @@******************************************************************************/ #include <linux/slab.h> +#include <linux/kref.h> #include <target/target_core_base.h> #include <target/target_core_fabric.h> #include <target/iscsi/iscsi_target_core.h>
drivers/target/target_core_device.c +1 -0
@@ -17,6 +17,7 @@#include <linux/timer.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/kref.h> #include <linux/kthread.h> #include <linux/in.h> #include <linux/export.h>
drivers/target/target_core_pr.c +1 -0
@@ -18,6 +18,7 @@#include <linux/file.h> #include <linux/fcntl.h> #include <linux/fs.h> +#include <linux/kref.h> #include <scsi/scsi_proto.h> #include <asm/unaligned.h>
drivers/target/target_core_tmr.c +2 -0
@@ -14,6 +14,8 @@#include <linux/spinlock.h> #include <linux/list.h> #include <linux/export.h> +#include <linux/workqueue.h> +#include <linux/kref.h> #include <target/target_core_base.h> #include <target/target_core_backend.h>
drivers/target/target_core_tpg.c +1 -0
@@ -17,6 +17,7 @@#include <linux/spinlock.h> #include <linux/in.h> #include <linux/export.h> +#include <linux/kref.h> #include <net/sock.h> #include <net/tcp.h> #include <scsi/scsi_proto.h>
drivers/target/target_core_transport.c +1 -0
@@ -16,6 +16,7 @@#include <linux/timer.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/kref.h> #include <linux/kthread.h> #include <linux/in.h> #include <linux/cdrom.h>
drivers/target/target_core_user.c +1 -0
@@ -21,6 +21,7 @@#include <linux/mutex.h> #include <linux/workqueue.h> #include <linux/pagemap.h> +#include <linux/kref.h> #include <net/genetlink.h> #include <scsi/scsi_common.h> #include <scsi/scsi_proto.h>
drivers/usb/core/config.c +1 -0
@@ -10,6 +10,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/device.h> +#include <linux/kref.h> #include <asm/byteorder.h> #include "usb.h"
drivers/usb/core/hcd.c +1 -0
@@ -32,6 +32,7 @@#include <linux/genalloc.h> #include <linux/io.h> #include <linux/kcov.h> +#include <linux/kref.h> #include <linux/phy/phy.h> #include <linux/usb.h>
drivers/usb/core/hub.c +1 -0
@@ -31,6 +31,7 @@#include <linux/random.h> #include <linux/pm_qos.h> #include <linux/kobject.h> +#include <linux/kref.h> #include <linux/bitfield.h> #include <linux/uaccess.h>
drivers/usb/core/message.c +1 -0
@@ -21,6 +21,7 @@#include <linux/usb/quirks.h> #include <linux/usb/hcd.h> /* for usbcore internals */ #include <linux/usb/of.h> +#include <linux/kref.h> #include <asm/byteorder.h> #include "usb.h"
drivers/usb/core/urb.c +1 -0
@@ -13,6 +13,7 @@#include <linux/wait.h> #include <linux/usb/hcd.h> #include <linux/scatterlist.h> +#include <linux/kref.h> #define to_urb (d) container_of(d, struct urb, kref)
drivers/usb/gadget/function/f_fs.c +1 -0
@@ -25,6 +25,7 @@#include <linux/sched/signal.h> #include <linux/uio.h> #include <linux/vmalloc.h> +#include <linux/kref.h> #include <asm/unaligned.h> #include <linux/usb/ccid.h>
drivers/usb/host/oxu210hp-hcd.c +1 -0
@@ -25,6 +25,7 @@#include <linux/dma-mapping.h> #include <linux/io.h> #include <linux/iopoll.h> +#include <linux/kref.h> #include <asm/irq.h> #include <asm/unaligned.h>
drivers/usb/misc/usblcd.c +1 -0
@@ -21,6 +21,7 @@#include <linux/rwsem.h> #include <linux/uaccess.h> #include <linux/usb.h> +#include <linux/kref.h> #define DRIVER_VERSION "USBLCD Driver Version 1.05"
drivers/vfio/container.c +1 -0
@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/capability.h> #include <linux/iommu.h> +#include <linux/kref.h> #include <linux/miscdevice.h> #include <linux/vfio.h> #include <uapi/linux/vfio.h>
drivers/vhost/scsi.c +1 -0
@@ -36,6 +36,7 @@#include <linux/virtio_scsi.h> #include <linux/llist.h> #include <linux/bitmap.h> +#include <linux/kref.h> #include "vhost.h"
drivers/video/fbdev/smscufx.c +1 -0
@@ -29,6 +29,7 @@#include <linux/vmalloc.h> #include <linux/slab.h> #include <linux/delay.h> +#include <linux/kref.h> #include "edid.h" #define check_warn(status, fmt, args...) \
drivers/xen/xen-scsiback.c +1 -0
@@ -44,6 +44,7 @@#include <linux/delay.h> #include <linux/spinlock.h> #include <linux/configfs.h> +#include <linux/kref.h> #include <generated/utsrelease.h>
drivers/xen/xenbus/xenbus_dev_frontend.c +1 -0
@@ -56,6 +56,7 @@#include <linux/slab.h> #include <linux/miscdevice.h> #include <linux/workqueue.h> +#include <linux/kref.h> #include <xen/xenbus.h> #include <xen/xen.h>
fs/configfs/item.c +1 -0
@@ -15,6 +15,7 @@#include <linux/module.h> #include <linux/stat.h> #include <linux/slab.h> +#include <linux/kref.h> #include <linux/configfs.h>
include/drm/drm_atomic.h +2 -0
@@ -31,6 +31,8 @@#include <drm/drm_crtc.h> #include <drm/drm_util.h> +#include <linux/kref.h> +/** * struct drm_crtc_commit - track modeset commits on a CRTC *
include/drm/drm_auth.h +1 -1
@@ -29,7 +29,7 @@*/ #include <linux/idr.h> -#include <linux/kref.h> +#include <linux/kref_types.h> struct drm_file ;
include/drm/drm_device.h +1 -1
@@ -2,7 +2,7 @@#define _DRM_DEVICE_H_#include <linux/list.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mutex_types.h> #include <linux/idr.h>
include/drm/drm_framebuffer.h +1 -0
@@ -26,6 +26,7 @@#include <linux/ctype.h> #include <linux/list.h> #include <linux/sched.h> +#include <linux/kref.h> #include <drm/drm_fourcc.h> #include <drm/drm_mode_object.h>
include/drm/drm_mode_object.h +1 -1
@@ -23,7 +23,7 @@#ifndef __DRM_MODESET_H__#define __DRM_MODESET_H__ -#include <linux/kref.h> +#include <linux/kref_types.h> #include <drm/drm_lease.h> struct drm_object_properties ;struct drm_property ;
include/kvm/arm_vgic.h +1 -1
@@ -8,7 +8,7 @@#include <linux/bits.h> #include <linux/kvm.h> #include <linux/irqreturn.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mutex_types.h> #include <linux/spinlock_types.h> #include <linux/static_key.h>
include/linux/backing-dev-defs.h +1 -1
@@ -12,7 +12,7 @@#include <linux/timer_types.h> #include <linux/wait.h> #include <linux/workqueue_types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #ifdef CONFIG_CGROUP_WRITEBACK #include <linux/rwsem.h>
include/linux/backing-dev.h +1 -0
@@ -16,6 +16,7 @@#include <linux/writeback.h> #include <linux/backing-dev-defs.h> #include <linux/slab.h> +#include <linux/kref.h> static inline struct backing_dev_info *bdi_get (struct backing_dev_info *bdi) {
include/linux/ceph/messenger.h +1 -1
@@ -4,7 +4,7 @@#include <linux/bvec.h> #include <linux/crypto.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mutex_types.h> #include <linux/net.h> #include <linux/uio.h>
include/linux/ceph/mon_client.h +1 -1
@@ -3,7 +3,7 @@#define _FS_CEPH_MON_CLIENT_H#include <linux/completion.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/rbtree_types.h> #include <linux/ceph/messenger.h>
include/linux/ceph/osd_client.h +1 -1
@@ -4,7 +4,7 @@#include <linux/bitrev.h> #include <linux/completion.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mempool.h> #include <linux/rbtree_types.h> #include <linux/refcount_types.h>
include/linux/comedi/comedidev.h +1 -1
@@ -14,7 +14,7 @@#include <linux/mutex_types.h> #include <linux/spinlock_types.h> #include <linux/rwsem.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/comedi.h> #define COMEDI_VERSION (a, b, c) (((a) << 16) + ((b) << 8) + (c))
include/linux/configfs.h +1 -1
@@ -22,7 +22,7 @@#include <linux/stat.h> /* S_IRUGO */ #include <linux/types.h> /* ssize_t */ #include <linux/list.h> /* struct list_head */ -#include <linux/kref.h> /* struct kref */ +#include <linux/kref_types.h> /* struct kref */ #include <linux/mutex_types.h> /* struct mutex */ #define CONFIGFS_ITEM_NAME_LEN 20
include/linux/cpu_rmap.h +1 -1
@@ -10,7 +10,7 @@#include <linux/cpumask.h> #include <linux/gfp_types.h> #include <linux/slab.h> -#include <linux/kref.h> +#include <linux/kref_types.h> /** * struct cpu_rmap - CPU affinity reverse-map
include/linux/dmaengine.h +1 -0
@@ -13,6 +13,7 @@#include <linux/scatterlist.h> #include <linux/bitmap.h> #include <linux/types.h> +#include <linux/kref.h> #include <asm/page.h> /**
include/linux/greybus/connection.h +1 -1
@@ -12,7 +12,7 @@#include <linux/bits.h> #include <linux/list.h> #include <linux/kfifo.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #define GB_CONNECTION_FLAG_CSD BIT(0)#define GB_CONNECTION_FLAG_NO_FLOWCTRL BIT(1)
include/linux/greybus/operation.h +1 -1
@@ -10,7 +10,7 @@#define __OPERATION_H#include <linux/completion.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/timer_types.h> #include <linux/types.h> #include <linux/workqueue_types.h>
include/linux/hugetlb.h +1 -1
@@ -10,7 +10,7 @@#include <linux/cgroup.h> #include <linux/page_ref.h> #include <linux/list.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/pgtable.h> #include <linux/gfp_types.h> #include <linux/userfaultfd_k.h>
include/linux/hw_random.h +1 -1
@@ -15,7 +15,7 @@#include <linux/completion.h> #include <linux/types.h> #include <linux/list.h> -#include <linux/kref.h> +#include <linux/kref_types.h> /** * struct hwrng - Hardware Random Number Generator driver
include/linux/iio/buffer-dma.h +1 -1
@@ -8,7 +8,7 @@#define __INDUSTRIALIO_DMA_BUFFER_H__#include <linux/list.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/spinlock_types.h> #include <linux/mutex_types.h> #include <linux/iio/buffer_impl.h>
include/linux/iio/buffer_impl.h +1 -1
@@ -2,7 +2,7 @@#ifndef _IIO_BUFFER_GENERIC_IMPL_H_#define _IIO_BUFFER_GENERIC_IMPL_H_#include <linux/sysfs.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #ifdef CONFIG_IIO_BUFFER
include/linux/interrupt.h +1 -1
@@ -10,7 +10,7 @@#include <linux/irqnr.h> #include <linux/hardirq.h> #include <linux/irqflags.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/workqueue_types.h> #include <linux/jump_label.h>
include/linux/klist.h +1 -1
@@ -11,7 +11,7 @@#define _LINUX_KLIST_H#include <linux/spinlock_types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> struct klist_node ;
include/linux/kobject.h +1 -1
@@ -21,7 +21,7 @@#include <linux/compiler.h> #include <linux/container_of.h> #include <linux/spinlock_types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/kobject_ns.h> #include <linux/uidgid_types.h>
include/linux/kref.h +1 -4
@@ -13,12 +13,9 @@#ifndef _KREF_H_#define _KREF_H_ +#include <linux/kref_types.h> #include <linux/refcount.h> -struct kref { -refcount_t refcount; -}; -#define KREF_INIT (n) { .refcount = REFCOUNT_INIT(n), }/**
include/linux/kref_types.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _KREF_TYPES_H_ +#define _KREF_TYPES_H_ + +#include <linux/refcount_types.h> + +struct kref { +refcount_t refcount; +}; + +#endif /* _KREF_TYPES_H_ */
include/linux/lockd/lockd.h +1 -1
@@ -16,7 +16,7 @@#include <linux/in6.h> #include <net/ipv6.h> #include <linux/fs.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/refcount_types.h> #include <linux/utsname.h> #include <linux/lockd/bind.h>
include/linux/memory-tiers.h +1 -1
@@ -4,7 +4,7 @@#include <linux/types.h> #include <linux/nodemask_types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mmzone.h> #include <linux/notifier.h> /*
include/linux/mm_inline.h +4 -0
@@ -10,6 +10,10 @@#include <linux/userfaultfd_k.h> #include <linux/swapops.h> +#ifdef CONFIG_ANON_VMA_NAME +#include <linux/kref.h> +#endif +/** * folio_is_file_lru - Should the folio be on a file LRU or anon LRU? * @folio: The folio to test.
include/linux/mm_types.h +1 -1
@@ -5,7 +5,7 @@#include <linux/mm_types_task.h> #include <linux/auxvec.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> #include <linux/spinlock_types.h> #include <linux/rbtree_types.h>
include/linux/mtd/blktrans.h +1 -1
@@ -7,7 +7,7 @@#define __MTD_TRANS_H__#include <linux/mutex_types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> struct hd_geometry ;
include/linux/nfs_page.h +1 -1
@@ -16,7 +16,7 @@#include <linux/sunrpc/auth.h> #include <linux/nfs_xdr.h> -#include <linux/kref.h> +#include <linux/kref_types.h> /* * Valid flags for a dirty buffer
include/linux/relay.h +1 -1
@@ -19,7 +19,7 @@#include <linux/bug.h> #include <linux/fs.h> #include <linux/poll.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/percpu.h> /*
include/linux/rpmsg.h +1 -1
@@ -14,7 +14,7 @@#include <linux/device.h> #include <linux/err.h> #include <linux/mod_devicetable.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mutex_types.h> #include <linux/poll.h> #include <linux/rpmsg/byteorder.h>
include/linux/sh_clk.h +1 -1
@@ -5,7 +5,7 @@#include <linux/list.h> #include <linux/cpufreq.h> #include <linux/types.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/clk.h> #include <linux/err.h>
include/linux/sunrpc/xprt.h +1 -1
@@ -14,7 +14,7 @@#include <linux/socket.h> #include <linux/in.h> #include <linux/ktime.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/sunrpc/sched.h> #include <linux/sunrpc/xdr.h> #include <linux/sunrpc/msg_prot.h>
include/linux/surface_aggregator/serial_hub.h +1 -1
@@ -13,7 +13,7 @@#define _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H#include <linux/crc-itu-t.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/ktime.h> #include <linux/list.h> #include <linux/types.h>
include/linux/tee_drv.h +1 -1
@@ -8,7 +8,7 @@#include <linux/device.h> #include <linux/idr.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> #include <linux/mod_devicetable.h> #include <linux/tee.h>
include/linux/usb.h +1 -1
@@ -15,7 +15,7 @@#include <linux/delay.h> /* for mdelay() */ #include <linux/interrupt.h> /* for in_interrupt() */ #include <linux/list.h> /* for struct list_head */ -#include <linux/kref.h> /* for struct kref */ +#include <linux/kref_types.h> /* for struct kref */ #include <linux/device.h> /* for struct device */ #include <linux/fs.h> /* for struct file_operations */ #include <linux/completion.h> /* for struct completion */
include/linux/usb/serial.h +1 -1
@@ -9,7 +9,7 @@#ifndef __LINUX_USB_SERIAL_H#define __LINUX_USB_SERIAL_H -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/mutex_types.h> #include <linux/serial.h> #include <linux/kfifo.h>
include/linux/watch_queue.h +1 -1
@@ -11,7 +11,7 @@#define _LINUX_WATCH_QUEUE_H#include <uapi/linux/watch_queue.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/rcupdate.h> #ifdef CONFIG_WATCH_QUEUE
include/media/media-request.h +1 -0
@@ -16,6 +16,7 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/refcount.h> +#include <linux/kref.h> #include <media/media-device.h>
include/media/v4l2-device.h +2 -0
@@ -13,6 +13,8 @@#include <media/v4l2-subdev.h> #include <media/v4l2-dev.h> +#include <linux/kref.h> +struct v4l2_ctrl_handler ;/**
include/net/bluetooth/hci_core.h +1 -0
@@ -29,6 +29,7 @@#include <linux/idr.h> #include <linux/leds.h> #include <linux/rculist.h> +#include <linux/kref.h> #include <net/bluetooth/hci.h> #include <net/bluetooth/hci_sync.h>
include/net/tls_toe.h +1 -1
@@ -31,7 +31,7 @@* SOFTWARE. */ -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> struct sock ;
include/rdma/ib_verbs.h +1 -1
@@ -16,7 +16,7 @@#include <linux/types.h> #include <linux/device.h> #include <linux/dma-mapping.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/list.h> #include <linux/rwsem.h> #include <linux/workqueue_types.h>
include/rdma/restrack.h +1 -1
@@ -8,7 +8,7 @@#include <linux/typecheck.h> #include <linux/sched.h> -#include <linux/kref.h> +#include <linux/kref_types.h> #include <linux/completion.h> #include <linux/sched/task.h> #include <uapi/rdma/rdma_netlink.h>
include/rdma/uverbs_types.h +1 -0
@@ -7,6 +7,7 @@#define _UVERBS_TYPES_#include <linux/kernel.h> +#include <linux/kref.h> #include <rdma/ib_verbs.h> struct uverbs_obj_type ;
kernel/irq/manage.c +1 -0
@@ -10,6 +10,7 @@#include <linux/irq.h> #include <linux/kthread.h> +#include <linux/kref.h> #include <linux/module.h> #include <linux/random.h> #include <linux/interrupt.h>
kernel/relay.c +1 -0
@@ -22,6 +22,7 @@#include <linux/mm.h> #include <linux/cpu.h> #include <linux/splice.h> +#include <linux/kref.h> /* list of open channels, for cpu hotplug */ static DEFINE_MUTEX (relay_channels_mutex);
kernel/watch_queue.c +1 -0
@@ -15,6 +15,7 @@#include <linux/printk.h> #include <linux/miscdevice.h> #include <linux/fs.h> +#include <linux/kref.h> #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/poll.h>
lib/klist.c +1 -0
@@ -36,6 +36,7 @@#include <linux/klist.h> #include <linux/export.h> #include <linux/sched.h> +#include <linux/kref.h> /* * Use the lowest bit of n_klist to mark deleted nodes and exclude
lib/kobject.c +1 -0
@@ -20,6 +20,7 @@#include <linux/random.h> #include <linux/uidgid.h> #include <linux/workqueue.h> +#include <linux/kref.h> /** * kobject_namespace() - Return @kobj's namespace tag.
mm/memory-tiers.c +1 -0
@@ -3,6 +3,7 @@#include <linux/lockdep.h> #include <linux/sysfs.h> #include <linux/kobject.h> +#include <linux/kref.h> #include <linux/memory.h> #include <linux/memory-tiers.h> #include <linux/notifier.h>
mm/z3fold.c +1 -0
@@ -40,6 +40,7 @@#include <linux/spinlock.h> #include <linux/zpool.h> #include <linux/kmemleak.h> +#include <linux/kref.h> /* * NCHUNKS_ORDER determines the internal allocation granularity, effectively
mm/zswap.c +1 -0
@@ -36,6 +36,7 @@#include <linux/pagemap.h> #include <linux/workqueue.h> #include <linux/list_lru.h> +#include <linux/kref.h> #include "swap.h" #include "internal.h"
net/can/j1939/main.c +1 -0
@@ -17,6 +17,7 @@#include <linux/can/skb.h> #include <linux/if_arp.h> #include <linux/module.h> +#include <linux/kref.h> #include "j1939-priv.h"
net/can/j1939/transport.c +1 -0
@@ -10,6 +10,7 @@#include <linux/can/skb.h> #include <linux/hrtimer.h> +#include <linux/kref.h> #include "j1939-priv.h"
net/dsa/dsa.c +1 -0
@@ -17,6 +17,7 @@#include <linux/of.h> #include <linux/of_mdio.h> #include <linux/of_net.h> +#include <linux/kref.h> #include <net/dsa_stubs.h> #include <net/sch_generic.h>
net/nfc/llcp_core.c +1 -0
@@ -8,6 +8,7 @@#include <linux/init.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/list.h> #include <linux/nfc.h>
net/qrtr/af_qrtr.c +1 -0
@@ -9,6 +9,7 @@#include <linux/termios.h> /* For TIOCINQ/OUTQ */ #include <linux/spinlock.h> #include <linux/wait.h> +#include <linux/kref.h> #include <net/sock.h>
net/rds/message.c +1 -0
@@ -36,6 +36,7 @@#include <linux/skbuff.h> #include <linux/list.h> #include <linux/errqueue.h> +#include <linux/kref.h> #include "rds.h"
net/rds/rdma.c +1 -0
@@ -31,6 +31,7 @@* */ #include <linux/pagemap.h> +#include <linux/kref.h> #include <linux/slab.h> #include <linux/rbtree.h> #include <linux/dma-mapping.h> /* for DMA_*_DEVICE */
net/tipc/node.c +2 -0
@@ -46,6 +46,8 @@#include "trace.h" #include "crypto.h" +#include <linux/kref.h> +#define INVALID_NODE_SIG 0x10000#define NODE_CLEANUP_AFTER 300000
net/tipc/subscr.c +2 -0
@@ -39,6 +39,8 @@#include "name_table.h" #include "subscr.h" +#include <linux/kref.h> +static void tipc_sub_send_event (struct tipc_subscription *sub,struct publication *p,u32 event)
net/tipc/topsrv.c +1 -0
@@ -43,6 +43,7 @@#include "bearer.h" #include <net/sock.h> #include <linux/module.h> +#include <linux/kref.h> #include <trace/events/sock.h> /* Number of messages to send before rescheduling */
net/tls/tls_toe.c +1 -0
@@ -34,6 +34,7 @@#include <linux/list.h> #include <linux/rcupdate.h> #include <linux/spinlock.h> +#include <linux/kref.h> #include <net/inet_connection_sock.h> #include <net/tls.h> #include <net/tls_toe.h>
sound/soc/qcom/qdsp6/q6apm.c +1 -0
@@ -12,6 +12,7 @@#include <linux/slab.h> #include <linux/soc/qcom/apr.h> #include <linux/wait.h> +#include <linux/kref.h> #include <sound/soc.h> #include <sound/soc-dapm.h> #include <sound/pcm.h>
Signature · 1 line
2.39.2
PATCH 6/28 kobject.h: move declarations to kobject_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- arch/arm64/kernel/cpuinfo.c | 1 + block/bdev.c | 1 + block/bfq-iosched.c | 1 + block/blk-crypto-sysfs.c | 1 + block/blk-ia-ranges.c | 1 + block/blk-mq-sched.c | 1 + block/blk-mq-sysfs.c | 1 + block/blk-mq.c | 1 + block/blk-sysfs.c | 1 + block/disk-events.c | 1 + block/elevator.c | 1 + block/genhd.c | 1 + block/holder.c | 1 + block/kyber-iosched.c | 1 + block/mq-deadline.c | 1 + block/partitions/core.c | 1 + .../accessibility/speakup/speakup_acntpc.c | 1 + .../accessibility/speakup/speakup_acntsa.c | 2 + .../accessibility/speakup/speakup_apollo.c | 1 + .../accessibility/speakup/speakup_audptr.c | 2 + drivers/accessibility/speakup/speakup_bns.c | 2 + .../accessibility/speakup/speakup_decext.c | 1 + drivers/accessibility/speakup/speakup_decpc.c | 1 + .../accessibility/speakup/speakup_dectlk.c | 1 + drivers/accessibility/speakup/speakup_dtlk.c | 1 + drivers/accessibility/speakup/speakup_dummy.c | 2 + drivers/accessibility/speakup/speakup_keypc.c | 1 + drivers/accessibility/speakup/speakup_ltlk.c | 2 + drivers/accessibility/speakup/speakup_soft.c | 1 + .../accessibility/speakup/speakup_spkout.c | 2 + drivers/accessibility/speakup/speakup_txprt.c | 2 + drivers/acpi/ac.c | 1 + drivers/acpi/acpi_fpdt.c | 1 + drivers/acpi/bgrt.c | 1 + drivers/acpi/bus.c | 1 + drivers/acpi/container.c | 1 + drivers/acpi/device_sysfs.c | 1 + drivers/acpi/dock.c | 1 + drivers/acpi/sysfs.c | 1 + drivers/ata/libata-acpi.c | 1 + drivers/base/devcoredump.c | 1 + drivers/base/firmware_loader/fallback.c | 1 + drivers/base/firmware_loader/sysfs.c | 1 + drivers/block/drbd/drbd_nl.c | 1 + drivers/block/loop.c | 1 + drivers/block/nbd.c | 1 + drivers/block/rnbd/rnbd-clt-sysfs.c | 1 + drivers/block/rnbd/rnbd-clt.c | 1 + drivers/block/rnbd/rnbd-srv.c | 1 + drivers/block/ublk_drv.c | 1 + drivers/bus/mhi/ep/main.c | 1 + drivers/bus/mhi/host/init.c | 1 + drivers/char/virtio_console.c | 1 + drivers/char/xillybus/xillybus_class.c | 1 + drivers/comedi/comedi_fops.c | 1 + drivers/cxl/core/port.c | 1 + drivers/dax/bus.c | 1 + drivers/dma/qcom/hidma_mgmt_sys.c | 1 + drivers/firmware/arm_ffa/bus.c | 1 + drivers/firmware/dmi-id.c | 1 + drivers/firmware/dmi_scan.c | 1 + drivers/firmware/memmap.c | 1 + drivers/firmware/qemu_fw_cfg.c | 1 + drivers/gnss/core.c | 1 + drivers/greybus/core.c | 1 + drivers/hid/hid-core.c | 1 + drivers/hid/hid-wiimote-core.c | 1 + drivers/hid/wacom_sys.c | 1 + drivers/hwmon/acpi_power_meter.c | 1 + drivers/hwtracing/stm/core.c | 1 + drivers/infiniband/core/device.c | 1 + drivers/infiniband/core/sysfs.c | 1 + drivers/infiniband/hw/mlx4/sysfs.c | 1 + drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c | 2 + drivers/infiniband/ulp/rtrs/rtrs-clt.c | 1 + drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 2 + drivers/infiniband/ulp/rtrs/rtrs-srv.c | 1 + drivers/input/input.c | 1 + drivers/input/serio/serio.c | 1 + drivers/ipack/ipack.c | 1 + drivers/isdn/mISDN/core.c | 1 + drivers/leds/led-triggers.c | 1 + drivers/mcb/mcb-core.c | 1 + drivers/md/dm-verity-target.c | 1 + drivers/media/cec/core/cec-core.c | 1 + drivers/media/mc/mc-devnode.c | 1 + drivers/media/rc/rc-main.c | 1 + drivers/memstick/core/memstick.c | 1 + drivers/misc/ti-st/st_kim.c | 1 + drivers/misc/tifm_core.c | 1 + drivers/most/most_cdev.c | 1 + drivers/net/bonding/bond_main.c | 1 + .../ethernet/qlogic/qlcnic/qlcnic_minidump.c | 2 + drivers/net/wireless/ath/wil6210/interrupt.c | 1 + .../net/wireless/intel/iwlwifi/pcie/trans.c | 1 + drivers/net/xen-netback/xenbus.c | 1 + drivers/nvdimm/bus.c | 1 + drivers/nvme/host/core.c | 1 + drivers/nvme/host/fc.c | 1 + drivers/pci/host-bridge.c | 1 + drivers/pci/iov.c | 1 + drivers/pcmcia/cs.c | 1 + drivers/pcmcia/ds.c | 1 + drivers/platform/surface/aggregator/bus.c | 1 + drivers/power/supply/power_supply_sysfs.c | 1 + drivers/pps/pps.c | 1 + drivers/rapidio/rio-driver.c | 1 + drivers/scsi/ipr.c | 1 + drivers/scsi/iscsi_boot_sysfs.c | 1 + drivers/scsi/qedf/qedf_dbg.c | 1 + drivers/scsi/qla4xxx/ql4_nx.c | 1 + drivers/scsi/scsi_lib.c | 1 + drivers/scsi/scsi_sysfs.c | 1 + drivers/scsi/ses.c | 1 + drivers/staging/fieldbus/dev_core.c | 1 + drivers/staging/greybus/gbphy.c | 1 + .../interface/vchiq_arm/vchiq_bus.c | 1 + drivers/tee/tee_core.c | 1 + drivers/thunderbolt/domain.c | 1 + drivers/thunderbolt/switch.c | 1 + drivers/thunderbolt/tb.c | 1 + drivers/thunderbolt/xdomain.c | 1 + drivers/tty/tty_io.c | 1 + drivers/usb/core/driver.c | 1 + drivers/usb/gadget/udc/core.c | 1 + drivers/usb/roles/class.c | 1 + drivers/usb/typec/bus.c | 1 + drivers/usb/typec/class.c | 1 + drivers/vdpa/vdpa_user/vduse_dev.c | 1 + drivers/vfio/mdev/mdev_core.c | 1 + drivers/vfio/mdev/mdev_sysfs.c | 1 + .../fbdev/omap2/omapfb/dss/display-sysfs.c | 1 + .../fbdev/omap2/omapfb/dss/manager-sysfs.c | 1 + drivers/virt/vmgenid.c | 1 + drivers/xen/xenbus/xenbus_probe_backend.c | 1 + drivers/xen/xenbus/xenbus_probe_frontend.c | 1 + fs/9p/v9fs.c | 1 + fs/configfs/mount.c | 1 + fs/ecryptfs/main.c | 1 + fs/ext4/super.c | 1 + fs/ext4/sysfs.c | 1 + fs/fuse/cuse.c | 1 + fs/fuse/inode.c | 1 + fs/namespace.c | 1 + fs/nfs/client.c | 1 + fs/ubifs/sysfs.c | 1 + fs/xfs/xfs_sysfs.h | 2 + include/linux/cdev.h | 2 +- include/linux/cpufreq.h | 2 +- include/linux/device.h | 2 +- include/linux/irqdesc.h | 2 +- include/linux/kobject.h | 78 +---------------- include/linux/kobject_types.h | 84 +++++++++++++++++++ include/linux/module.h | 2 +- include/linux/padata.h | 2 +- include/linux/pci.h | 2 +- include/net/netdev_rx_queue.h | 2 +- include/video/omapfb_dss.h | 2 +- init/initramfs.c | 1 + kernel/cgroup/cgroup.c | 1 + kernel/exit.c | 2 + kernel/module/main.c | 1 + kernel/module/sysfs.c | 1 + kernel/padata.c | 1 + kernel/panic.c | 1 + kernel/params.c | 1 + kernel/reboot.c | 1 + mm/damon/sysfs-common.c | 1 + mm/damon/sysfs-common.h | 2 +- mm/damon/sysfs-schemes.c | 1 + mm/damon/sysfs.c | 1 + mm/huge_memory.c | 1 + mm/hugetlb.c | 1 + mm/khugepaged.c | 1 + mm/mempolicy.c | 1 + mm/shmem.c | 1 + mm/swap_state.c | 1 + mm/vmscan.c | 1 + net/9p/trans_virtio.c | 1 + net/bridge/br_sysfs_br.c | 1 + net/rfkill/core.c | 1 + net/wireless/reg.c | 1 + sound/core/init.c | 1 + sound/hda/hda_bus_type.c | 1 + sound/hda/hdac_sysfs.c | 1 + 185 files changed, 280 insertions(+), 87 deletions(-) create mode 100644 include/linux/kobject_types.h
arch/arm64/kernel/cpuinfo.c +1 -0
@@ -17,6 +17,7 @@#include <linux/elf.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/personality.h> #include <linux/preempt.h> #include <linux/printk.h>
block/bdev.c +1 -0
@@ -9,6 +9,7 @@#include <linux/mm.h> #include <linux/slab.h> #include <linux/kmod.h> +#include <linux/kobject.h> #include <linux/major.h> #include <linux/device_cgroup.h> #include <linux/blkdev.h>
block/bfq-iosched.c +1 -0
@@ -117,6 +117,7 @@#include <linux/slab.h> #include <linux/blkdev.h> #include <linux/cgroup.h> +#include <linux/kobject.h> #include <linux/ktime.h> #include <linux/rbtree.h> #include <linux/ioprio.h>
block/blk-crypto-sysfs.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/blk-crypto-profile.h> +#include <linux/kobject.h> #include <linux/sysfs.h> #include "blk-crypto-internal.h"
block/blk-ia-ranges.c +1 -0
@@ -9,6 +9,7 @@#include <linux/slab.h> #include <linux/sysfs.h> #include <linux/init.h> +#include <linux/kobject.h> #include "blk.h"
block/blk-mq-sched.c +1 -0
@@ -5,6 +5,7 @@* Copyright (C) 2016 Jens Axboe */ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/list_sort.h>
block/blk-mq-sysfs.c +1 -0
@@ -4,6 +4,7 @@#include <linux/backing-dev.h> #include <linux/bio.h> #include <linux/blkdev.h> +#include <linux/kobject.h> #include <linux/mm.h> #include <linux/init.h> #include <linux/slab.h>
block/blk-mq.c +1 -0
@@ -12,6 +12,7 @@#include <linux/blkdev.h> #include <linux/blk-integrity.h> #include <linux/kmemleak.h> +#include <linux/kobject.h> #include <linux/mm.h> #include <linux/init.h> #include <linux/slab.h>
block/blk-sysfs.c +1 -0
@@ -10,6 +10,7 @@#include <linux/backing-dev.h> #include <linux/blktrace_api.h> #include <linux/debugfs.h> +#include <linux/kobject.h> #include "blk.h" #include "blk-mq.h"
block/disk-events.c +1 -0
@@ -5,6 +5,7 @@#include <linux/export.h> #include <linux/moduleparam.h> #include <linux/blkdev.h> +#include <linux/kobject.h> #include "blk.h" struct disk_events {
block/elevator.c +1 -0
@@ -35,6 +35,7 @@#include <linux/hash.h> #include <linux/uaccess.h> #include <linux/pm_runtime.h> +#include <linux/kobject.h> #include <trace/events/block.h>
block/genhd.c +1 -0
@@ -10,6 +10,7 @@#include <linux/fs.h> #include <linux/kdev_t.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/blkdev.h> #include <linux/backing-dev.h> #include <linux/init.h>
block/holder.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only #include <linux/blkdev.h> +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/sysfs.h>
block/kyber-iosched.c +1 -0
@@ -8,6 +8,7 @@#include <linux/kernel.h> #include <linux/blkdev.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/sbitmap.h> #include <linux/sysfs.h>
block/mq-deadline.c +1 -0
@@ -9,6 +9,7 @@#include <linux/fs.h> #include <linux/blkdev.h> #include <linux/bio.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/init.h>
block/partitions/core.c +1 -0
@@ -5,6 +5,7 @@* Copyright (C) 2020 Christoph Hellwig */ #include <linux/fs.h> +#include <linux/kobject.h> #include <linux/major.h> #include <linux/slab.h> #include <linux/ctype.h>
drivers/accessibility/speakup/speakup_acntpc.c +1 -0
@@ -14,6 +14,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include "spk_priv.h"
drivers/accessibility/speakup/speakup_acntsa.c +2 -0
@@ -14,6 +14,8 @@#include "speakup.h" #include "speakup_acnt.h" /* local header file for Accent values */ +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define PROCSPEECH '\r'
drivers/accessibility/speakup/speakup_apollo.c +1 -0
@@ -12,6 +12,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include <linux/serial_reg.h> /* for UART_MCR* constants */
drivers/accessibility/speakup/speakup_audptr.c +2 -0
@@ -12,6 +12,8 @@#include "spk_priv.h" #include "speakup.h" +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define SYNTH_CLEAR 0x18/* flush synth buffer */ #define PROCSPEECH '\r'/* start synth processing speech char */
drivers/accessibility/speakup/speakup_bns.c +2 -0
@@ -12,6 +12,8 @@#include "spk_priv.h" #include "speakup.h" +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define SYNTH_CLEAR 0x18#define PROCSPEECH '\r'
drivers/accessibility/speakup/speakup_decext.c +1 -0
@@ -12,6 +12,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include "spk_priv.h"
drivers/accessibility/speakup/speakup_decpc.c +1 -0
@@ -19,6 +19,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include "spk_priv.h"
drivers/accessibility/speakup/speakup_dectlk.c +1 -0
@@ -15,6 +15,7 @@#include <linux/spinlock.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include "speakup.h" #include "spk_priv.h"
drivers/accessibility/speakup/speakup_dtlk.c +1 -0
@@ -13,6 +13,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include "spk_priv.h"
drivers/accessibility/speakup/speakup_dummy.c +2 -0
@@ -14,6 +14,8 @@#include "spk_priv.h" #include "speakup.h" +#include <linux/kobject.h> +#define PROCSPEECH '\n'#define DRV_VERSION "2.11"#define SYNTH_CLEAR '!'
drivers/accessibility/speakup/speakup_keypc.c +1 -0
@@ -11,6 +11,7 @@#include <linux/jiffies.h> #include <linux/sched.h> #include <linux/timer.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include <linux/serial_reg.h>
drivers/accessibility/speakup/speakup_ltlk.c +2 -0
@@ -13,6 +13,8 @@#include "spk_priv.h" #include "speakup_dtlk.h" /* local header file for LiteTalk values */ +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define PROCSPEECH 0x0d
drivers/accessibility/speakup/speakup_soft.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/unistd.h> +#include <linux/kobject.h> #include <linux/miscdevice.h> /* for misc_register, and MISC_DYNAMIC_MINOR */ #include <linux/poll.h> /* for poll_wait() */
drivers/accessibility/speakup/speakup_spkout.c +2 -0
@@ -12,6 +12,8 @@#include "spk_priv.h" #include "speakup.h" +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define SYNTH_CLEAR 0x18#define PROCSPEECH '\r'
drivers/accessibility/speakup/speakup_txprt.c +2 -0
@@ -12,6 +12,8 @@#include "spk_priv.h" #include "speakup.h" +#include <linux/kobject.h> +#define DRV_VERSION "2.11"#define SYNTH_CLEAR 0x18#define PROCSPEECH '\r'/* process speech char */
drivers/acpi/ac.c +1 -0
@@ -9,6 +9,7 @@#define pr_fmt (fmt) "ACPI: AC: " fmt#include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/init.h>
drivers/acpi/acpi_fpdt.c +1 -0
@@ -9,6 +9,7 @@#define pr_fmt (fmt) "ACPI FPDT: " fmt#include <linux/acpi.h> +#include <linux/kobject.h> /* * FPDT contains ACPI table header and a number of fpdt_subtable_entries.
drivers/acpi/bgrt.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/init.h> #include <linux/device.h> #include <linux/sysfs.h>
drivers/acpi/bus.c +1 -0
@@ -11,6 +11,7 @@#include <linux/init.h> #include <linux/ioport.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/list.h> #include <linux/sched.h> #include <linux/pm.h>
drivers/acpi/container.c +1 -0
@@ -11,6 +11,7 @@*/ #include <linux/acpi.h> #include <linux/container.h> +#include <linux/kobject.h> #include "internal.h"
drivers/acpi/device_sysfs.c +1 -0
@@ -14,6 +14,7 @@#include <linux/acpi.h> #include <linux/device.h> #include <linux/export.h> +#include <linux/kobject.h> #include <linux/nls.h> #include "internal.h"
drivers/acpi/dock.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/moduleparam.h> #include <linux/slab.h> #include <linux/init.h>
drivers/acpi/sysfs.c +1 -0
@@ -9,6 +9,7 @@#include <linux/bitmap.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kstrtox.h> #include <linux/moduleparam.h>
drivers/ata/libata-acpi.c +1 -0
@@ -13,6 +13,7 @@#include <linux/device.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/acpi.h> #include <linux/libata.h> #include <linux/pci.h>
drivers/base/devcoredump.c +1 -0
@@ -6,6 +6,7 @@* Author: Johannes Berg <[email protected]> */ #include <linux/module.h> +#include <linux/kobject.h> #include <linux/device.h> #include <linux/devcoredump.h> #include <linux/list.h>
drivers/base/firmware_loader/fallback.c +1 -0
@@ -6,6 +6,7 @@#include <linux/security.h> #include <linux/umh.h> #include <linux/sysctl.h> +#include <linux/kobject.h> #include <linux/module.h> #include "fallback.h"
drivers/base/firmware_loader/sysfs.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/highmem.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/security.h> #include <linux/slab.h>
drivers/block/drbd/drbd_nl.c +1 -0
@@ -28,6 +28,7 @@#include <asm/unaligned.h> #include <linux/drbd_limits.h> #include <linux/kthread.h> +#include <linux/kobject.h> #include <net/genetlink.h>
drivers/block/loop.c +1 -0
@@ -4,6 +4,7 @@*/ #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/kobject.h> #include <linux/sched.h> #include <linux/fs.h> #include <linux/pagemap.h>
drivers/block/nbd.c +1 -0
@@ -38,6 +38,7 @@#include <linux/types.h> #include <linux/debugfs.h> #include <linux/blk-mq.h> +#include <linux/kobject.h> #include <linux/uaccess.h> #include <asm/types.h>
drivers/block/rnbd/rnbd-clt-sysfs.c +1 -0
@@ -18,6 +18,7 @@#include <linux/fs.h> #include <linux/uaccess.h> #include <linux/device.h> +#include <linux/kobject.h> #include <rdma/ib.h> #include <rdma/rdma_cm.h>
drivers/block/rnbd/rnbd-clt.c +1 -0
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/blkdev.h> #include <linux/hdreg.h> +#include <linux/kobject.h> #include <linux/scatterlist.h> #include <linux/idr.h>
drivers/block/rnbd/rnbd-srv.c +1 -0
@@ -11,6 +11,7 @@#include <linux/module.h> #include <linux/blkdev.h> +#include <linux/kobject.h> #include "rnbd-srv.h" #include "rnbd-srv-trace.h"
drivers/block/ublk_drv.c +1 -0
@@ -43,6 +43,7 @@#include <asm/page.h> #include <linux/task_work.h> #include <linux/namei.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <uapi/linux/ublk_cmd.h>
drivers/bus/mhi/ep/main.c +1 -0
@@ -13,6 +13,7 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/irq.h> +#include <linux/kobject.h> #include <linux/mhi_ep.h> #include <linux/mod_devicetable.h> #include <linux/module.h>
drivers/bus/mhi/host/init.c +1 -0
@@ -12,6 +12,7 @@#include <linux/idr.h> #include <linux/interrupt.h> #include <linux/list.h> +#include <linux/kobject.h> #include <linux/mhi.h> #include <linux/mod_devicetable.h> #include <linux/module.h>
drivers/char/virtio_console.c +1 -0
@@ -26,6 +26,7 @@#include <linux/workqueue.h> #include <linux/module.h> #include <linux/dma-mapping.h> +#include <linux/kobject.h> #include "../tty/hvc/hvc_console.h" #define is_rproc_enabled IS_ENABLED(CONFIG_REMOTEPROC)
drivers/char/xillybus/xillybus_class.c +1 -0
@@ -11,6 +11,7 @@#include <linux/fs.h> #include <linux/cdev.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/list.h> #include <linux/mutex.h>
drivers/comedi/comedi_fops.c +1 -0
@@ -25,6 +25,7 @@#include <linux/fs.h> #include <linux/comedi/comedidev.h> #include <linux/cdev.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <linux/io.h>
drivers/cxl/core/port.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only /* Copyright(c) 2020 Intel Corporation. All rights reserved. */ #include <linux/platform_device.h> +#include <linux/kobject.h> #include <linux/memregion.h> #include <linux/workqueue.h> #include <linux/debugfs.h>
drivers/dax/bus.c +1 -0
@@ -7,6 +7,7 @@#include <linux/slab.h> #include <linux/dax.h> #include <linux/io.h> +#include <linux/kobject.h> #include <linux/kref.h> #include "dax-private.h" #include "bus.h"
drivers/dma/qcom/hidma_mgmt_sys.c +1 -0
@@ -7,6 +7,7 @@#include <linux/sysfs.h> #include <linux/platform_device.h> +#include <linux/kobject.h> #include "hidma_mgmt.h"
drivers/firmware/arm_ffa/bus.c +1 -0
@@ -10,6 +10,7 @@#include <linux/fs.h> #include <linux/idr.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/types.h>
drivers/firmware/dmi-id.c +1 -0
@@ -7,6 +7,7 @@#include <linux/module.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/init.h> #include <linux/dmi.h> #include <linux/device.h>
drivers/firmware/dmi_scan.c +1 -0
@@ -2,6 +2,7 @@#include <linux/types.h> #include <linux/string.h> #include <linux/init.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/ctype.h> #include <linux/dmi.h>
drivers/firmware/memmap.c +1 -0
@@ -8,6 +8,7 @@#include <linux/string.h> #include <linux/firmware-map.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/types.h> #include <linux/memblock.h>
drivers/firmware/qemu_fw_cfg.c +1 -0
@@ -34,6 +34,7 @@#include <linux/slab.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/kobject.h> #include <uapi/linux/qemu_fw_cfg.h> #include <linux/delay.h> #include <linux/crash_dump.h>
drivers/gnss/core.c +1 -0
@@ -14,6 +14,7 @@#include <linux/idr.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/poll.h> #include <linux/slab.h>
drivers/greybus/core.c +1 -0
@@ -10,6 +10,7 @@#define CREATE_TRACE_POINTS #include <linux/greybus.h> +#include <linux/kobject.h> #include "greybus_trace.h" #define GB_BUNDLE_AUTOSUSPEND_MS 3000
drivers/hid/hid-core.c +1 -0
@@ -17,6 +17,7 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <linux/list.h> #include <linux/mm.h>
drivers/hid/hid-wiimote-core.c +1 -0
@@ -11,6 +11,7 @@#include <linux/device.h> #include <linux/hid.h> #include <linux/input.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/spinlock.h>
drivers/hid/wacom_sys.c +1 -0
@@ -6,6 +6,7 @@#include "wacom_wac.h" #include "wacom.h" #include <linux/input/mt.h> +#include <linux/kobject.h> #include <linux/kref.h> #define WAC_MSG_RETRIES 5
drivers/hwmon/acpi_power_meter.c +1 -0
@@ -18,6 +18,7 @@#include <linux/time.h> #include <linux/err.h> #include <linux/acpi.h> +#include <linux/kobject.h> #define ACPI_POWER_METER_NAME "power_meter"#define ACPI_POWER_METER_DEVICE_NAME "Power Meter"
drivers/hwtracing/stm/core.c +1 -0
@@ -10,6 +10,7 @@#include <linux/pm_runtime.h> #include <linux/uaccess.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/device.h> #include <linux/compat.h>
drivers/infiniband/core/device.c +1 -0
@@ -35,6 +35,7 @@#include <linux/string.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <linux/slab.h> #include <linux/init.h>
drivers/infiniband/core/sysfs.c +1 -0
@@ -39,6 +39,7 @@#include <linux/string.h> #include <linux/netdevice.h> #include <linux/ethtool.h> +#include <linux/kobject.h> #include <rdma/ib_mad.h> #include <rdma/ib_pma.h>
drivers/infiniband/hw/mlx4/sysfs.c +1 -0
@@ -32,6 +32,7 @@/*#include "core_priv.h"*/ #include "mlx4_ib.h" +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/string.h> #include <linux/stat.h>
drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c +2 -0
@@ -13,6 +13,8 @@#include "rtrs-clt.h" #include "rtrs-log.h" +#include <linux/kobject.h> +#define MIN_MAX_RECONN_ATT -1#define MAX_MAX_RECONN_ATT 9999
drivers/infiniband/ulp/rtrs/rtrs-clt.c +1 -0
@@ -10,6 +10,7 @@#undef pr_fmt#define pr_fmt (fmt) KBUILD_MODNAME " L" __stringify(__LINE__) ": " fmt +#include <linux/kobject.h> #include <linux/module.h> #include <linux/rculist.h> #include <linux/random.h>
drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c +2 -0
@@ -13,6 +13,8 @@#include "rtrs-srv.h" #include "rtrs-log.h" +#include <linux/kobject.h> +static void rtrs_srv_release (struct kobject *kobj) {struct rtrs_srv_path *srv_path;
drivers/infiniband/ulp/rtrs/rtrs-srv.c +1 -0
@@ -10,6 +10,7 @@#undef pr_fmt#define pr_fmt (fmt) KBUILD_MODNAME " L" __stringify(__LINE__) ": " fmt +#include <linux/kobject.h> #include <linux/module.h> #include "rtrs-srv.h"
drivers/input/input.c +1 -0
@@ -22,6 +22,7 @@#include <linux/pm.h> #include <linux/poll.h> #include <linux/device.h> +#include <linux/kobject.h> #include <linux/kstrtox.h> #include <linux/mutex.h> #include <linux/rcupdate.h>
drivers/input/serio/serio.c +1 -0
@@ -10,6 +10,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/stddef.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/serio.h> #include <linux/errno.h>
drivers/ipack/ipack.c +1 -0
@@ -11,6 +11,7 @@#include <linux/idr.h> #include <linux/io.h> #include <linux/ipack.h> +#include <linux/kobject.h> #define to_ipack_dev (device) container_of(device, struct ipack_device, dev)#define to_ipack_driver (drv) container_of(drv, struct ipack_driver, driver)
drivers/isdn/mISDN/core.c +1 -0
@@ -6,6 +6,7 @@#include <linux/slab.h> #include <linux/types.h> #include <linux/stddef.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/spinlock.h> #include <linux/mISDNif.h>
drivers/leds/led-triggers.c +1 -0
@@ -9,6 +9,7 @@#include <linux/export.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/list.h> #include <linux/spinlock.h> #include <linux/device.h>
drivers/mcb/mcb-core.c +1 -0
@@ -6,6 +6,7 @@* Author: Johannes Thumshirn <[email protected]> */ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/types.h>
drivers/md/dm-verity-target.c +1 -0
@@ -17,6 +17,7 @@#include "dm-verity-fec.h" #include "dm-verity-verify-sig.h" #include "dm-audit.h" +#include <linux/kobject.h> #include <linux/module.h> #include <linux/reboot.h> #include <linux/scatterlist.h>
drivers/media/cec/core/cec-core.c +1 -0
@@ -10,6 +10,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/kmod.h> +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/mm.h> #include <linux/string.h>
drivers/media/mc/mc-devnode.c +1 -0
@@ -25,6 +25,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/kmod.h> +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/mm.h> #include <linux/string.h>
drivers/media/rc/rc-main.c +1 -0
@@ -15,6 +15,7 @@#include <linux/idr.h> #include <linux/device.h> #include <linux/module.h> +#include <linux/kobject.h> #include "rc-core-priv.h" /* Sizes are in bytes, 256 bytes allows for 32 entries on x64 */
drivers/memstick/core/memstick.c +1 -0
@@ -13,6 +13,7 @@#include <linux/fs.h> #include <linux/delay.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/pm_runtime.h>
drivers/misc/ti-st/st_kim.c +1 -0
@@ -19,6 +19,7 @@#include <linux/sched.h> #include <linux/sysfs.h> #include <linux/tty.h> +#include <linux/kobject.h> #include <linux/skbuff.h> #include <linux/ti_wilink_st.h>
drivers/misc/tifm_core.c +1 -0
@@ -7,6 +7,7 @@#include <linux/tifm.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/init.h> #include <linux/idr.h> #include <linux/module.h>
drivers/most/most_cdev.c +1 -0
@@ -13,6 +13,7 @@#include <linux/cdev.h> #include <linux/poll.h> #include <linux/kfifo.h> +#include <linux/kobject.h> #include <linux/uaccess.h> #include <linux/idr.h> #include <linux/most.h>
drivers/net/bonding/bond_main.c +1 -0
@@ -33,6 +33,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/types.h> #include <linux/fcntl.h>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +2 -0
@@ -11,6 +11,8 @@#include "qlcnic_83xx_hw.h" #include "qlcnic_hw.h" +#include <linux/kobject.h> +#define QLC_83XX_MINIDUMP_FLASH 0x520000#define QLC_83XX_OCM_INDEX 3#define QLC_83XX_PCI_INDEX 0
drivers/net/wireless/ath/wil6210/interrupt.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/interrupt.h> +#include <linux/kobject.h> #include "wil6210.h" #include "trace.h"
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +1 -0
@@ -11,6 +11,7 @@#include <linux/bitops.h> #include <linux/gfp.h> #include <linux/vmalloc.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/wait.h> #include <linux/seq_file.h>
drivers/net/xen-netback/xenbus.c +1 -0
@@ -9,6 +9,7 @@#include "common.h" #include <linux/vmalloc.h> #include <linux/rtnetlink.h> +#include <linux/kobject.h> static int connect_data_rings (struct backend_info *be,struct xenvif_queue *queue);
drivers/nvdimm/bus.c +1 -0
@@ -19,6 +19,7 @@#include <linux/io.h> #include <linux/mm.h> #include <linux/nd.h> +#include <linux/kobject.h> #include "nd-core.h" #include "nd.h" #include "pfn.h"
drivers/nvme/host/core.c +1 -0
@@ -12,6 +12,7 @@#include <linux/errno.h> #include <linux/hdreg.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/backing-dev.h> #include <linux/slab.h>
drivers/nvme/host/fc.c +1 -0
@@ -17,6 +17,7 @@#include "fc.h" #include <scsi/scsi_transport_fc.h> #include <linux/blk-mq-pci.h> +#include <linux/kobject.h> /* *************************** Data Structures/Defines ****************** */
drivers/pci/host-bridge.c +1 -0
@@ -4,6 +4,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/pci.h> #include <linux/module.h>
drivers/pci/iov.c +1 -0
@@ -9,6 +9,7 @@#include <linux/pci.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/export.h> #include <linux/string.h> #include <linux/delay.h>
drivers/pcmcia/cs.c +1 -0
@@ -13,6 +13,7 @@#include <linux/moduleparam.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/string.h> #include <linux/major.h> #include <linux/errno.h>
drivers/pcmcia/ds.c +1 -0
@@ -19,6 +19,7 @@#include <linux/workqueue.h> #include <linux/crc32.h> #include <linux/firmware.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <linux/dma-mapping.h> #include <linux/slab.h>
drivers/platform/surface/aggregator/bus.c +1 -0
@@ -6,6 +6,7 @@*/ #include <linux/device.h> +#include <linux/kobject.h> #include <linux/property.h> #include <linux/slab.h>
drivers/power/supply/power_supply_sysfs.c +1 -0
@@ -12,6 +12,7 @@#include <linux/ctype.h> #include <linux/device.h> +#include <linux/kobject.h> #include <linux/power_supply.h> #include <linux/slab.h> #include <linux/stat.h>
drivers/pps/pps.c +1 -0
@@ -8,6 +8,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/init.h> #include <linux/sched.h>
drivers/rapidio/rio-driver.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/init.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/rio.h> #include <linux/rio_ids.h>
drivers/scsi/ipr.c +1 -0
@@ -45,6 +45,7 @@#include <linux/types.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/ioport.h>
drivers/scsi/iscsi_boot_sysfs.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/module.h> +#include <linux/kobject.h> #include <linux/string.h> #include <linux/slab.h> #include <linux/sysfs.h>
drivers/scsi/qedf/qedf_dbg.c +1 -0
@@ -4,6 +4,7 @@* Copyright (c) 2016-2018 Cavium Inc. */ #include "qedf_dbg.h" +#include <linux/kobject.h> #include <linux/vmalloc.h> void
drivers/scsi/qla4xxx/ql4_nx.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/delay.h> #include <linux/io.h> +#include <linux/kobject.h> #include <linux/pci.h> #include <linux/ratelimit.h> #include "ql4_def.h"
drivers/scsi/scsi_lib.c +1 -0
@@ -14,6 +14,7 @@#include <linux/blkdev.h> #include <linux/completion.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/export.h> #include <linux/init.h> #include <linux/pci.h>
drivers/scsi/scsi_sysfs.c +1 -0
@@ -14,6 +14,7 @@#include <linux/device.h> #include <linux/pm_runtime.h> #include <linux/bsg.h> +#include <linux/kobject.h> #include <linux/kref.h> #include <scsi/scsi.h>
drivers/scsi/ses.c +1 -0
@@ -8,6 +8,7 @@#include <linux/slab.h> #include <linux/module.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/enclosure.h> #include <asm/unaligned.h>
drivers/staging/fieldbus/dev_core.c +1 -0
@@ -8,6 +8,7 @@#include <linux/module.h> #include <linux/device.h> #include <linux/idr.h> +#include <linux/kobject.h> #include <linux/fs.h> #include <linux/slab.h> #include <linux/poll.h>
drivers/staging/greybus/gbphy.c +1 -0
@@ -11,6 +11,7 @@#include <linux/types.h> #include <linux/module.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/device.h> #include <linux/greybus.h>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c +1 -0
@@ -7,6 +7,7 @@#include <linux/device/bus.h> #include <linux/dma-mapping.h> +#include <linux/kobject.h> #include <linux/of_device.h> #include <linux/slab.h> #include <linux/string.h>
drivers/tee/tee_core.c +1 -0
@@ -9,6 +9,7 @@#include <linux/cred.h> #include <linux/fs.h> #include <linux/idr.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/tee_drv.h>
drivers/thunderbolt/domain.c +1 -0
@@ -8,6 +8,7 @@#include <linux/device.h> #include <linux/idr.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/slab.h>
drivers/thunderbolt/switch.c +1 -0
@@ -8,6 +8,7 @@#include <linux/delay.h> #include <linux/idr.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/nvmem-provider.h> #include <linux/pm_runtime.h>
drivers/thunderbolt/tb.c +1 -0
@@ -11,6 +11,7 @@#include <linux/delay.h> #include <linux/pm_runtime.h> #include <linux/platform_data/x86/apple.h> +#include <linux/kobject.h> #include "tb.h" #include "tb_regs.h"
drivers/thunderbolt/xdomain.c +1 -0
@@ -10,6 +10,7 @@#include <linux/device.h> #include <linux/delay.h> #include <linux/kmod.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/prandom.h>
drivers/tty/tty_io.c +1 -0
@@ -83,6 +83,7 @@#include <linux/timer.h> #include <linux/ctype.h> #include <linux/kd.h> +#include <linux/kobject.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/slab.h>
drivers/usb/core/driver.c +1 -0
@@ -31,6 +31,7 @@#include <linux/usb.h> #include <linux/usb/quirks.h> #include <linux/usb/hcd.h> +#include <linux/kobject.h> #include "usb.h"
drivers/usb/gadget/udc/core.c +1 -0
@@ -9,6 +9,7 @@#define pr_fmt (fmt) "UDC core: " fmt#include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/device.h> #include <linux/list.h>
drivers/usb/roles/class.c +1 -0
@@ -10,6 +10,7 @@#include <linux/usb/role.h> #include <linux/property.h> #include <linux/device.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h>
drivers/usb/typec/bus.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/usb/pd_vdo.h> +#include <linux/kobject.h> #include "bus.h" #include "class.h"
drivers/usb/typec/class.c +1 -0
@@ -6,6 +6,7 @@* Author: Heikki Krogerus <[email protected]> */ +#include <linux/kobject.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/property.h>
drivers/vdpa/vdpa_user/vduse_dev.c +1 -0
@@ -23,6 +23,7 @@#include <linux/nospec.h> #include <linux/vmalloc.h> #include <linux/sched/mm.h> +#include <linux/kobject.h> #include <uapi/linux/vduse.h> #include <uapi/linux/vdpa.h> #include <uapi/linux/virtio_config.h>
drivers/vfio/mdev/mdev_core.c +1 -0
@@ -10,6 +10,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/sysfs.h> +#include <linux/kobject.h> #include <linux/mdev.h> #include "mdev_private.h"
drivers/vfio/mdev/mdev_sysfs.c +1 -0
@@ -10,6 +10,7 @@#include <linux/sysfs.h> #include <linux/ctype.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/mdev.h> #include "mdev_private.h"
drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +1 -0
@@ -10,6 +10,7 @@#define DSS_SUBSYS_NAME "DISPLAY"#include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kstrtox.h> #include <linux/module.h> #include <linux/platform_device.h>
drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +1 -0
@@ -12,6 +12,7 @@#include <linux/kernel.h> #include <linux/kstrtox.h> #include <linux/slab.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/jiffies.h>
drivers/virt/vmgenid.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/acpi.h> #include <linux/random.h>
drivers/xen/xenbus/xenbus_probe_backend.c +1 -0
@@ -43,6 +43,7 @@#include <linux/ctype.h> #include <linux/fcntl.h> #include <linux/mm.h> +#include <linux/kobject.h> #include <linux/notifier.h> #include <linux/export.h> #include <linux/semaphore.h>
drivers/xen/xenbus/xenbus_probe_frontend.c +1 -0
@@ -13,6 +13,7 @@#include <linux/mm.h> #include <linux/proc_fs.h> #include <linux/notifier.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include <linux/mutex.h> #include <linux/io.h>
fs/9p/v9fs.c +1 -0
@@ -11,6 +11,7 @@#include <linux/module.h> #include <linux/errno.h> #include <linux/fs.h> +#include <linux/kobject.h> #include <linux/sched.h> #include <linux/cred.h> #include <linux/parser.h>
fs/configfs/mount.c +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/fs.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/mount.h> #include <linux/fs_context.h>
fs/ecryptfs/main.c +1 -0
@@ -18,6 +18,7 @@#include <linux/mount.h> #include <linux/pagemap.h> #include <linux/key.h> +#include <linux/kobject.h> #include <linux/parser.h> #include <linux/fs_stack.h> #include <linux/slab.h>
fs/ext4/super.c +1 -0
@@ -43,6 +43,7 @@#include <linux/iversion.h> #include <linux/unicode.h> #include <linux/part_stat.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include <linux/freezer.h> #include <linux/fsnotify.h>
fs/ext4/sysfs.c +1 -0
@@ -10,6 +10,7 @@#include <linux/time.h> #include <linux/fs.h> +#include <linux/kobject.h> #include <linux/seq_file.h> #include <linux/slab.h> #include <linux/sysfs.h>
fs/fuse/cuse.c +1 -0
@@ -40,6 +40,7 @@#include <linux/file.h> #include <linux/fs.h> #include <linux/kdev_t.h> +#include <linux/kobject.h> #include <linux/kthread.h> #include <linux/list.h> #include <linux/magic.h>
fs/fuse/inode.c +1 -0
@@ -13,6 +13,7 @@#include <linux/file.h> #include <linux/seq_file.h> #include <linux/init.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/fs_context.h>
fs/namespace.c +1 -0
@@ -34,6 +34,7 @@#include <linux/sysfs.h> #include <linux/mnt_idmapping.h> #include <linux/nospec.h> +#include <linux/kobject.h> #include "pnode.h" #include "internal.h"
fs/nfs/client.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sched.h> #include <linux/time.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/stat.h>
fs/ubifs/sysfs.c +1 -0
@@ -9,6 +9,7 @@#include <linux/fs.h> +#include <linux/kobject.h> #include "ubifs.h" enum attr_id_t {
fs/xfs/xfs_sysfs.h +2 -0
@@ -7,6 +7,8 @@#ifndef __XFS_SYSFS_H__#define __XFS_SYSFS_H__ +#include <linux/kobject.h> +extern const struct kobj_type xfs_mp_ktype;/* xfs_mount */ extern const struct kobj_type xfs_dbg_ktype;/* debug */ extern const struct kobj_type xfs_log_ktype;/* xlog */
include/linux/cdev.h +1 -1
@@ -2,7 +2,7 @@#ifndef _LINUX_CDEV_H#define _LINUX_CDEV_H -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/kdev_t.h> #include <linux/list.h>
include/linux/cpufreq.h +1 -1
@@ -12,7 +12,7 @@#include <linux/cpu.h> #include <linux/cpumask.h> #include <linux/completion.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/notifier.h> #include <linux/of.h> #include <linux/pm_opp.h>
include/linux/device.h +1 -1
@@ -15,7 +15,7 @@#include <linux/dev_printk.h> #include <linux/energy_model.h> #include <linux/ioport.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/klist.h> #include <linux/list.h> #include <linux/lockdep.h>
include/linux/irqdesc.h +1 -1
@@ -3,7 +3,7 @@#define _LINUX_IRQDESC_H#include <linux/rcupdate.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/mutex_types.h> /*
include/linux/kobject.h +1 -77
108 lines not on this page · raw message
include/linux/kobject_types.h new file +84 -0
84 lines not on this page · raw message
include/linux/module.h +1 -1
@@ -18,7 +18,7 @@#include <linux/init.h> #include <linux/elf.h> #include <linux/stringify.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/moduleparam.h> #include <linux/jump_label.h> #include <linux/export.h>
include/linux/padata.h +1 -1
@@ -17,7 +17,7 @@#include <linux/workqueue_types.h> #include <linux/spinlock_types.h> #include <linux/list.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #define PADATA_CPU_SERIAL 0x01#define PADATA_CPU_PARALLEL 0x02
include/linux/pci.h +1 -1
@@ -32,7 +32,7 @@#include <linux/list.h> #include <linux/compiler.h> #include <linux/errno.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/atomic.h> #include <linux/device.h> #include <linux/interrupt.h>
include/net/netdev_rx_queue.h +1 -1
@@ -2,7 +2,7 @@#ifndef _LINUX_NETDEV_RX_QUEUE_H#define _LINUX_NETDEV_RX_QUEUE_H -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/netdevice.h> #include <linux/sysfs.h> #include <net/xdp.h>
include/video/omapfb_dss.h +1 -1
@@ -7,7 +7,7 @@#define __OMAPFB_DSS_H#include <linux/list.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> #include <linux/device.h> #include <linux/interrupt.h> #include <linux/platform_data/omapdss.h>
init/initramfs.c +1 -0
@@ -18,6 +18,7 @@#include <linux/init_syscalls.h> #include <linux/task_work.h> #include <linux/umh.h> +#include <linux/kobject.h> // for firmware_kobj static __initdata bool csum_present;static __initdata u32 io_csum;
kernel/cgroup/cgroup.c +1 -0
@@ -35,6 +35,7 @@#include <linux/errno.h> #include <linux/init_task.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/magic.h> #include <linux/mutex.h> #include <linux/mount.h>
kernel/exit.c +2 -0
@@ -71,6 +71,8 @@#include <linux/user_events.h> #include <linux/uaccess.h> #include <linux/hrtimer.h> +#include <linux/sysfs.h> +#include <linux/kobject.h> #include <uapi/linux/wait.h>
kernel/module/main.c +1 -0
@@ -18,6 +18,7 @@#include <linux/fs.h> #include <linux/kernel.h> #include <linux/kernel_read_file.h> +#include <linux/kobject.h> #include <linux/kstrtox.h> #include <linux/slab.h> #include <linux/vmalloc.h>
kernel/module/sysfs.c +1 -0
@@ -7,6 +7,7 @@#include <linux/module.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/fs.h> #include <linux/sysfs.h> #include <linux/slab.h>
kernel/padata.c +1 -0
@@ -17,6 +17,7 @@#include <linux/err.h> #include <linux/cpu.h> #include <linux/padata.h> +#include <linux/kobject.h> #include <linux/mutex.h> #include <linux/sched.h> #include <linux/slab.h>
kernel/panic.c +1 -0
@@ -23,6 +23,7 @@#include <linux/reboot.h> #include <linux/delay.h> #include <linux/kexec.h> +#include <linux/kobject.h> #include <linux/panic_notifier.h> #include <linux/sched.h> #include <linux/string_helpers.h>
kernel/params.c +1 -0
@@ -8,6 +8,7 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/kstrtox.h> #include <linux/module.h> #include <linux/moduleparam.h>
kernel/reboot.c +1 -0
@@ -19,6 +19,7 @@#include <linux/syscalls.h> #include <linux/syscore_ops.h> #include <linux/uaccess.h> +#include <linux/kobject.h> /* * this indicates whether you can reboot with ctrl-alt-del: the default is yes
mm/damon/sysfs-common.c +1 -0
@@ -5,6 +5,7 @@* Author: SeongJae Park <[email protected]> */ +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/sysfs.h>
mm/damon/sysfs-common.h +1 -1
@@ -6,7 +6,7 @@*/ #include <linux/damon.h> -#include <linux/kobject.h> +#include <linux/kobject_types.h> extern struct mutex damon_sysfs_lock;
mm/damon/sysfs-schemes.c +1 -0
@@ -5,6 +5,7 @@* Copyright (c) 2022 SeongJae Park <[email protected]> */ +#include <linux/kobject.h> #include <linux/slab.h> #include <linux/sysfs.h>
mm/damon/sysfs.c +1 -0
@@ -5,6 +5,7 @@* Copyright (c) 2022 SeongJae Park <[email protected]> */ +#include <linux/kobject.h> #include <linux/pid.h> #include <linux/sched.h> #include <linux/slab.h>
mm/huge_memory.c +1 -0
@@ -21,6 +21,7 @@#include <linux/backing-dev.h> #include <linux/dax.h> #include <linux/khugepaged.h> +#include <linux/kobject.h> #include <linux/freezer.h> #include <linux/pfn_t.h> #include <linux/mman.h>
mm/hugetlb.c +1 -0
@@ -36,6 +36,7 @@#include <linux/memory.h> #include <linux/mm_inline.h> #include <linux/padata.h> +#include <linux/kobject.h> #include <asm/page.h> #include <asm/pgalloc.h>
mm/khugepaged.c +1 -0
@@ -12,6 +12,7 @@#include <linux/mm_inline.h> #include <linux/kthread.h> #include <linux/khugepaged.h> +#include <linux/kobject.h> #include <linux/freezer.h> #include <linux/mman.h> #include <linux/hashtable.h>
mm/mempolicy.c +1 -0
@@ -110,6 +110,7 @@#include <linux/mmu_notifier.h> #include <linux/printk.h> #include <linux/swapops.h> +#include <linux/kobject.h> #include <asm/tlbflush.h> #include <asm/tlb.h>
mm/shmem.c +1 -0
@@ -24,6 +24,7 @@#include <linux/fs.h> #include <linux/init.h> #include <linux/vfs.h> +#include <linux/kobject.h> #include <linux/mount.h> #include <linux/ramfs.h> #include <linux/pagemap.h>
mm/swap_state.c +1 -0
@@ -10,6 +10,7 @@#include <linux/mm.h> #include <linux/gfp.h> #include <linux/kernel_stat.h> +#include <linux/kobject.h> #include <linux/mempolicy.h> #include <linux/swap.h> #include <linux/swapops.h>
mm/vmscan.c +1 -0
@@ -17,6 +17,7 @@#include <linux/module.h> #include <linux/gfp.h> #include <linux/kernel_stat.h> +#include <linux/kobject.h> #include <linux/swap.h> #include <linux/pagemap.h> #include <linux/init.h>
net/9p/trans_virtio.c +1 -0
@@ -19,6 +19,7 @@#include <linux/ipv6.h> #include <linux/errno.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/un.h> #include <linux/uaccess.h> #include <linux/inet.h>
net/bridge/br_sysfs_br.c +1 -0
@@ -9,6 +9,7 @@#include <linux/capability.h> #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/if_bridge.h>
net/rfkill/core.c +1 -0
@@ -6,6 +6,7 @@*/ #include <linux/kernel.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/init.h> #include <linux/workqueue.h>
net/wireless/reg.c +1 -0
@@ -55,6 +55,7 @@#include <linux/nl80211.h> #include <linux/platform_device.h> #include <linux/verification.h> +#include <linux/kobject.h> #include <linux/moduleparam.h> #include <linux/firmware.h> #include <net/cfg80211.h>
sound/core/init.c +1 -0
@@ -16,6 +16,7 @@#include <linux/debugfs.h> #include <linux/completion.h> #include <linux/interrupt.h> +#include <linux/kobject.h> #include <sound/core.h> #include <sound/control.h>
sound/hda/hda_bus_type.c +1 -0
@@ -4,6 +4,7 @@*/ #include <linux/init.h> #include <linux/device.h> +#include <linux/kobject.h> #include <linux/module.h> #include <linux/mod_devicetable.h> #include <linux/export.h>
sound/hda/hdac_sysfs.c +1 -0
@@ -6,6 +6,7 @@#include <linux/slab.h> #include <linux/sysfs.h> #include <linux/device.h> +#include <linux/kobject.h> #include <sound/core.h> #include <sound/hdaudio.h> #include "local.h"
Signature · 1 line
2.39.2
PATCH 7/28 sysfs.h: move declarations to sysfs_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- 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
drivers/firmware/dmi-sysfs.c +1 -0
@@ -24,6 +24,7 @@#include <linux/dmi.h> #include <linux/capability.h> #include <linux/slab.h> +#include <linux/sysfs.h> #include <linux/list.h> #include <linux/io.h> #include <asm/dmi.h>
drivers/firmware/memmap.c +1 -0
@@ -13,6 +13,7 @@#include <linux/types.h> #include <linux/memblock.h> #include <linux/slab.h> +#include <linux/sysfs.h> #include <linux/mm.h> /*
drivers/input/vivaldi-fmap.c +1 -0
@@ -9,6 +9,7 @@#include <linux/input/vivaldi-fmap.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/sysfs.h> #include <linux/types.h> /**
drivers/of/kobj.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/of.h> #include <linux/slab.h> +#include <linux/sysfs.h> #include "of_private.h"
drivers/staging/greybus/audio_manager_module.c +1 -0
@@ -6,6 +6,7 @@*/ #include <linux/slab.h> +#include <linux/sysfs.h> #include "audio_manager.h" #include "audio_manager_private.h"
include/linux/device/bus.h +1 -1
@@ -16,7 +16,7 @@#include <linux/klist.h> #include <linux/pm.h> -#include <linux/sysfs.h> // for struct attribute +#include <linux/sysfs_types.h> // for struct attribute struct device_driver ;struct device_node ;
include/linux/iio/buffer_impl.h +2 -1
@@ -1,7 +1,8 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _IIO_BUFFER_GENERIC_IMPL_H_#define _IIO_BUFFER_GENERIC_IMPL_H_ -#include <linux/sysfs.h> + +#include <linux/sysfs_types.h> // for struct attribute_group #include <linux/kref_types.h> #ifdef CONFIG_IIO_BUFFER
include/linux/kobject.h +1 -1
@@ -18,7 +18,7 @@#include <linux/kobject_types.h> #include <linux/types.h> #include <linux/list.h> -#include <linux/sysfs.h> +#include <linux/sysfs_types.h> // for struct attribute #include <linux/compiler.h> #include <linux/container_of.h> #include <linux/spinlock_types.h>
include/linux/module.h +1 -1
@@ -27,7 +27,7 @@#include <linux/tracepoint-defs.h> #include <linux/srcu.h> #include <linux/static_call_types.h> -#include <linux/sysfs.h> // for struct attribute +#include <linux/sysfs_types.h> // for struct attribute #include <linux/dynamic_debug.h> #include <linux/percpu.h>
include/linux/perf_event.h +1 -1
@@ -55,7 +55,7 @@ struct perf_guest_info_callbacks {#include <linux/static_key.h> #include <linux/jump_label_ratelimit.h> #include <linux/atomic.h> -#include <linux/sysfs.h> +#include <linux/sysfs_types.h> #include <linux/perf_regs.h> #include <linux/cgroup.h> #include <linux/refcount_types.h>
include/linux/sysfs.h +1 -62
87 lines not on this page · raw message
include/linux/sysfs_types.h new file +89 -0
89 lines not on this page · raw message
include/linux/thermal.h +1 -1
@@ -13,7 +13,7 @@#include <linux/of.h> #include <linux/idr.h> #include <linux/device.h> -#include <linux/sysfs.h> +#include <linux/sysfs_types.h> #include <linux/workqueue_types.h> #include <uapi/linux/thermal.h>
include/net/netdev_rx_queue.h +1 -1
@@ -4,7 +4,7 @@#include <linux/kobject_types.h> #include <linux/netdevice.h> -#include <linux/sysfs.h> +#include <linux/sysfs_types.h> #include <net/xdp.h> /* This structure contains an instance of an RX queue. */
include/rdma/ib_sysfs.h +1 -1
@@ -5,7 +5,7 @@#ifndef DEF_RDMA_IB_SYSFS_H #define DEF_RDMA_IB_SYSFS_H -#include <linux/sysfs.h> +#include <linux/sysfs_types.h> struct ib_device ;
kernel/kheaders.c +1 -0
@@ -10,6 +10,7 @@#include <linux/module.h> #include <linux/kobject.h> #include <linux/init.h> +#include <linux/sysfs.h> /* * Define kernel_headers_data and kernel_headers_data_end, within which the
lib/kobject.c +1 -0
@@ -21,6 +21,7 @@#include <linux/uidgid.h> #include <linux/workqueue.h> #include <linux/kref.h> +#include <linux/sysfs.h> /** * kobject_namespace() - Return @kobj's namespace tag.
mm/cma_sysfs.c +1 -0
@@ -8,6 +8,7 @@#include <linux/cma.h> #include <linux/kernel.h> #include <linux/slab.h> +#include <linux/sysfs.h> #include "cma.h"
Signature · 1 line
2.39.2
PATCH 8/28 maple_tree.h: move declarations to maple_tree_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/maple_tree.h | 323 +---------------------------- include/linux/maple_tree_types.h | 341 +++++++++++++++++++++++++++++++ include/linux/mm.h | 1 + include/linux/mm_types.h | 2 +- 4 files changed, 345 insertions(+), 322 deletions(-) create mode 100644 include/linux/maple_tree_types.h
include/linux/maple_tree.h +2 -321
@@ -8,147 +8,13 @@* Matthew Wilcox <[email protected]> */ +#include <linux/maple_tree_types.h> +#include <linux/kernel.h> #include <linux/rcupdate.h> #include <linux/spinlock.h> /* #define CONFIG_MAPLE_RCU_DISABLED */ -/* -* Allocated nodes are mutable until they have been inserted into the tree, -* at which time they cannot change their type until they have been removed -* from the tree and an RCU grace period has passed. -* -* Removed nodes have their ->parent set to point to themselves. RCU readers -* check ->parent before relying on the value that they loaded from the -* slots array. This lets us reuse the slots array for the RCU head. -* -* Nodes in the tree point to their parent unless bit 0 is set. -*/ -#if defined(CONFIG_64BIT ) || defined(BUILD_VDSO32_64 ) -/* 64bit sizes */ -#define MAPLE_NODE_SLOTS 31/* 256 bytes including ->parent */ -#define MAPLE_RANGE64_SLOTS 16/* 256 bytes */ -#define MAPLE_ARANGE64_SLOTS 10/* 240 bytes */ -#define MAPLE_ALLOC_SLOTS (MAPLE_NODE_SLOTS - 1) -#else -/* 32bit sizes */ -#define MAPLE_NODE_SLOTS 63/* 256 bytes including ->parent */ -#define MAPLE_RANGE64_SLOTS 32/* 256 bytes */ -#define MAPLE_ARANGE64_SLOTS 21/* 240 bytes */ -#define MAPLE_ALLOC_SLOTS (MAPLE_NODE_SLOTS - 2) -#endif /* defined(CONFIG_64BIT) || defined(BUILD_VDSO32_64) */ - -#define MAPLE_NODE_MASK 255UL - -/* -* The node->parent of the root node has bit 0 set and the rest of the pointer -* is a pointer to the tree itself. No more bits are available in this pointer -* (on m68k, the data structure may only be 2-byte aligned). -* -* Internal non-root nodes can only have maple_range_* nodes as parents. The -* parent pointer is 256B aligned like all other tree nodes. When storing a 32 -* or 64 bit values, the offset can fit into 4 bits. The 16 bit values need an -* extra bit to store the offset. This extra bit comes from a reuse of the last -* bit in the node type. This is possible by using bit 1 to indicate if bit 2 -* is part of the type or the slot. -* -* Once the type is decided, the decision of an allocation range type or a range -* type is done by examining the immutable tree flag for the MAPLE_ALLOC_RANGE -* flag. -* -* Node types: -* 0x??1 = Root -* 0x?00 = 16 bit nodes -* 0x010 = 32 bit nodes -* 0x110 = 64 bit nodes -* -* Slot size and location in the parent pointer: -* type : slot location -* 0x??1 : Root -* 0x?00 : 16 bit values, type in 0-1, slot in 2-6 -* 0x010 : 32 bit values, type in 0-2, slot in 3-6 -* 0x110 : 64 bit values, type in 0-2, slot in 3-6 -*/ - -/* -* This metadata is used to optimize the gap updating code and in reverse -* searching for gaps or any other code that needs to find the end of the data. -*/ -struct maple_metadata { -unsigned char end; -unsigned char gap; -}; - -/* -* Leaf nodes do not store pointers to nodes, they store user data. Users may -* store almost any bit pattern. As noted above, the optimisation of storing an -* entry at 0 in the root pointer cannot be done for data which have the bottom -* two bits set to '10'. We also reserve values with the bottom two bits set to -* '10' which are below 4096 (ie 2, 6, 10 .. 4094) for internal use. Some APIs -* return errnos as a negative errno shifted right by two bits and the bottom -* two bits set to '10', and while choosing to store these values in the array -* is not an error, it may lead to confusion if you're testing for an error with -* mas_is_err(). -* -* Non-leaf nodes store the type of the node pointed to (enum maple_type in bits -* 3-6), bit 2 is reserved. That leaves bits 0-1 unused for now. -* -* In regular B-Tree terms, pivots are called keys. The term pivot is used to -* indicate that the tree is specifying ranges, Pivots may appear in the -* subtree with an entry attached to the value whereas keys are unique to a -* specific position of a B-tree. Pivot values are inclusive of the slot with -* the same index. -*/ - -struct maple_range_64 { -struct maple_pnode *parent; -unsigned long pivot[MAPLE_RANGE64_SLOTS -1 ]; -union { -void __rcu *slot[MAPLE_RANGE64_SLOTS ]; -struct { -void __rcu *pad[MAPLE_RANGE64_SLOTS -1 ]; -struct maple_metadata meta; - }; - }; -}; - -/* -* At tree creation time, the user can specify that they're willing to trade off -* storing fewer entries in a tree in return for storing more information in -* each node. -* -* The maple tree supports recording the largest range of NULL entries available -* in this node, also called gaps. This optimises the tree for allocating a -* range. -*/ -struct maple_arange_64 { -struct maple_pnode *parent; -unsigned long pivot[MAPLE_ARANGE64_SLOTS -1 ]; -void __rcu *slot[MAPLE_ARANGE64_SLOTS ]; -unsigned long gap[MAPLE_ARANGE64_SLOTS ]; -struct maple_metadata meta; -}; - -struct maple_alloc { -unsigned long total; -unsigned char node_count; -unsigned int request_count; -struct maple_alloc *slot[MAPLE_ALLOC_SLOTS ]; -}; - -struct maple_topiary { -struct maple_pnode *parent; -struct maple_enode *next;/* Overlaps the pivot */ -}; - -enum maple_type { - maple_dense, - maple_leaf_64, - maple_range_64, - maple_arange_64, -}; - -/** * DOC: Maple tree flags *
@@ -181,7 +47,6 @@ enum maple_type {#define MAPLE_RESERVED_RANGE 4096#ifdef CONFIG_LOCKDEP -typedef struct lockdep_map *lockdep_map_p ;#define mt_lock_is_held (mt) \ (!(mt)->ma_external_lock || lock_is_held((mt)->ma_external_lock))
@@ -194,36 +59,12 @@ typedef struct lockdep_map *lockdep_map_p;#define mt_on_stack (mt) (mt).ma_external_lock = NULL#else -typedef struct {/* nothing */ }lockdep_map_p ;#define mt_lock_is_held (mt) 1#define mt_write_lock_is_held (mt) 1#define mt_set_external_lock (mt, lock) do { } while (0)#define mt_on_stack (mt) do { } while (0)#endif -/* -* If the tree contains a single entry at index 0, it is usually stored in -* tree->ma_root. To optimise for the page cache, an entry which ends in '00', -* '01' or '11' is stored in the root, but an entry which ends in '10' will be -* stored in a node. Bits 3-6 are used to store enum maple_type. -* -* The flags are used both to store some immutable information about this tree -* (set at tree creation time) and dynamic information set under the spinlock. -* -* Another use of flags are to indicate global states of the tree. This is the -* case with the MAPLE_USE_RCU flag, which indicates the tree is currently in -* RCU mode. This mode was added to allow the tree to reuse nodes instead of -* re-allocating and RCU freeing nodes when there is a single user. -*/ -struct maple_tree { -union { -spinlock_t ma_lock; -lockdep_map_p ma_external_lock; - }; -unsigned int ma_flags; -void __rcu *ma_root; -}; -/** * MTREE_INIT() - Initialize a maple tree * @name: The maple tree name
@@ -260,56 +101,6 @@ struct maple_tree { spin_lock_nested((&(mt)->ma_lock), subclass)#define mtree_unlock (mt) spin_unlock((&(mt)->ma_lock)) -/* -* The Maple Tree squeezes various bits in at various points which aren't -* necessarily obvious. Usually, this is done by observing that pointers are -* N-byte aligned and thus the bottom log_2(N) bits are available for use. We -* don't use the high bits of pointers to store additional information because -* we don't know what bits are unused on any given architecture. -* -* Nodes are 256 bytes in size and are also aligned to 256 bytes, giving us 8 -* low bits for our own purposes. Nodes are currently of 4 types: -* 1. Single pointer (Range is 0-0) -* 2. Non-leaf Allocation Range nodes -* 3. Non-leaf Range nodes -* 4. Leaf Range nodes All nodes consist of a number of node slots, -* pivots, and a parent pointer. -*/ - -struct maple_node { -union { -struct { -struct maple_pnode *parent; -void __rcu *slot[MAPLE_NODE_SLOTS ]; - }; -struct { -void *pad; -struct rcu_head rcu; -struct maple_enode *piv_parent; -unsigned char parent_slot; -enum maple_type type; -unsigned char slot_len; -unsigned int ma_flags; - }; -struct maple_range_64 mr64; -struct maple_arange_64 ma64; -struct maple_alloc alloc; - }; -}; - -/* -* More complicated stores can cause two nodes to become one or three and -* potentially alter the height of the tree. Either half of the tree may need -* to be rebalanced against the other. The ma_topiary struct is used to track -* which nodes have been 'cut' from the tree so that the change can be done -* safely at a later date. This is done to support RCU. -*/ -struct ma_topiary { -struct maple_enode *head; -struct maple_enode *tail; -struct maple_tree *mtree; -}; -void *mtree_load (struct maple_tree *mt,unsigned long index); int mtree_insert(struct maple_tree *mt, unsigned long index,
@@ -349,105 +140,6 @@ static inline bool mtree_empty(const struct maple_tree *mt)/* Advanced API */ -/* -* Maple State Status -* ma_active means the maple state is pointing to a node and offset and can -* continue operating on the tree. -* ma_start means we have not searched the tree. -* ma_root means we have searched the tree and the entry we found lives in -* the root of the tree (ie it has index 0, length 1 and is the only entry in -* the tree). -* ma_none means we have searched the tree and there is no node in the -* tree for this entry. For example, we searched for index 1 in an empty -* tree. Or we have a tree which points to a full leaf node and we -* searched for an entry which is larger than can be contained in that -* leaf node. -* ma_pause means the data within the maple state may be stale, restart the -* operation -* ma_overflow means the search has reached the upper limit of the search -* ma_underflow means the search has reached the lower limit of the search -* ma_error means there was an error, check the node for the error number. -*/ -enum maple_status { - ma_active, - ma_start, - ma_root, - ma_none, - ma_pause, - ma_overflow, - ma_underflow, - ma_error, -}; - -/* -* The maple state is defined in the struct ma_state and is used to keep track -* of information during operations, and even between operations when using the -* advanced API. -* -* If state->node has bit 0 set then it references a tree location which is not -* a node (eg the root). If bit 1 is set, the rest of the bits are a negative -* errno. Bit 2 (the 'unallocated slots' bit) is clear. Bits 3-6 indicate the -* node type. -* -* state->alloc either has a request number of nodes or an allocated node. If -* stat->alloc has a requested number of nodes, the first bit will be set (0x1) -* and the remaining bits are the value. If state->alloc is a node, then the -* node will be of type maple_alloc. maple_alloc has MAPLE_NODE_SLOTS - 1 for -* storing more allocated nodes, a total number of nodes allocated, and the -* node_count in this node. node_count is the number of allocated nodes in this -* node. The scaling beyond MAPLE_NODE_SLOTS - 1 is handled by storing further -* nodes into state->alloc->slot[0]'s node. Nodes are taken from state->alloc -* by removing a node from the state->alloc node until state->alloc->node_count -* is 1, when state->alloc is returned and the state->alloc->slot[0] is promoted -* to state->alloc. Nodes are pushed onto state->alloc by putting the current -* state->alloc into the pushed node's slot[0]. -* -* The state also contains the implied min/max of the state->node, the depth of -* this search, and the offset. The implied min/max are either from the parent -* node or are 0-oo for the root node. The depth is incremented or decremented -* every time a node is walked down or up. The offset is the slot/pivot of -* interest in the node - either for reading or writing. -* -* When returning a value the maple state index and last respectively contain -* the start and end of the range for the entry. Ranges are inclusive in the -* Maple Tree. -* -* The status of the state is used to determine how the next action should treat -* the state. For instance, if the status is ma_start then the next action -* should start at the root of the tree and walk down. If the status is -* ma_pause then the node may be stale data and should be discarded. If the -* status is ma_overflow, then the last action hit the upper limit. -* -*/ -struct ma_state { -struct maple_tree *tree;/* The tree we're operating in */ -unsigned long index;/* The index we're operating on - range start */ -unsigned long last;/* The last index we're operating on - range end */ -struct maple_enode *node;/* The node containing this entry */ -unsigned long min;/* The minimum index of this node - implied pivot min */ -unsigned long max;/* The maximum index of this node - implied pivot max */ -struct maple_alloc *alloc;/* Allocated nodes for this operation */ -enum maple_status status;/* The status of the state (active, start, none, etc) */ -unsigned char depth;/* depth of tree descent during write */ -unsigned char offset; -unsigned char mas_flags; -unsigned char end;/* The end of the node */ -}; - -struct ma_wr_state { -struct ma_state *mas; -struct maple_node *node;/* Decoded mas->node */ -unsigned long r_min;/* range min */ -unsigned long r_max;/* range max */ -enum maple_type type;/* mas->node type */ -unsigned char offset_end;/* The offset where the write ends */ -unsigned long *pivots;/* mas->node->pivots pointer */ -unsigned long end_piv;/* The pivot at the offset end */ -void __rcu **slots;/* mas->node->slots pointer */ -void *entry;/* The entry to write */ -void *content;/* The existing entry that is being overwritten */ -}; -#define mas_lock (mas) spin_lock(&((mas)->tree->ma_lock))#define mas_lock_nested (mas, subclass) \ spin_lock_nested(&((mas)->tree->ma_lock), subclass)
@@ -520,17 +212,6 @@ int mas_empty_area(struct ma_state *mas, unsigned long min, unsigned long max,int mas_empty_area_rev (struct ma_state *mas,unsigned long min,unsigned long max,unsigned long size); -static inline void mas_init (struct ma_state *mas,struct maple_tree *tree, -unsigned long addr) -{ -memset (mas,0 ,sizeof (struct ma_state )); - mas->tree = tree; - mas->index = mas->last = addr; - mas->max =ULONG_MAX ; - mas->status = ma_start; - mas->node =NULL ; -} -static inline bool mas_is_active (struct ma_state *mas) {return mas->status == ma_active;
include/linux/maple_tree_types.h new file +341 -0
341 lines not on this page · raw message
include/linux/mm.h +1 -0
@@ -13,6 +13,7 @@#include <linux/debug_locks.h> #include <linux/mm_types.h> #include <linux/mmap_lock.h> +#include <linux/maple_tree.h> #include <linux/range.h> #include <linux/pfn.h> #include <linux/bit_spinlock.h>
include/linux/mm_types.h +1 -1
@@ -9,7 +9,7 @@#include <linux/list.h> #include <linux/spinlock_types.h> #include <linux/rbtree_types.h> -#include <linux/maple_tree.h> +#include <linux/maple_tree_types.h> #include <linux/rwsem.h> #include <linux/cpumask.h> #include <linux/uprobes.h>
Signature · 1 line
2.39.2
PATCH 9/28 rwsem.h: move declarations to rwsem_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/backing-dev-defs.h | 2 +- include/linux/comedi/comedidev.h | 2 +- include/linux/gnss.h | 2 +- include/linux/i3c/master.h | 2 +- include/linux/ipc_namespace.h | 2 +- include/linux/leds.h | 2 +- include/linux/mfd/intel-m10-bmc.h | 2 +- include/linux/mm_types.h | 2 +- include/linux/nfs_fs.h | 2 +- include/linux/posix-clock.h | 2 +- include/linux/quota.h | 2 +- include/linux/rwsem.h | 48 +------------------ include/linux/rwsem_types.h | 78 +++++++++++++++++++++++++++++++ include/linux/tty.h | 2 +- include/linux/user_namespace.h | 2 +- include/net/sch_generic.h | 2 +- include/rdma/ib_verbs.h | 2 +- include/sound/core.h | 2 +- 18 files changed, 95 insertions(+), 63 deletions(-) create mode 100644 include/linux/rwsem_types.h
include/linux/backing-dev-defs.h +1 -1
@@ -15,7 +15,7 @@#include <linux/kref_types.h> #ifdef CONFIG_CGROUP_WRITEBACK -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #endif struct page ;
include/linux/comedi/comedidev.h +1 -1
@@ -13,7 +13,7 @@#include <linux/dma-mapping.h> #include <linux/mutex_types.h> #include <linux/spinlock_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/kref_types.h> #include <linux/comedi.h>
include/linux/gnss.h +1 -1
@@ -12,7 +12,7 @@#include <linux/device.h> #include <linux/kfifo.h> #include <linux/mutex_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/types.h> #include <linux/wait.h>
include/linux/i3c/master.h +1 -1
@@ -14,7 +14,7 @@#include <linux/i2c.h> #include <linux/i3c/ccc.h> #include <linux/i3c/device.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/workqueue_types.h> #define I3C_HOT_JOIN_ADDR 0x2
include/linux/ipc_namespace.h +1 -1
@@ -4,7 +4,7 @@#include <linux/err.h> #include <linux/idr.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/notifier.h> #include <linux/nsproxy.h> #include <linux/ns_common.h>
include/linux/leds.h +1 -1
@@ -11,7 +11,7 @@#include <dt-bindings/leds/common.h> #include <linux/device.h> #include <linux/mutex_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/spinlock_types.h> #include <linux/timer_types.h> #include <linux/types.h>
include/linux/mfd/intel-m10-bmc.h +1 -1
@@ -11,7 +11,7 @@#include <linux/bits.h> #include <linux/dev_printk.h> #include <linux/regmap.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #define M10BMC_N3000_LEGACY_BUILD_VER 0x300468#define M10BMC_N3000_SYS_BASE 0x300800
include/linux/mm_types.h +1 -1
@@ -10,7 +10,7 @@#include <linux/spinlock_types.h> #include <linux/rbtree_types.h> #include <linux/maple_tree_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/cpumask.h> #include <linux/uprobes.h> #include <linux/rcupdate.h>
include/linux/nfs_fs.h +1 -1
@@ -24,7 +24,7 @@#include <linux/pagemap.h> #include <linux/rbtree_types.h> #include <linux/refcount_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/sunrpc/debug.h> #include <linux/sunrpc/auth.h>
include/linux/posix-clock.h +1 -1
@@ -11,7 +11,7 @@#include <linux/fs.h> #include <linux/poll.h> #include <linux/posix-timers.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> struct posix_clock ;struct posix_clock_context ;
include/linux/quota.h +1 -1
@@ -34,7 +34,7 @@#include <linux/list.h> #include <linux/mutex_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/spinlock_types.h> #include <linux/percpu_counter.h>
include/linux/rwsem.h +1 -47
69 lines not on this page · raw message
include/linux/rwsem_types.h new file +78 -0
78 lines not on this page · raw message
include/linux/tty.h +1 -1
@@ -13,7 +13,7 @@#include <linux/mutex_types.h> #include <linux/tty_flags.h> #include <uapi/linux/tty.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/llist.h>
include/linux/user_namespace.h +1 -1
@@ -6,7 +6,7 @@#include <linux/ns_common.h> #include <linux/sched.h> #include <linux/workqueue_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/sysctl.h> #include <linux/err.h>
include/net/sch_generic.h +1 -1
@@ -12,7 +12,7 @@#include <linux/list.h> #include <linux/refcount.h> #include <linux/mutex_types.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/atomic.h> #include <linux/hashtable.h> #include <net/gen_stats.h>
include/rdma/ib_verbs.h +1 -1
@@ -18,7 +18,7 @@#include <linux/dma-mapping.h> #include <linux/kref_types.h> #include <linux/list.h> -#include <linux/rwsem.h> +#include <linux/rwsem_types.h> #include <linux/workqueue_types.h> #include <linux/irq_poll.h> #include <uapi/linux/if_ether.h>
include/sound/core.h +1 -1
@@ -10,7 +10,7 @@#include <linux/device.h> #include <linux/sched.h> /* wake_up() */ #include <linux/mutex_types.h> /* struct mutex */ -#include <linux/rwsem.h> /* struct rw_semaphore */ +#include <linux/rwsem_types.h> /* struct rw_semaphore */ #include <linux/stringify.h> #include <linux/printk.h> #include <linux/wait.h>
Signature · 1 line
2.39.2
PATCH 10/28 uprobes.h: move declarations to uprobes_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- arch/arm64/kernel/signal.c | 1 + include/linux/mm_types.h | 2 +- include/linux/uprobes.h | 10 +--------- include/linux/uprobes_types.h | 25 +++++++++++++++++++++++++ kernel/entry/common.c | 1 + kernel/trace/bpf_trace.c | 1 + mm/memory.c | 1 + 7 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 include/linux/uprobes_types.h
arch/arm64/kernel/signal.c +1 -0
@@ -14,6 +14,7 @@#include <linux/freezer.h> #include <linux/stddef.h> #include <linux/uaccess.h> +#include <linux/uprobes.h> #include <linux/sizes.h> #include <linux/string.h> #include <linux/resume_user_mode.h>
include/linux/mm_types.h +1 -1
@@ -12,7 +12,7 @@#include <linux/maple_tree_types.h> #include <linux/rwsem_types.h> #include <linux/cpumask.h> -#include <linux/uprobes.h> +#include <linux/uprobes_types.h> #include <linux/rcupdate.h> #include <linux/page-flags-layout.h> #include <linux/workqueue_types.h>
include/linux/uprobes.h +1 -9
@@ -11,6 +11,7 @@* Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra */ +#include <linux/uprobes_types.h> #include <linux/errno.h> #include <linux/types.h>
@@ -94,12 +95,6 @@ enum rp_check { RP_CHECK_RET, }; -struct xol_area ; - -struct uprobes_state { -struct xol_area *xol_area; -}; -extern void __init uprobes_init (void );extern int set_swbp (struct arch_uprobe *aup,struct mm_struct *mm,unsigned long vaddr);extern int set_orig_insn (struct arch_uprobe *aup,struct mm_struct *mm,unsigned long vaddr);
@@ -137,9 +132,6 @@ extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs *regs);extern void arch_uprobe_copy_ixol (struct page *page,unsigned long vaddr,void *src,unsigned long len);#else /* !CONFIG_UPROBES */ -struct uprobes_state { -}; -static inline void uprobes_init (void ) { }
include/linux/uprobes_types.h new file +25 -0
@@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef _LINUX_UPROBES_TYPES_H +#define _LINUX_UPROBES_TYPES_H +/* +* User-space Probes (UProbes) +* +* Copyright (C) IBM Corporation, 2008-2012 +* Authors: +* Srikar Dronamraju +* Jim Keniston +* Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra +*/ + +#ifdef CONFIG_UPROBES + +struct xol_area ; + +struct uprobes_state { +struct xol_area *xol_area; +}; +#else /* !CONFIG_UPROBES */ +struct uprobes_state { +}; +#endif /* !CONFIG_UPROBES */ +#endif /* _LINUX_UPROBES_TYPES_H */
kernel/entry/common.c +1 -0
@@ -9,6 +9,7 @@#include <linux/livepatch.h> #include <linux/audit.h> #include <linux/tick.h> +#include <linux/uprobes.h> #include "common.h"
kernel/trace/bpf_trace.c +1 -0
@@ -11,6 +11,7 @@#include <linux/btf.h> #include <linux/filter.h> #include <linux/uaccess.h> +#include <linux/uprobes.h> #include <linux/ctype.h> #include <linux/kprobes.h> #include <linux/spinlock.h>
mm/memory.c +1 -0
@@ -70,6 +70,7 @@#include <linux/string.h> #include <linux/memory-tiers.h> #include <linux/debugfs.h> +#include <linux/uprobes.h> #include <linux/userfaultfd_k.h> #include <linux/dax.h> #include <linux/oom.h>
Signature · 1 line
2.39.2
kernel test robot
build botRe: [PATCH 10/28] uprobes.h: move declarations to uprobes_types.h
kernel test robot noticed the following build errors:
Hi Max,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20240131]
[cannot apply to mkp-scsi/for-next jejb-scsi/for-next axboe-block/for-next linus/master v6.8-rc2 v6.8-rc1 v6.7 v6.8-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Max-Kellermann/include-add-missing-includes/20240131-231042 base: next-20240131 patch link: https://lore.kernel.org/r/20240131145008.1345531-11-max.kellermann%40ionos.com patch subject: [PATCH 10/28] uprobes.h: move declarations to uprobes_types.h config: csky-allnoconfig (https://download.01.org/0day-ci/archive/20240203/[email protected]/config) compiler: csky-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
arch/csky/kernel/signal.c: In function 'do_notify_resume':
>> arch/csky/kernel/signal.c:259:17: error: implicit declaration of function 'uprobe_notify_resume'; did you mean 'do_notify_resume'? [-Werror=implicit-function-declaration]
259 | uprobe_notify_resume(regs);
| ^~~~~~~~~~~~~~~~~~~~
| do_notify_resumecc1: some warnings being treated as errors
vim +259 arch/csky/kernel/signal.c
e9564df753fd54 Guo Ren 2018-09-05 250
e9564df753fd54 Guo Ren 2018-09-05 251 /*
bf241682936293 Guo Ren 2019-04-01 252 * notification of userspace execution resumption
bf241682936293 Guo Ren 2019-04-01 253 * - triggered by the _TIF_WORK_MASK flags
e9564df753fd54 Guo Ren 2018-09-05 254 */
bf241682936293 Guo Ren 2019-04-01 255 asmlinkage void do_notify_resume(struct pt_regs *regs,
bf241682936293 Guo Ren 2019-04-01 256 unsigned long thread_info_flags)
e9564df753fd54 Guo Ren 2018-09-05 257 {
8f6bb793b2be82 Guo Ren 2020-04-02 258 if (thread_info_flags & _TIF_UPROBE)8f6bb793b2be82 Guo Ren 2020-04-02 @259 uprobe_notify_resume(regs);
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 11/28 percpu_counter.h: move declarations to percpu_counter_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/backing-dev-defs.h | 2 +- include/linux/flex_proportions.h | 2 +- include/linux/ipc_namespace.h | 2 +- include/linux/mm_types.h | 3 ++- include/linux/percpu_counter.h | 17 +------------ include/linux/percpu_counter_types.h | 37 ++++++++++++++++++++++++++++ include/linux/sched/user.h | 2 +- include/linux/shmem_fs.h | 2 +- kernel/user.c | 1 + lib/flex_proportions.c | 1 + 10 files changed, 47 insertions(+), 22 deletions(-) create mode 100644 include/linux/percpu_counter_types.h
include/linux/backing-dev-defs.h +1 -1
@@ -6,7 +6,7 @@#include <linux/radix-tree.h> #include <linux/rbtree_types.h> #include <linux/spinlock_types.h> -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> #include <linux/percpu-refcount.h> #include <linux/flex_proportions.h> #include <linux/timer_types.h>
include/linux/flex_proportions.h +1 -1
@@ -8,7 +8,7 @@#ifndef _LINUX_FLEX_PROPORTIONS_H#define _LINUX_FLEX_PROPORTIONS_H -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> #include <linux/spinlock_types.h> #include <linux/seqlock_types.h> #include <linux/gfp_types.h>
include/linux/ipc_namespace.h +1 -1
@@ -11,7 +11,7 @@#include <linux/refcount.h> #include <linux/rhashtable-types.h> #include <linux/sysctl.h> -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> struct user_namespace ;
include/linux/mm_types.h +2 -1
@@ -17,7 +17,8 @@#include <linux/page-flags-layout.h> #include <linux/workqueue_types.h> #include <linux/seqlock_types.h> -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> +#include <linux/percpu.h> #include <asm/mmu.h>
include/linux/percpu_counter.h +1 -16
@@ -7,26 +7,15 @@* WARNING: these things are HUGE. 4 kbytes per counter on 32-way P4. */ -#include <linux/spinlock_types.h> -#include <linux/list.h> +#include <linux/percpu_counter_types.h> #include <linux/threads.h> #include <linux/percpu.h> -#include <linux/types.h> /* percpu_counter batch for local add or sub */ #define PERCPU_COUNTER_LOCAL_BATCH INT_MAX#ifdef CONFIG_SMP -struct percpu_counter { -raw_spinlock_t lock; -s64 count; -#ifdef CONFIG_HOTPLUG_CPU -struct list_head list;/* All percpu_counters are on a list */ -#endif -s32 __percpu *counters; -}; -extern int percpu_counter_batch; int __percpu_counter_init_many(struct percpu_counter *fbc, s64 amount,
@@ -131,10 +120,6 @@ static inline bool percpu_counter_initialized(struct percpu_counter *fbc)#else /* !CONFIG_SMP */ -struct percpu_counter { -s64 count; -}; -static inline int percpu_counter_init_many (struct percpu_counter *fbc,s64 amount,gfp_t gfp,u32 nr_counters)
include/linux/percpu_counter_types.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PERCPU_COUNTER_TYPES_H +#define _LINUX_PERCPU_COUNTER_TYPES_H +/* +* A simple "approximate counter" for use in ext2 and ext3 superblocks. +* +* WARNING: these things are HUGE. 4 kbytes per counter on 32-way P4. +*/ + +#include <linux/types.h> + +#ifdef CONFIG_SMP + +#include <linux/spinlock_types.h> + +#ifdef CONFIG_HOTPLUG_CPU +#include <linux/list.h> +#endif + +struct percpu_counter { +raw_spinlock_t lock; +s64 count; +#ifdef CONFIG_HOTPLUG_CPU +struct list_head list;/* All percpu_counters are on a list */ +#endif +s32 __percpu *counters; +}; + +#else /* !CONFIG_SMP */ + +struct percpu_counter { +s64 count; +}; + +#endif /* CONFIG_SMP */ + +#endif /* _LINUX_PERCPU_COUNTER_TYPES_H */
include/linux/sched/user.h +1 -1
@@ -4,7 +4,7 @@#include <linux/uidgid_types.h> #include <linux/atomic.h> -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> #include <linux/refcount.h> #include <linux/ratelimit_types.h>
include/linux/shmem_fs.h +1 -1
@@ -6,7 +6,7 @@#include <linux/swap.h> #include <linux/mempolicy.h> #include <linux/pagemap.h> -#include <linux/percpu_counter.h> +#include <linux/percpu_counter_types.h> #include <linux/xattr.h> #include <linux/fs_parser.h> #include <linux/userfaultfd_k.h>
kernel/user.c +1 -0
@@ -22,6 +22,7 @@#include <linux/proc_ns.h> #include <linux/ratelimit.h> #include <linux/uidgid.h> +#include <linux/percpu_counter.h> #if IS_ENABLED (CONFIG_BINFMT_MISC ) struct binfmt_misc init_binfmt_misc = {
lib/flex_proportions.c +1 -0
@@ -34,6 +34,7 @@* which something happened with proportion of type j. */ #include <linux/flex_proportions.h> +#include <linux/percpu_counter.h> #include <linux/math64.h> #include <linux/seqlock.h>
Signature · 1 line
2.39.2
PATCH 12/28 bvec.h: move declarations to bvec_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/blk_types.h | 2 +- include/linux/bvec.h | 84 +-------------------------------- include/linux/bvec_types.h | 95 ++++++++++++++++++++++++++++++++++++++ include/linux/iov_iter.h | 2 +- include/linux/skbuff.h | 2 +- 5 files changed, 99 insertions(+), 86 deletions(-) create mode 100644 include/linux/bvec_types.h
include/linux/blk_types.h +1 -1
@@ -7,7 +7,7 @@#define __LINUX_BLK_TYPES_H#include <linux/types.h> -#include <linux/bvec.h> +#include <linux/bvec_types.h> #include <linux/device.h> #include <linux/ktime.h>
include/linux/bvec.h +1 -83
102 lines not on this page · raw message
include/linux/bvec_types.h new file +95 -0
95 lines not on this page · raw message
include/linux/iov_iter.h +1 -1
@@ -9,7 +9,7 @@#define _LINUX_IOV_ITER_H#include <linux/uio.h> -#include <linux/bvec.h> +#include <linux/bvec_types.h> typedef size_t (*iov_step_f )(void *iter_base,size_t progress,size_t len,void *priv,void *priv2);
include/linux/skbuff.h +1 -1
@@ -14,7 +14,7 @@#include <linux/compiler.h> #include <linux/time.h> #include <linux/bug.h> -#include <linux/bvec.h> +#include <linux/bvec_types.h> #include <linux/cache.h> #include <linux/rbtree.h> #include <linux/socket.h>
Signature · 1 line
2.39.2
PATCH 13/28 wait.h: move declarations to wait_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +- include/drm/gpu_scheduler.h | 2 +- include/linux/backing-dev-defs.h | 2 +- include/linux/blkdev.h | 2 +- include/linux/buffer_head.h | 2 +- include/linux/ceph/libceph.h | 2 +- include/linux/cgroup-defs.h | 2 +- include/linux/console_struct.h | 2 +- include/linux/counter.h | 2 +- include/linux/dcache.h | 2 +- include/linux/dma-buf.h | 2 +- include/linux/eventfd.h | 2 +- include/linux/gnss.h | 2 +- include/linux/libps2.h | 2 +- include/linux/lp.h | 2 +- include/linux/mempool.h | 2 +- include/linux/mhi.h | 2 +- include/linux/mmzone.h | 2 +- include/linux/net.h | 2 +- include/linux/nfs_fs_sb.h | 2 +- include/linux/parport.h | 2 +- include/linux/pid.h | 2 +- include/linux/pm.h | 2 +- include/linux/poll.h | 2 +- include/linux/psi_types.h | 2 +- include/linux/relay.h | 2 +- include/linux/rtnetlink.h | 2 +- include/linux/sbitmap.h | 2 +- include/linux/sunrpc/rpc_pipe_fs.h | 2 +- include/linux/syslog.h | 2 +- include/linux/wait.h | 23 +------------------ include/linux/wait_bit.h | 2 +- include/linux/wait_types.h | 31 ++++++++++++++++++++++++++ include/media/dvb_ringbuffer.h | 2 +- include/net/smc.h | 2 +- include/net/sock.h | 2 +- include/scsi/libiscsi.h | 2 +- include/sound/control.h | 2 +- include/sound/rawmidi.h | 2 +- 39 files changed, 69 insertions(+), 59 deletions(-) create mode 100644 include/linux/wait_types.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h +1 -1
@@ -25,7 +25,7 @@#define __AMDGPU_IH_H__#include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> /* Maximum number of IVs processed at once */ #define AMDGPU_IH_MAX_NUM_IVS 32
include/drm/gpu_scheduler.h +1 -1
@@ -28,7 +28,7 @@#include <linux/dma-fence.h> #include <linux/completion.h> #include <linux/xarray.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/workqueue_types.h> #define MAX_WAIT_SCHED_ENTITY_Q_EMPTY msecs_to_jiffies(1000)
include/linux/backing-dev-defs.h +1 -1
@@ -10,7 +10,7 @@#include <linux/percpu-refcount.h> #include <linux/flex_proportions.h> #include <linux/timer_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/workqueue_types.h> #include <linux/kref_types.h>
include/linux/blkdev.h +1 -1
@@ -13,7 +13,7 @@#include <linux/minmax.h> #include <linux/timer_types.h> #include <linux/workqueue_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/bio.h> #include <linux/gfp_types.h> #include <linux/kdev_t.h>
include/linux/buffer_head.h +1 -1
@@ -13,7 +13,7 @@#include <linux/fs.h> #include <linux/linkage.h> #include <linux/pagemap.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/atomic.h> enum bh_state_bits {
include/linux/ceph/libceph.h +1 -1
@@ -11,7 +11,7 @@#include <linux/fs.h> #include <linux/mempool.h> #include <linux/pagemap.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/writeback.h> #include <linux/slab.h> #include <linux/refcount_types.h>
include/linux/cgroup-defs.h +1 -1
@@ -11,7 +11,7 @@#include <linux/limits.h> #include <linux/list.h> #include <linux/idr.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/mutex_types.h> #include <linux/rcupdate.h> #include <linux/refcount_types.h>
include/linux/console_struct.h +1 -1
@@ -13,7 +13,7 @@#ifndef _LINUX_CONSOLE_STRUCT_H#define _LINUX_CONSOLE_STRUCT_H -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/vt.h> #include <linux/workqueue_types.h>
include/linux/counter.h +1 -1
@@ -13,7 +13,7 @@#include <linux/mutex_types.h> #include <linux/spinlock_types.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <uapi/linux/counter.h> struct counter_device ;
include/linux/dcache.h +1 -1
@@ -13,7 +13,7 @@#include <linux/rcupdate.h> #include <linux/lockref.h> #include <linux/stringhash.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct path ;struct file ;
include/linux/dma-buf.h +1 -1
@@ -21,7 +21,7 @@#include <linux/dma-mapping.h> #include <linux/fs.h> #include <linux/dma-fence.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct device ;struct dma_buf ;
include/linux/eventfd.h +1 -1
@@ -9,7 +9,7 @@#ifndef _LINUX_EVENTFD_H#define _LINUX_EVENTFD_H -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/err.h> #include <linux/percpu-defs.h> #include <linux/percpu.h>
include/linux/gnss.h +1 -1
@@ -14,7 +14,7 @@#include <linux/mutex_types.h> #include <linux/rwsem_types.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct gnss_device ;
include/linux/libps2.h +1 -1
@@ -11,7 +11,7 @@#include <linux/interrupt.h> #include <linux/mutex_types.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct ps2dev ;
include/linux/lp.h +1 -1
@@ -9,7 +9,7 @@#define _LINUX_LP_H -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/mutex_types.h> #include <uapi/linux/lp.h>
include/linux/mempool.h +1 -1
@@ -5,7 +5,7 @@#ifndef _LINUX_MEMPOOL_H#define _LINUX_MEMPOOL_H -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/compiler.h> struct kmem_cache ;
include/linux/mhi.h +1 -1
@@ -12,7 +12,7 @@#include <linux/skbuff.h> #include <linux/slab.h> #include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/workqueue_types.h> #define MHI_MAX_OEM_PK_HASH_SEGMENTS 16
include/linux/mmzone.h +1 -1
@@ -8,7 +8,7 @@#include <linux/spinlock_types.h> #include <linux/list.h> #include <linux/list_nulls.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/bitops.h> #include <linux/cache.h> #include <linux/threads.h>
include/linux/net.h +1 -1
@@ -16,7 +16,7 @@#include <linux/stringify.h> #include <linux/random.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ #include <linux/rcupdate.h> #include <linux/once.h>
include/linux/nfs_fs_sb.h +1 -1
@@ -5,7 +5,7 @@#include <linux/list.h> #include <linux/backing-dev.h> #include <linux/idr.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/nfs_xdr.h> #include <linux/sunrpc/xprt.h>
include/linux/parport.h +1 -1
@@ -10,7 +10,7 @@#include <linux/jiffies.h> #include <linux/proc_fs.h> #include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/irqreturn.h> #include <linux/semaphore.h> #include <linux/device.h>
include/linux/pid.h +1 -1
@@ -7,7 +7,7 @@#include <linux/rcupdate.h> #include <linux/refcount.h> #include <linux/sched.h> -#include <linux/wait.h> +#include <linux/wait_types.h> /* * What is struct pid?
include/linux/pm.h +1 -1
@@ -12,7 +12,7 @@#include <linux/list.h> #include <linux/workqueue_types.h> #include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/hrtimer_types.h> #include <linux/completion.h>
include/linux/poll.h +1 -1
@@ -5,7 +5,7 @@#include <linux/compiler.h> #include <linux/ktime.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/string.h> #include <linux/fs.h> #include <linux/uaccess.h>
include/linux/psi_types.h +1 -1
@@ -5,7 +5,7 @@#include <linux/kthread.h> #include <linux/seqlock_types.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #ifdef CONFIG_PSI
include/linux/relay.h +1 -1
@@ -13,7 +13,7 @@#include <linux/types.h> #include <linux/sched.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/list.h> #include <linux/irq_work.h> #include <linux/bug.h>
include/linux/rtnetlink.h +1 -1
@@ -3,7 +3,7 @@#define __LINUX_RTNETLINK_H#include <linux/netdevice.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/refcount.h> #include <uapi/linux/rtnetlink.h>
include/linux/sbitmap.h +1 -1
@@ -18,7 +18,7 @@#include <linux/percpu.h> #include <linux/slab.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct seq_file ;
include/linux/sunrpc/rpc_pipe_fs.h +1 -1
@@ -4,7 +4,7 @@#include <linux/list.h> #include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> struct rpc_pipe_dir_head {struct list_head pdh_entries;
include/linux/syslog.h +1 -1
@@ -8,7 +8,7 @@#ifndef _LINUX_SYSLOG_H#define _LINUX_SYSLOG_H -#include <linux/wait.h> +#include <linux/wait_types.h> /* Close the log. Currently a NOP. */ #define SYSLOG_ACTION_CLOSE 0
include/linux/wait.h +1 -22
@@ -4,17 +4,12 @@/* * Linux wait queue related types and methods */ -#include <linux/list.h> +#include <linux/wait_types.h> #include <linux/stddef.h> #include <linux/spinlock.h> #include <asm/current.h> -typedef struct wait_queue_entry wait_queue_entry_t ; - -typedef int (*wait_queue_func_t )(struct wait_queue_entry *wq_entry,unsigned mode,int flags,void *key); -int default_wake_function (struct wait_queue_entry *wq_entry,unsigned mode,int flags,void *key); -/* wait_queue_entry::flags */ #define WQ_FLAG_EXCLUSIVE 0x01#define WQ_FLAG_WOKEN 0x02
@@ -22,22 +17,6 @@ int default_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, int#define WQ_FLAG_DONE 0x08#define WQ_FLAG_PRIORITY 0x10 -/* -* A single wait-queue entry structure: -*/ -struct wait_queue_entry { -unsigned int flags; -void *private; -wait_queue_func_t func; -struct list_head entry; -}; - -struct wait_queue_head { -spinlock_t lock; -struct list_head head; -}; -typedef struct wait_queue_head wait_queue_head_t ; -struct task_struct ;/*
include/linux/wait_bit.h +1 -1
@@ -8,7 +8,7 @@#include <linux/bitops.h> #include <linux/init.h> // for __init #include <linux/kernel.h> // for might_sleep() -#include <linux/wait.h> +#include <linux/wait_types.h> struct wait_bit_key {void *flags;
include/linux/wait_types.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_WAIT_TYPES_H +#define _LINUX_WAIT_TYPES_H +/* +* Linux wait queue related types and methods +*/ +#include <linux/list.h> +#include <linux/spinlock_types.h> + +typedef struct wait_queue_entry wait_queue_entry_t ; + +typedef int (*wait_queue_func_t )(struct wait_queue_entry *wq_entry,unsigned mode,int flags,void *key); +int default_wake_function (struct wait_queue_entry *wq_entry,unsigned mode,int flags,void *key); + +/* +* A single wait-queue entry structure: +*/ +struct wait_queue_entry { +unsigned int flags; +void *private; +wait_queue_func_t func; +struct list_head entry; +}; + +struct wait_queue_head { +spinlock_t lock; +struct list_head head; +}; +typedef struct wait_queue_head wait_queue_head_t ; + +#endif /* _LINUX_WAIT_TYPES_H */
include/media/dvb_ringbuffer.h +1 -1
@@ -24,7 +24,7 @@#define _DVB_RINGBUFFER_H_#include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> /** * struct dvb_ringbuffer - Describes a ring buffer used at DVB framework
include/net/smc.h +1 -1
@@ -13,7 +13,7 @@#include <linux/spinlock_types.h> #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include "linux/ism.h" struct device ;
include/net/sock.h +1 -1
@@ -53,7 +53,7 @@#include <linux/memcontrol.h> #include <linux/static_key.h> #include <linux/sched.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/cgroup-defs.h> #include <linux/rbtree_types.h> #include <linux/rculist_nulls.h>
include/scsi/libiscsi.h +1 -1
@@ -11,7 +11,7 @@#define LIBISCSI_H #include <linux/types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/mutex_types.h> #include <linux/timer_types.h> #include <linux/workqueue_types.h>
include/sound/control.h +1 -1
@@ -7,7 +7,7 @@* Copyright (c) by Jaroslav Kysela <[email protected]> */ -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/nospec.h> #include <sound/asound.h>
include/sound/rawmidi.h +1 -1
@@ -10,7 +10,7 @@#include <sound/asound.h> #include <linux/interrupt.h> #include <linux/spinlock_types.h> -#include <linux/wait.h> +#include <linux/wait_types.h> #include <linux/mutex_types.h> #include <linux/workqueue_types.h> #include <linux/device.h>
Signature · 1 line
2.39.2
PATCH 14/28 swait.h: move declarations to swait_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/swait.h | 13 +------------ include/linux/swait_types.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 include/linux/swait_types.h
include/linux/swait.h +1 -12
@@ -2,6 +2,7 @@#ifndef _LINUX_SWAIT_H#define _LINUX_SWAIT_H +#include <linux/swait_types.h> #include <linux/list.h> #include <linux/stddef.h> #include <linux/spinlock_types.h>
@@ -37,18 +38,6 @@* wait queues in most cases. */ -struct task_struct ; - -struct swait_queue_head { -raw_spinlock_t lock; -struct list_head task_list; -}; - -struct swait_queue { -struct task_struct *task; -struct list_head task_list; -}; -#define __SWAITQUEUE_INITIALIZER (name) { \ .task = current, \ .task_list = LIST_HEAD_INIT((name).task_list), \
include/linux/swait_types.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SWAIT_TYPES_H +#define _LINUX_SWAIT_TYPES_H + +#include <linux/list.h> +#include <linux/spinlock_types.h> + +struct task_struct ; + +struct swait_queue_head { +raw_spinlock_t lock; +struct list_head task_list; +}; + +struct swait_queue { +struct task_struct *task; +struct list_head task_list; +}; + +#endif /* _LINUX_SWAIT_TYPES_H */
Signature · 1 line
2.39.2
PATCH 15/28 completion.h: move declarations to completion_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- drivers/target/target_core_xcopy.c | 1 + include/drm/drm_audio_component.h | 2 +- include/drm/gpu_scheduler.h | 2 +- include/linux/ceph/osd_client.h | 2 +- include/linux/completion.h | 18 +---------------- include/linux/completion_types.h | 31 ++++++++++++++++++++++++++++++ include/linux/cpufreq.h | 2 +- include/linux/edac.h | 2 +- include/linux/firewire.h | 2 +- include/linux/greybus/operation.h | 2 +- include/linux/hw_random.h | 2 +- include/linux/hyperv.h | 2 +- include/linux/livepatch.h | 2 +- include/linux/mailbox_controller.h | 2 +- include/linux/mfd/cs42l43.h | 2 +- include/linux/mfd/da9052/da9052.h | 2 +- include/linux/mfd/wm8350/core.h | 2 +- include/linux/mlx4/device.h | 2 +- include/linux/mlx5/cq.h | 1 + include/linux/mlx5/driver.h | 2 +- include/linux/mmc/core.h | 2 +- include/linux/mtd/onenand.h | 2 +- include/linux/mtd/sh_flctl.h | 2 +- include/linux/ntb.h | 2 +- include/linux/pm.h | 2 +- include/linux/rcupdate_wait.h | 2 +- include/linux/sched/signal.h | 1 + include/linux/soc/qcom/qmi.h | 2 +- include/linux/spi/spi.h | 2 +- include/linux/srcutree.h | 2 +- include/linux/usb.h | 2 +- include/net/inet_frag.h | 2 +- include/rdma/ib_sa.h | 2 +- include/rdma/restrack.h | 2 +- include/target/target_core_base.h | 2 +- include/xen/xenbus.h | 2 +- 36 files changed, 66 insertions(+), 48 deletions(-) create mode 100644 include/linux/completion_types.h
drivers/target/target_core_xcopy.c +1 -0
@@ -16,6 +16,7 @@#include <linux/spinlock.h> #include <linux/list.h> #include <linux/rculist.h> +#include <linux/completion.h> #include <linux/configfs.h> #include <linux/ratelimit.h> #include <scsi/scsi_proto.h>
include/drm/drm_audio_component.h +1 -1
@@ -4,7 +4,7 @@#ifndef _DRM_AUDIO_COMPONENT_H_#define _DRM_AUDIO_COMPONENT_H_ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/types.h> struct drm_audio_component ;
include/drm/gpu_scheduler.h +1 -1
@@ -26,7 +26,7 @@#include <drm/spsc_queue.h> #include <linux/dma-fence.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/xarray.h> #include <linux/wait_types.h> #include <linux/workqueue_types.h>
include/linux/ceph/osd_client.h +1 -1
@@ -3,7 +3,7 @@#define _FS_CEPH_OSD_CLIENT_H#include <linux/bitrev.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/kref_types.h> #include <linux/mempool.h> #include <linux/rbtree_types.h>
include/linux/completion.h +1 -17
@@ -9,25 +9,9 @@* See kernel/sched/completion.c for details. */ +#include <linux/completion_types.h> #include <linux/swait.h> -/* -* struct completion - structure used to maintain state for a "completion" -* -* This is the opaque structure used to maintain the state for a "completion". -* Completions currently use a FIFO to queue threads that have to wait for -* the "completion" event. -* -* See also: complete(), wait_for_completion() (and friends _timeout, -* _interruptible, _interruptible_timeout, and _killable), init_completion(), -* reinit_completion(), and macros DECLARE_COMPLETION(), -* DECLARE_COMPLETION_ONSTACK(). -*/ -struct completion { -unsigned int done; -struct swait_queue_head wait; -}; -#define init_completion_map (x, m) init_completion(x)static inline void complete_acquire (struct completion *x) {}static inline void complete_release (struct completion *x) {}
include/linux/completion_types.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_COMPLETION_TYPES_H +#define __LINUX_COMPLETION_TYPES_H + +/* +* (C) Copyright 2001 Linus Torvalds +* +* Atomic wait-for-completion handler data structures. +* See kernel/sched/completion.c for details. +*/ + +#include <linux/swait_types.h> + +/* +* struct completion - structure used to maintain state for a "completion" +* +* This is the opaque structure used to maintain the state for a "completion". +* Completions currently use a FIFO to queue threads that have to wait for +* the "completion" event. +* +* See also: complete(), wait_for_completion() (and friends _timeout, +* _interruptible, _interruptible_timeout, and _killable), init_completion(), +* reinit_completion(), and macros DECLARE_COMPLETION(), +* DECLARE_COMPLETION_ONSTACK(). +*/ +struct completion { +unsigned int done; +struct swait_queue_head wait; +}; + +#endif
include/linux/cpufreq.h +1 -1
@@ -11,7 +11,7 @@#include <linux/clk.h> #include <linux/cpu.h> #include <linux/cpumask.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/kobject_types.h> #include <linux/notifier.h> #include <linux/of.h>
include/linux/edac.h +1 -1
@@ -14,7 +14,7 @@#include <linux/atomic.h> #include <linux/device.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/workqueue_types.h> #include <linux/debugfs.h> #include <linux/numa.h>
include/linux/firewire.h +1 -1
@@ -2,7 +2,7 @@#ifndef _LINUX_FIREWIRE_H#define _LINUX_FIREWIRE_H -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/kernel.h>
include/linux/greybus/operation.h +1 -1
@@ -9,7 +9,7 @@#ifndef __OPERATION_H#define __OPERATION_H -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/kref_types.h> #include <linux/timer_types.h> #include <linux/types.h>
include/linux/hw_random.h +1 -1
@@ -12,7 +12,7 @@#ifndef LINUX_HWRANDOM_H_ #define LINUX_HWRANDOM_H_ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/types.h> #include <linux/list.h> #include <linux/kref_types.h>
include/linux/hyperv.h +1 -1
@@ -18,7 +18,7 @@#include <linux/types.h> #include <linux/scatterlist.h> #include <linux/list.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/device.h> #include <linux/mod_devicetable.h> #include <linux/interrupt.h>
include/linux/livepatch.h +1 -1
@@ -11,7 +11,7 @@#include <linux/module.h> #include <linux/ftrace.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/list.h> #include <linux/livepatch_sched.h>
include/linux/mailbox_controller.h +1 -1
@@ -6,7 +6,7 @@#include <linux/of.h> #include <linux/types.h> #include <linux/hrtimer_types.h> -#include <linux/completion.h> +#include <linux/completion_types.h> struct device ;struct mbox_chan ;
include/linux/mfd/cs42l43.h +1 -1
@@ -6,7 +6,7 @@* Cirrus Logic International Semiconductor Ltd. */ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/device.h> #include <linux/gpio/consumer.h> #include <linux/mutex_types.h>
include/linux/mfd/da9052/da9052.h +1 -1
@@ -13,7 +13,7 @@#include <linux/interrupt.h> #include <linux/regmap.h> #include <linux/slab.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/list.h> #include <linux/mfd/core.h>
include/linux/mfd/wm8350/core.h +1 -1
@@ -11,7 +11,7 @@#include <linux/kernel.h> #include <linux/mutex_types.h> #include <linux/interrupt.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/regmap.h> #include <linux/mfd/wm8350/audio.h>
include/linux/mlx4/device.h +1 -1
@@ -36,7 +36,7 @@#include <linux/auxiliary_bus.h> #include <linux/if_ether.h> #include <linux/pci.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/radix-tree.h> #include <linux/cpu_rmap.h> #include <linux/crash_dump.h>
include/linux/mlx5/cq.h +1 -0
@@ -35,6 +35,7 @@#include <linux/mlx5/driver.h> #include <linux/refcount.h> +#include <linux/completion.h> struct mlx5_core_cq {u32 cqn;
include/linux/mlx5/driver.h +1 -1
@@ -34,7 +34,7 @@#define MLX5_DRIVER_H #include <linux/kernel.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/pci.h> #include <linux/irq.h> #include <linux/spinlock_types.h>
include/linux/mmc/core.h +1 -1
@@ -5,7 +5,7 @@#ifndef LINUX_MMC_CORE_H #define LINUX_MMC_CORE_H -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/types.h> struct mmc_data ;
include/linux/mtd/onenand.h +1 -1
@@ -10,7 +10,7 @@#define __LINUX_MTD_ONENAND_H#include <linux/spinlock_types.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/mtd/flashchip.h> #include <linux/mtd/onenand_regs.h> #include <linux/mtd/bbm.h>
include/linux/mtd/sh_flctl.h +1 -1
@@ -8,7 +8,7 @@#ifndef __SH_FLCTL_H__#define __SH_FLCTL_H__ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h>
include/linux/ntb.h +1 -1
@@ -56,7 +56,7 @@#ifndef _NTB_H_#define _NTB_H_ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/device.h> #include <linux/interrupt.h>
include/linux/pm.h +1 -1
@@ -14,7 +14,7 @@#include <linux/spinlock_types.h> #include <linux/wait_types.h> #include <linux/hrtimer_types.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #ifdef CONFIG_PM_CLK #include <linux/mutex_types.h>
include/linux/rcupdate_wait.h +1 -1
@@ -7,7 +7,7 @@*/ #include <linux/rcupdate.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/sched.h> /*
include/linux/sched/signal.h +1 -0
@@ -8,6 +8,7 @@#include <linux/sched.h> #include <linux/sched/jobctl.h> #include <linux/sched/task.h> +#include <linux/completion_types.h> #include <linux/cred.h> #include <linux/refcount.h> #include <linux/pid.h>
include/linux/soc/qcom/qmi.h +1 -1
@@ -6,7 +6,7 @@#ifndef __QMI_HELPERS_H__#define __QMI_HELPERS_H__ -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/idr.h> #include <linux/list.h> #include <linux/qrtr.h>
include/linux/spi/spi.h +1 -1
@@ -8,7 +8,7 @@#include <linux/acpi.h> #include <linux/bits.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/device.h> #include <linux/gpio/consumer.h> #include <linux/kthread.h>
include/linux/srcutree.h +1 -1
@@ -12,7 +12,7 @@#define _LINUX_SRCU_TREE_H#include <linux/rcu_node_tree.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/mutex_types.h> #include <linux/workqueue.h>
include/linux/usb.h +1 -1
@@ -18,7 +18,7 @@#include <linux/kref_types.h> /* for struct kref */ #include <linux/device.h> /* for struct device */ #include <linux/fs.h> /* for struct file_operations */ -#include <linux/completion.h> /* for struct completion */ +#include <linux/completion_types.h> /* for struct completion */ #include <linux/sched.h> /* for current && schedule_timeout */ #include <linux/mutex_types.h> /* for struct mutex */ #include <linux/pm_runtime.h> /* for runtime PM */
include/net/inet_frag.h +1 -1
@@ -3,7 +3,7 @@#define __NET_FRAG_H__#include <linux/rhashtable-types.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/in6.h> #include <linux/rbtree_types.h> #include <linux/refcount.h>
include/rdma/ib_sa.h +1 -1
@@ -8,7 +8,7 @@#ifndef IB_SA_H #define IB_SA_H -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/compiler.h> #include <linux/atomic.h>
include/rdma/restrack.h +1 -1
@@ -9,7 +9,7 @@#include <linux/typecheck.h> #include <linux/sched.h> #include <linux/kref_types.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/sched/task.h> #include <uapi/rdma/rdma_netlink.h>
include/target/target_core_base.h +1 -1
@@ -7,7 +7,7 @@#include <linux/sbitmap.h> #include <linux/percpu-refcount.h> #include <linux/semaphore.h> /* struct semaphore */ -#include <linux/completion.h> +#include <linux/completion_types.h> #define TARGET_CORE_VERSION "v5.0"
include/xen/xenbus.h +1 -1
@@ -38,7 +38,7 @@#include <linux/notifier.h> #include <linux/export.h> #include <linux/fs.h> -#include <linux/completion.h> +#include <linux/completion_types.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/semaphore.h>
Signature · 1 line
2.39.2
PATCH 16/28 device.h: move declarations to device_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- block/disk-events.c | 1 + block/early-lookup.c | 1 + block/partitions/core.c | 1 + drivers/counter/counter-chrdev.c | 1 + drivers/cxl/cxl.h | 1 + drivers/devfreq/devfreq-event.c | 1 + drivers/extcon/extcon.h | 2 +- drivers/gpu/drm/mcde/mcde_clk_div.c | 1 + .../gpu/drm/renesas/rcar-du/rcar_du_encoder.c | 1 + .../drm/renesas/rcar-du/rcar_du_writeback.c | 2 + drivers/gpu/drm/sun4i/sun4i_layer.c | 2 + drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c | 1 + drivers/gpu/drm/tidss/tidss_encoder.c | 1 + drivers/gpu/drm/tidss/tidss_plane.c | 1 + include/linux/acpi.h | 2 +- include/linux/backlight.h | 2 +- include/linux/blk_types.h | 2 +- include/linux/blkdev.h | 2 +- include/linux/container.h | 2 +- include/linux/coresight.h | 2 +- include/linux/counter.h | 2 +- include/linux/devfreq-event.h | 2 +- include/linux/devfreq.h | 2 +- include/linux/device.h | 466 +--------------- include/linux/device_types.h | 500 ++++++++++++++++++ include/linux/dmaengine.h | 2 +- include/linux/edac.h | 2 +- include/linux/enclosure.h | 2 +- include/linux/fpga/fpga-bridge.h | 2 +- include/linux/fpga/fpga-region.h | 2 +- include/linux/framer/framer.h | 2 +- include/linux/hdmi.h | 2 +- include/linux/hwmon-sysfs.h | 2 +- include/linux/iio/iio.h | 2 +- include/linux/lcd.h | 2 +- include/linux/node.h | 2 +- include/linux/pm_clock.h | 2 +- include/linux/pm_domain.h | 2 +- include/linux/pm_qos.h | 2 +- include/linux/power_supply.h | 2 +- include/linux/powercap.h | 2 +- include/linux/rtc.h | 2 +- include/linux/swiotlb.h | 3 +- include/linux/thermal.h | 2 +- include/linux/w1.h | 2 +- include/media/cec.h | 2 +- include/media/media-devnode.h | 2 +- include/net/nfc/nfc.h | 2 +- include/pcmcia/ss.h | 2 +- include/scsi/scsi_device.h | 1 + kernel/trace/blktrace.c | 1 + 51 files changed, 552 insertions(+), 500 deletions(-) create mode 100644 include/linux/device_types.h
block/disk-events.c +1 -0
@@ -5,6 +5,7 @@#include <linux/export.h> #include <linux/moduleparam.h> #include <linux/blkdev.h> +#include <linux/device.h> #include <linux/kobject.h> #include "blk.h"
block/early-lookup.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/blkdev.h> #include <linux/ctype.h> +#include <linux/device.h> struct uuidcmp {const char *uuid;
block/partitions/core.c +1 -0
@@ -9,6 +9,7 @@#include <linux/major.h> #include <linux/slab.h> #include <linux/ctype.h> +#include <linux/device.h> #include <linux/vmalloc.h> #include <linux/raid/detect.h> #include "check.h"
drivers/counter/counter-chrdev.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/cdev.h> #include <linux/counter.h> +#include <linux/device.h> #include <linux/err.h> #include <linux/errno.h> #include <linux/export.h>
drivers/cxl/cxl.h +1 -0
@@ -7,6 +7,7 @@#include <linux/libnvdimm.h> #include <linux/bitfield.h> #include <linux/bitops.h> +#include <linux/device_types.h> #include <linux/device/driver.h> #include <linux/log2.h> #include <linux/node.h>
drivers/devfreq/devfreq-event.c +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/devfreq-event.h> +#include <linux/device.h> #include <linux/kernel.h> #include <linux/err.h> #include <linux/init.h>
drivers/extcon/extcon.h +1 -1
@@ -2,7 +2,7 @@#ifndef __LINUX_EXTCON_INTERNAL_H__#define __LINUX_EXTCON_INTERNAL_H__ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/extcon-provider.h> /**
drivers/gpu/drm/mcde/mcde_clk_div.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/clk-provider.h> +#include <linux/device.h> // for devm_kzalloc() #include <linux/io.h> #include <linux/regulator/consumer.h>
drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c +1 -0
@@ -7,6 +7,7 @@* Contact: Laurent Pinchart ([email protected]) */ +#include <linux/device.h> // for dev_dbg() #include <linux/export.h> #include <linux/of.h>
drivers/gpu/drm/renesas/rcar-du/rcar_du_writeback.c +2 -0
@@ -13,6 +13,8 @@#include <drm/drm_probe_helper.h> #include <drm/drm_writeback.h> +#include <linux/device.h> // for dev_dbg() +#include "rcar_du_crtc.h" #include "rcar_du_drv.h" #include "rcar_du_kms.h"
drivers/gpu/drm/sun4i/sun4i_layer.c +2 -0
@@ -11,6 +11,8 @@#include <drm/drm_blend.h> #include <drm/drm_gem_atomic_helper.h> +#include <linux/device.h> // for devm_kzalloc() +#include "sun4i_backend.h" #include "sun4i_frontend.h" #include "sun4i_layer.h"
drivers/gpu/drm/sun4i/sun4i_tcon_dclk.c +1 -0
@@ -7,6 +7,7 @@*/ #include <linux/clk-provider.h> +#include <linux/device.h> // for devm_kzalloc() #include <linux/regmap.h> #include "sun4i_tcon.h"
drivers/gpu/drm/tidss/tidss_encoder.c +1 -0
@@ -4,6 +4,7 @@* Author: Tomi Valkeinen <[email protected]> */ +#include <linux/device.h> // for dev_dbg() #include <linux/export.h> #include <drm/drm_atomic_helper.h>
drivers/gpu/drm/tidss/tidss_plane.c +1 -0
@@ -11,6 +11,7 @@#include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> #include <drm/drm_gem_atomic_helper.h> +#include <linux/device.h> // for dev_dbg() #include "tidss_crtc.h" #include "tidss_dispc.h"
include/linux/acpi.h +1 -1
@@ -11,7 +11,7 @@#include <linux/errno.h> #include <linux/ioport.h> /* for struct resource */ #include <linux/resource_ext.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/mod_devicetable.h> #include <linux/property.h> #include <linux/uuid.h>
include/linux/backlight.h +1 -1
@@ -9,7 +9,7 @@#ifndef _LINUX_BACKLIGHT_H#define _LINUX_BACKLIGHT_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/fb.h> #include <linux/mutex.h> #include <linux/notifier.h>
include/linux/blk_types.h +1 -1
@@ -8,7 +8,7 @@#include <linux/types.h> #include <linux/bvec_types.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/ktime.h> struct bio_set ;
include/linux/blkdev.h +1 -1
@@ -8,7 +8,7 @@#include <linux/types.h> #include <linux/fs.h> // for inode_unhashed() #include <linux/blk_types.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/list.h> #include <linux/minmax.h> #include <linux/timer_types.h>
include/linux/container.h +1 -1
@@ -9,7 +9,7 @@#ifndef _LINUX_CONTAINER_H#define _LINUX_CONTAINER_H -#include <linux/device.h> +#include <linux/device_types.h> /* drivers/base/power/container.c */ extern const struct bus_type container_subsys;
include/linux/coresight.h +1 -1
@@ -8,7 +8,7 @@#include <linux/amba/bus.h> #include <linux/clk.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/io.h> #include <linux/perf_event.h> #include <linux/sched.h>
include/linux/counter.h +1 -1
@@ -7,7 +7,7 @@#define _COUNTER_H_#include <linux/cdev.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/kernel.h> #include <linux/kfifo.h> #include <linux/mutex_types.h>
include/linux/devfreq-event.h +1 -1
@@ -9,7 +9,7 @@#ifndef __LINUX_DEVFREQ_EVENT_H__#define __LINUX_DEVFREQ_EVENT_H__ -#include <linux/device.h> +#include <linux/device_types.h> /** * struct devfreq_event_dev - the devfreq-event device
include/linux/devfreq.h +1 -1
@@ -10,7 +10,7 @@#ifndef __LINUX_DEVFREQ_H__#define __LINUX_DEVFREQ_H__ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/notifier.h> #include <linux/pm_opp.h> #include <linux/pm_qos.h>
include/linux/device.h +1 -465
508 lines not on this page · raw message
include/linux/device_types.h new file +500 -0
500 lines not on this page · raw message
include/linux/dmaengine.h +1 -1
@@ -5,7 +5,7 @@#ifndef LINUX_DMAENGINE_H #define LINUX_DMAENGINE_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/err.h> #include <linux/idr.h> // for struct ida #include <linux/uio.h>
include/linux/edac.h +1 -1
@@ -13,7 +13,7 @@#define _LINUX_EDAC_H_#include <linux/atomic.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/completion_types.h> #include <linux/workqueue_types.h> #include <linux/debugfs.h>
include/linux/enclosure.h +1 -1
@@ -12,7 +12,7 @@#ifndef _LINUX_ENCLOSURE_H_#define _LINUX_ENCLOSURE_H_ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/list.h> /* A few generic types ... taken from ses-2 */
include/linux/fpga/fpga-bridge.h +1 -1
@@ -3,7 +3,7 @@#ifndef _LINUX_FPGA_BRIDGE_H#define _LINUX_FPGA_BRIDGE_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/fpga/fpga-mgr.h> struct fpga_bridge ;
include/linux/fpga/fpga-region.h +1 -1
@@ -3,7 +3,7 @@#ifndef _FPGA_REGION_H#define _FPGA_REGION_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/fpga/fpga-mgr.h> #include <linux/fpga/fpga-bridge.h>
include/linux/framer/framer.h +1 -1
@@ -14,7 +14,7 @@#include <linux/mutex_types.h> #include <linux/notifier.h> #include <linux/of.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/workqueue_types.h> /**
include/linux/hdmi.h +1 -1
@@ -25,7 +25,7 @@#define __LINUX_HDMI_H_#include <linux/types.h> -#include <linux/device.h> +#include <linux/device_types.h> enum hdmi_packet_type {HDMI_PACKET_TYPE_NULL =0x00 ,
include/linux/hwmon-sysfs.h +1 -1
@@ -7,7 +7,7 @@#ifndef _LINUX_HWMON_SYSFS_H#define _LINUX_HWMON_SYSFS_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/kstrtox.h> struct sensor_device_attribute{
include/linux/iio/iio.h +1 -1
@@ -7,7 +7,7 @@#ifndef _INDUSTRIAL_IO_H_#define _INDUSTRIAL_IO_H_ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/cdev.h> #include <linux/device.h> #include <linux/slab.h>
include/linux/lcd.h +1 -1
@@ -9,7 +9,7 @@#ifndef _LINUX_LCD_H#define _LINUX_LCD_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/mutex.h> #include <linux/notifier.h> #include <linux/fb.h>
include/linux/node.h +1 -1
@@ -15,7 +15,7 @@#ifndef _LINUX_NODE_H_#define _LINUX_NODE_H_ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/cpumask.h> #include <linux/list.h> #include <linux/mmzone.h> // for enum meminit_context
include/linux/pm_clock.h +1 -1
@@ -8,7 +8,7 @@#ifndef _LINUX_PM_CLOCK_H#define _LINUX_PM_CLOCK_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/notifier.h> struct pm_clk_notifier_block {
include/linux/pm_domain.h +1 -1
@@ -8,7 +8,7 @@#ifndef _LINUX_PM_DOMAIN_H#define _LINUX_PM_DOMAIN_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/ktime.h> #include <linux/mutex_types.h> #include <linux/pm.h>
include/linux/pm_qos.h +1 -1
@@ -14,7 +14,7 @@#include <linux/plist.h> #include <linux/notifier.h> -#include <linux/device.h> +#include <linux/device_types.h> enum pm_qos_flags_status {PM_QOS_FLAGS_UNDEFINED =-1 ,
include/linux/power_supply.h +1 -1
@@ -12,7 +12,7 @@#ifndef __LINUX_POWER_SUPPLY_H__#define __LINUX_POWER_SUPPLY_H__ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/workqueue_types.h> #include <linux/leds.h> #include <linux/spinlock_types.h>
include/linux/powercap.h +1 -1
@@ -7,7 +7,7 @@#ifndef __POWERCAP_H__#define __POWERCAP_H__ -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/idr.h> /*
include/linux/rtc.h +1 -1
@@ -34,7 +34,7 @@ static inline time64_t rtc_tm_sub(struct rtc_time *lhs, struct rtc_time *rhs)return rtc_tm_to_time64 (lhs) -rtc_tm_to_time64 (rhs); } -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/seq_file.h> #include <linux/cdev.h> #include <linux/poll.h>
include/linux/swiotlb.h +1 -2
@@ -2,7 +2,7 @@#ifndef __LINUX_SWIOTLB_H#define __LINUX_SWIOTLB_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/dma-direction.h> #include <linux/init.h> #include <linux/types.h>
@@ -10,7 +10,6 @@#include <linux/spinlock_types.h> #include <linux/workqueue_types.h> -struct device ;struct page ;struct scatterlist ;
include/linux/thermal.h +1 -1
@@ -12,7 +12,7 @@#include <linux/of.h> #include <linux/idr.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/sysfs_types.h> #include <linux/workqueue_types.h> #include <uapi/linux/thermal.h>
include/linux/w1.h +1 -1
@@ -6,7 +6,7 @@#ifndef __LINUX_W1_H#define __LINUX_W1_H -#include <linux/device.h> +#include <linux/device_types.h> /** * struct w1_reg_num - broken out slave device id
include/media/cec.h +1 -1
@@ -11,7 +11,7 @@#include <linux/poll.h> #include <linux/fs.h> #include <linux/debugfs.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/cdev.h> #include <linux/kthread.h> #include <linux/cec-funcs.h>
include/media/media-devnode.h +1 -1
@@ -18,7 +18,7 @@#include <linux/poll.h> #include <linux/fs.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/cdev.h> struct media_device ;
include/net/nfc/nfc.h +1 -1
@@ -12,7 +12,7 @@#define __NET_NFC_H#include <linux/nfc.h> -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/skbuff.h> #define nfc_dbg (dev, fmt, ...) dev_dbg((dev), "NFC: " fmt, ##__VA_ARGS__)
include/pcmcia/ss.h +1 -1
@@ -12,7 +12,7 @@#ifndef _LINUX_SS_H#define _LINUX_SS_H -#include <linux/device.h> +#include <linux/device_types.h> #include <linux/sched.h> /* task_struct, completion */ #include <linux/mutex_types.h>
include/scsi/scsi_device.h +1 -0
@@ -2,6 +2,7 @@#ifndef _SCSI_SCSI_DEVICE_H#define _SCSI_SCSI_DEVICE_H +#include <linux/device.h> // for device_reprobe() #include <linux/list.h> #include <linux/spinlock_types.h> #include <linux/workqueue_types.h>
kernel/trace/blktrace.c +1 -0
@@ -14,6 +14,7 @@#include <linux/mutex.h> #include <linux/slab.h> #include <linux/debugfs.h> +#include <linux/device.h> #include <linux/export.h> #include <linux/time.h> #include <linux/uaccess.h>
Signature · 1 line
2.39.2
kernel test robot
build botRe: [PATCH 16/28] device.h: move declarations to device_types.h
kernel test robot noticed the following build warnings:
Hi Max,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20240131]
[cannot apply to mkp-scsi/for-next jejb-scsi/for-next axboe-block/for-next linus/master v6.8-rc2 v6.8-rc1 v6.7 v6.8-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Max-Kellermann/include-add-missing-includes/20240131-231042 base: next-20240131 patch link: https://lore.kernel.org/r/20240131145008.1345531-17-max.kellermann%40ionos.com patch subject: [PATCH 16/28] device.h: move declarations to device_types.h config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240203/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
| ^~~~~
mm/slub.c:6327:14: error: 'slabs' undeclared here (not in a function); did you mean 'slab'?
6327 | SLAB_ATTR_RO(slabs);
| ^~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6333:14: error: 'total_objects' undeclared here (not in a function); did you mean 'oo_objects'?
6333 | SLAB_ATTR_RO(total_objects);
| ^~~~~~~~~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6339:14: error: 'objects' undeclared here (not in a function); did you mean 'kobject'?
6339 | SLAB_ATTR_RO(objects);
| ^~~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6345:14: error: 'sanity_checks' undeclared here (not in a function); did you mean 'sanity_checks_attr'?
6345 | SLAB_ATTR_RO(sanity_checks);
| ^~~~~~~~~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6132:53: error: invalid initializer
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~~~~~~~~~~
mm/slub.c:6351:1: note: in expansion of macro 'SLAB_ATTR_RO'
6351 | SLAB_ATTR_RO(trace);
| ^~~~~~~~~~~~
mm/slub.c:6358:14: error: 'red_zone' undeclared here (not in a function)
6358 | SLAB_ATTR_RO(red_zone);
| ^~~~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6365:14: error: 'poison' undeclared here (not in a function)
6365 | SLAB_ATTR_RO(poison);
| ^~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6372:14: error: 'store_user' undeclared here (not in a function); did you mean 'pte_user'?
6372 | SLAB_ATTR_RO(store_user);
| ^~~~~~~~~~
mm/slub.c:6132:68: note: in definition of macro 'SLAB_ATTR_RO'
6132 | static struct slab_attribute _name##_attr = __ATTR_RO_MODE(_name, 0400)
| ^~~~~
mm/slub.c:6391:11: error: 'validate' undeclared here (not in a function); did you mean 'key_validate'?
6391 | SLAB_ATTR(validate);
| ^~~~~~~~
mm/slub.c:6135:68: note: in definition of macro 'SLAB_ATTR'
6135 | static struct slab_attribute _name##_attr = __ATTR_RW_MODE(_name, 0600)
| ^~~~~
mm/slub.c:6431:11: error: 'shrink' undeclared here (not in a function); did you mean 'shrinker'?
6431 | SLAB_ATTR(shrink);
| ^~~~~~
mm/slub.c:6135:68: note: in definition of macro 'SLAB_ATTR'
6135 | static struct slab_attribute _name##_attr = __ATTR_RW_MODE(_name, 0600)
| ^~~~~
mm/slub.c:6455:11: error: 'remote_node_defrag_ratio' undeclared here (not in a function); did you mean 'remote_node_defrag_ratio_attr'?
6455 | SLAB_ATTR(remote_node_defrag_ratio);
| ^~~~~~~~~~~~~~~~~~~~~~~~
mm/slub.c:6135:68: note: in definition of macro 'SLAB_ATTR'
6135 | static struct slab_attribute _name##_attr = __ATTR_RW_MODE(_name, 0600)
| ^~~~~
mm/slub.c:6682:21: error: variable 'slab_sysfs_ops' has initializer but incomplete type
6682 | static const struct sysfs_ops slab_sysfs_ops = {
| ^~~~~~~~~
mm/slub.c:6683:10: error: 'const struct sysfs_ops' has no member named 'show'
6683 | .show = slab_attr_show,
| ^~~~
mm/slub.c:6683:17: warning: excess elements in struct initializer
6683 | .show = slab_attr_show,
| ^~~~~~~~~~~~~~
mm/slub.c:6683:17: note: (near initialization for 'slab_sysfs_ops')
mm/slub.c:6684:10: error: 'const struct sysfs_ops' has no member named 'store'
6684 | .store = slab_attr_store,
| ^~~~~
mm/slub.c:6684:18: warning: excess elements in struct initializer
6684 | .store = slab_attr_store,
| ^~~~~~~~~~~~~~~
mm/slub.c:6684:18: note: (near initialization for 'slab_sysfs_ops')
mm/slub.c: In function 'sysfs_slab_add':
mm/slub.c:6760:17: error: implicit declaration of function 'sysfs_remove_link' [-Werror=implicit-function-declaration]
6760 | sysfs_remove_link(&slab_kset->kobj, s->name);
| ^~~~~~~~~~~~~~~~~
mm/slub.c:6777:15: error: implicit declaration of function 'sysfs_create_group' [-Werror=implicit-function-declaration]
6777 | err = sysfs_create_group(&s->kobj, &slab_attr_group);
| ^~~~~~~~~~~~~~~~~~
mm/slub.c: In function 'sysfs_slab_alias':
mm/slub.c:6827:24: error: implicit declaration of function 'sysfs_create_link'; did you mean 'kernfs_create_link'? [-Werror=implicit-function-declaration]
6827 | return sysfs_create_link(&slab_kset->kobj, &s->kobj, name);
| ^~~~~~~~~~~~~~~~~
| kernfs_create_link
mm/slub.c: At top level:
mm/slub.c:6682:31: error: storage size of 'slab_sysfs_ops' isn't known
6682 | static const struct sysfs_ops slab_sysfs_ops = {
| ^~~~~~~~~~~~~~
>> mm/slub.c:6439:16: warning: 'remote_node_defrag_ratio_store' defined but not used [-Wunused-function]
6439 | static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/slub.c:6434:16: warning: 'remote_node_defrag_ratio_show' defined but not used [-Wunused-function] 6434 | static ssize_t remote_node_defrag_ratio_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/slub.c:6422:16: warning: 'shrink_store' defined but not used [-Wunused-function]
6422 | static ssize_t shrink_store(struct kmem_cache *s,
| ^~~~~~~~~~~~
mm/slub.c:6417:16: warning: 'shrink_show' defined but not used [-Wunused-function]
6417 | static ssize_t shrink_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~
mm/slub.c:6379:16: warning: 'validate_store' defined but not used [-Wunused-function]
6379 | static ssize_t validate_store(struct kmem_cache *s,
| ^~~~~~~~~~~~~~
mm/slub.c:6374:16: warning: 'validate_show' defined but not used [-Wunused-function]
6374 | static ssize_t validate_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~
mm/slub.c:6367:16: warning: 'store_user_show' defined but not used [-Wunused-function]
6367 | static ssize_t store_user_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~
mm/slub.c:6360:16: warning: 'poison_show' defined but not used [-Wunused-function]
6360 | static ssize_t poison_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~
mm/slub.c:6353:16: warning: 'red_zone_show' defined but not used [-Wunused-function]
6353 | static ssize_t red_zone_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~
mm/slub.c:6347:16: warning: 'trace_show' defined but not used [-Wunused-function]
6347 | static ssize_t trace_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~
mm/slub.c:6341:16: warning: 'sanity_checks_show' defined but not used [-Wunused-function]
6341 | static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~
mm/slub.c:6335:16: warning: 'objects_show' defined but not used [-Wunused-function]
6335 | static ssize_t objects_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~
mm/slub.c:6329:16: warning: 'total_objects_show' defined but not used [-Wunused-function]
6329 | static ssize_t total_objects_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~
mm/slub.c:6323:16: warning: 'slabs_show' defined but not used [-Wunused-function]
6323 | static ssize_t slabs_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~
mm/slub.c:6316:16: warning: 'destroy_by_rcu_show' defined but not used [-Wunused-function]
6316 | static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~~
mm/slub.c:6301:16: warning: 'cache_dma_show' defined but not used [-Wunused-function]
6301 | static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~
mm/slub.c:6294:16: warning: 'hwcache_align_show' defined but not used [-Wunused-function]
6294 | static ssize_t hwcache_align_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~
mm/slub.c:6288:16: warning: 'reclaim_account_show' defined but not used [-Wunused-function]
6288 | static ssize_t reclaim_account_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~~~
mm/slub.c:6247:16: warning: 'slabs_cpu_partial_show' defined but not used [-Wunused-function]
6247 | static ssize_t slabs_cpu_partial_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~~
mm/slub.c:6241:16: warning: 'objects_partial_show' defined but not used [-Wunused-function]
6241 | static ssize_t objects_partial_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~~~
mm/slub.c:6235:16: warning: 'cpu_slabs_show' defined but not used [-Wunused-function]
6235 | static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~
mm/slub.c:6229:16: warning: 'partial_show' defined but not used [-Wunused-function]
6229 | static ssize_t partial_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~
mm/slub.c:6223:16: warning: 'aliases_show' defined but not used [-Wunused-function]
6223 | static ssize_t aliases_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~
mm/slub.c:6215:16: warning: 'ctor_show' defined but not used [-Wunused-function]
6215 | static ssize_t ctor_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~
mm/slub.c:6197:16: warning: 'cpu_partial_store' defined but not used [-Wunused-function]
6197 | static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf,
| ^~~~~~~~~~~~~~~~~
mm/slub.c:6187:16: warning: 'cpu_partial_show' defined but not used [-Wunused-function]
6187 | static ssize_t cpu_partial_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~
mm/slub.c:6172:16: warning: 'min_partial_store' defined but not used [-Wunused-function]
6172 | static ssize_t min_partial_store(struct kmem_cache *s, const char *buf,
| ^~~~~~~~~~~~~~~~~
mm/slub.c:6167:16: warning: 'min_partial_show' defined but not used [-Wunused-function]
6167 | static ssize_t min_partial_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~
mm/slub.c:6161:16: warning: 'order_show' defined but not used [-Wunused-function]
6161 | static ssize_t order_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~
mm/slub.c:6155:16: warning: 'objs_per_slab_show' defined but not used [-Wunused-function]
6155 | static ssize_t objs_per_slab_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~~~
mm/slub.c:6149:16: warning: 'object_size_show' defined but not used [-Wunused-function]
6149 | static ssize_t object_size_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~~~
mm/slub.c:6143:16: warning: 'align_show' defined but not used [-Wunused-function]
6143 | static ssize_t align_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~
mm/slub.c:6137:16: warning: 'slab_size_show' defined but not used [-Wunused-function]
6137 | static ssize_t slab_size_show(struct kmem_cache *s, char *buf)
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/remote_node_defrag_ratio_store +6439 mm/slub.c
2086d26a05a4b5 Christoph Lameter 2007-05-06 6432
81819f0fc8285a Christoph Lameter 2007-05-06 6433 #ifdef CONFIG_NUMA
9824601ead957a Christoph Lameter 2008-01-07 @6434 static ssize_t remote_node_defrag_ratio_show(struct kmem_cache *s, char *buf)
81819f0fc8285a Christoph Lameter 2007-05-06 6435 {
bf16d19aabd8f5 Joe Perches 2020-12-14 6436 return sysfs_emit(buf, "%u\n", s->remote_node_defrag_ratio / 10);
81819f0fc8285a Christoph Lameter 2007-05-06 6437 }
81819f0fc8285a Christoph Lameter 2007-05-06 6438
9824601ead957a Christoph Lameter 2008-01-07 @6439 static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s,
81819f0fc8285a Christoph Lameter 2007-05-06 6440 const char *buf, size_t length)
81819f0fc8285a Christoph Lameter 2007-05-06 6441 {
eb7235eb842043 Alexey Dobriyan 2018-04-05 6442 unsigned int ratio;
0121c619d03820 Christoph Lameter 2008-04-29 6443 int err;
0121c619d03820 Christoph Lameter 2008-04-29 6444
eb7235eb842043 Alexey Dobriyan 2018-04-05 6445 err = kstrtouint(buf, 10, &ratio);
0121c619d03820 Christoph Lameter 2008-04-29 6446 if (err)
0121c619d03820 Christoph Lameter 2008-04-29 6447 return err;
eb7235eb842043 Alexey Dobriyan 2018-04-05 6448 if (ratio > 100)
eb7235eb842043 Alexey Dobriyan 2018-04-05 6449 return -ERANGE;
0121c619d03820 Christoph Lameter 2008-04-29 6450
0121c619d03820 Christoph Lameter 2008-04-29 6451 s->remote_node_defrag_ratio = ratio * 10;
81819f0fc8285a Christoph Lameter 2007-05-06 6452
81819f0fc8285a Christoph Lameter 2007-05-06 6453 return length;
81819f0fc8285a Christoph Lameter 2007-05-06 6454 }
9824601ead957a Christoph Lameter 2008-01-07 6455 SLAB_ATTR(remote_node_defrag_ratio);
81819f0fc8285a Christoph Lameter 2007-05-06 6456 #endif
81819f0fc8285a Christoph Lameter 2007-05-06 6457 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH 17/28 xarray.h: move declarations to xarray_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/drm/gpu_scheduler.h | 2 +- include/linux/blkdev.h | 2 +- include/linux/list_lru.h | 5 ++- include/linux/mlx5/driver.h | 2 +- include/linux/msi.h | 2 +- include/linux/xarray.h | 56 +---------------------------- include/linux/xarray_types.h | 70 ++++++++++++++++++++++++++++++++++++ include/net/net_namespace.h | 2 +- include/net/sch_generic.h | 2 +- include/sound/core.h | 5 ++- 10 files changed, 85 insertions(+), 63 deletions(-) create mode 100644 include/linux/xarray_types.h
include/drm/gpu_scheduler.h +1 -1
@@ -27,7 +27,7 @@#include <drm/spsc_queue.h> #include <linux/dma-fence.h> #include <linux/completion_types.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> #include <linux/wait_types.h> #include <linux/workqueue_types.h>
include/linux/blkdev.h +1 -1
@@ -23,7 +23,7 @@#include <linux/sched.h> #include <linux/uio.h> // for iov_iter_is_aligned() #include <linux/uuid.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> struct module ;struct request_queue ;
include/linux/list_lru.h +4 -1
@@ -11,7 +11,10 @@#include <linux/list.h> #include <linux/nodemask.h> #include <linux/shrinker.h> -#include <linux/xarray.h> + +#ifdef CONFIG_MEMCG_KMEM +#include <linux/xarray_types.h> +#endif struct mem_cgroup ;
include/linux/mlx5/driver.h +1 -1
@@ -41,7 +41,7 @@#include <linux/semaphore.h> #include <linux/slab.h> #include <linux/vmalloc.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> #include <linux/workqueue_types.h> #include <linux/mempool.h> #include <linux/interrupt.h>
include/linux/msi.h +1 -1
@@ -21,7 +21,7 @@#include <linux/irqdomain_defs.h> #include <linux/cpumask.h> #include <linux/msi_api.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> #include <linux/mutex_types.h> #include <linux/list.h> #include <linux/irq.h>
include/linux/xarray.h +1 -55
83 lines not on this page · raw message
include/linux/xarray_types.h new file +70 -0
70 lines not on this page · raw message
include/net/net_namespace.h +1 -1
@@ -41,7 +41,7 @@#include <linux/idr.h> #include <linux/skbuff.h> #include <linux/notifier.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> struct user_namespace ;struct proc_dir_entry ;
include/net/sch_generic.h +1 -1
@@ -18,7 +18,7 @@#include <net/gen_stats.h> #include <net/rtnetlink.h> #include <net/flow_offload.h> -#include <linux/xarray.h> +#include <linux/xarray_types.h> struct Qdisc_ops ;struct qdisc_walker ;
include/sound/core.h +4 -1
@@ -14,7 +14,10 @@#include <linux/stringify.h> #include <linux/printk.h> #include <linux/wait.h> -#include <linux/xarray.h> + +#ifdef CONFIG_SND_CTL_FAST_LOOKUP +#include <linux/xarray_types.h> +#endif /* number of supported soundcards */ #ifdef CONFIG_SND_DYNAMIC_MINORS
Signature · 1 line
2.39.2
PATCH 18/28 blkdev.h: move blk_op_is_passthrough() to blk_types.h
In reply to Max KellermannThis is a very low-level function without any additional dependencies, and moving it will allow certain sources to omit the "blkdev.h" dependency.
--- include/linux/blk_types.h | 6 ++++++ include/linux/blkdev.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
include/linux/blk_types.h +6 -0
@@ -434,6 +434,12 @@ static inline enum req_op bio_op(const struct bio *bio)return bio->bi_opf &REQ_OP_MASK ; } +static inline bool blk_op_is_passthrough (blk_opf_t op) +{ + op &=REQ_OP_MASK ; +return op ==REQ_OP_DRV_IN || op ==REQ_OP_DRV_OUT ; +} +static inline bool op_is_write (blk_opf_t op) {return !!(op & (__force blk_opf_t )1 );
include/linux/blkdev.h +0 -6
@@ -259,12 +259,6 @@ static inline int blk_validate_block_size(unsigned long bsize)return 0 ; } -static inline bool blk_op_is_passthrough (blk_opf_t op) -{ - op &=REQ_OP_MASK ; -return op ==REQ_OP_DRV_IN || op ==REQ_OP_DRV_OUT ; -} -/* * BLK_BOUNCE_NONE: never bounce (default) * BLK_BOUNCE_HIGH: bounce all highmem pages
Signature · 1 line
2.39.2
PATCH 19/28 bio.h: move bio_has_data() and bio_no_advance_iter() to blk_types.h
In reply to Max Kellermann"struct bio" has nothing to do with "bio.h", the naming is just confusing. This move will allow narrowing other dependencies later.
--- include/linux/bio.h | 22 ---------------------- include/linux/blk_types.h | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-)
include/linux/bio.h +0 -22
@@ -49,28 +49,6 @@ static inline unsigned int bio_max_segs(unsigned int nr_segs)#define bio_data_dir (bio) \ (op_is_write(bio_op(bio)) ? WRITE : READ) -/* -* Check whether this bio carries any data or not. A NULL bio is allowed. -*/ -static inline bool bio_has_data (struct bio *bio) -{ -if (bio && - bio->bi_iter.bi_size && -bio_op (bio) !=REQ_OP_DISCARD && -bio_op (bio) !=REQ_OP_SECURE_ERASE && -bio_op (bio) !=REQ_OP_WRITE_ZEROES ) -return true; - -return false; -} - -static inline bool bio_no_advance_iter (const struct bio *bio) -{ -return bio_op (bio) ==REQ_OP_DISCARD || -bio_op (bio) ==REQ_OP_SECURE_ERASE || -bio_op (bio) ==REQ_OP_WRITE_ZEROES ; -} -static inline void *bio_data (struct bio *bio) {if (bio_has_data (bio))
include/linux/blk_types.h +23 -0
@@ -284,6 +284,7 @@ struct bio {#define BIO_RESET_BYTES offsetof(struct bio, bi_max_vecs)#define BIO_MAX_SECTORS (UINT_MAX >> SECTOR_SHIFT) +/* * bio flags */
@@ -434,6 +435,28 @@ static inline enum req_op bio_op(const struct bio *bio)return bio->bi_opf &REQ_OP_MASK ; } +/* +* Check whether this bio carries any data or not. A NULL bio is allowed. +*/ +static inline bool bio_has_data (struct bio *bio) +{ +if (bio && + bio->bi_iter.bi_size && +bio_op (bio) !=REQ_OP_DISCARD && +bio_op (bio) !=REQ_OP_SECURE_ERASE && +bio_op (bio) !=REQ_OP_WRITE_ZEROES ) +return true; + +return false; +} + +static inline bool bio_no_advance_iter (const struct bio *bio) +{ +return bio_op (bio) ==REQ_OP_DISCARD || +bio_op (bio) ==REQ_OP_SECURE_ERASE || +bio_op (bio) ==REQ_OP_WRITE_ZEROES ; +} +static inline bool blk_op_is_passthrough (blk_opf_t op) { op &=REQ_OP_MASK ;
Signature · 1 line
2.39.2
PATCH 20/28 bio.h: move declarations to bio_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/bio.h | 74 +--------------------------------- include/linux/bio_types.h | 84 +++++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 2 +- 3 files changed, 86 insertions(+), 74 deletions(-) create mode 100644 include/linux/bio_types.h
include/linux/bio.h +1 -73
@@ -5,6 +5,7 @@#ifndef __LINUX_BIO_H#define __LINUX_BIO_H +#include <linux/bio_types.h> #include <linux/mempool.h> /* struct bio, bio_vec and BIO_* flags are defined in blk_types.h */ #include <linux/blk_types.h>
@@ -20,35 +21,6 @@ static inline unsigned int bio_max_segs(unsigned int nr_segs)return min (nr_segs,BIO_MAX_VECS ); } -#define bio_prio (bio) (bio)->bi_ioprio -#define bio_set_prio (bio, prio) ((bio)->bi_ioprio = prio) - -#define bio_iter_iovec (bio, iter) \ - bvec_iter_bvec((bio)->bi_io_vec, (iter)) - -#define bio_iter_page (bio, iter) \ - bvec_iter_page((bio)->bi_io_vec, (iter)) -#define bio_iter_len (bio, iter) \ - bvec_iter_len((bio)->bi_io_vec, (iter)) -#define bio_iter_offset (bio, iter) \ - bvec_iter_offset((bio)->bi_io_vec, (iter)) - -#define bio_page (bio) bio_iter_page((bio), (bio)->bi_iter) -#define bio_offset (bio) bio_iter_offset((bio), (bio)->bi_iter) -#define bio_iovec (bio) bio_iter_iovec((bio), (bio)->bi_iter) - -#define bvec_iter_sectors (iter) ((iter).bi_size >> 9) -#define bvec_iter_end_sector (iter) ((iter).bi_sector + bvec_iter_sectors((iter))) - -#define bio_sectors (bio) bvec_iter_sectors((bio)->bi_iter) -#define bio_end_sector (bio) bvec_iter_end_sector((bio)->bi_iter) - -/* -* Return the data direction, READ or WRITE. -*/ -#define bio_data_dir (bio) \ - (op_is_write(bio_op(bio)) ? WRITE : READ) -static inline void *bio_data (struct bio *bio) {if (bio_has_data (bio))
@@ -521,18 +493,6 @@ static inline void bio_set_dev(struct bio *bio, struct block_device *bdev)bio_associate_blkg (bio); } -/* -* BIO list management for use by remapping drivers (e.g. DM or MD) and loop. -* -* A bio_list anchors a singly-linked list of bios chained through the bi_next -* member of the bio. The bio_list also caches the last list member to allow -* fast access to the tail. -*/ -struct bio_list { -struct bio *head; -struct bio *tail; -}; -static inline int bio_list_empty (const struct bio_list *bl) {return bl->head ==NULL ;
@@ -656,38 +616,6 @@ static inline void bio_inc_remaining(struct bio *bio)*/ #define BIO_POOL_SIZE 2 -struct bio_set { -struct kmem_cache *bio_slab; -unsigned int front_pad; - -/* -* per-cpu bio alloc cache -*/ -struct bio_alloc_cache __percpu *cache; - -mempool_t bio_pool; -mempool_t bvec_pool; -#if defined(CONFIG_BLK_DEV_INTEGRITY ) -mempool_t bio_integrity_pool; -mempool_t bvec_integrity_pool; -#endif - -unsigned int back_pad; -/* -* Deadlock avoidance for stacking block drivers: see comments in -* bio_alloc_bioset() for details -*/ -spinlock_t rescue_lock; -struct bio_list rescue_list; -struct work_struct rescue_work; -struct workqueue_struct *rescue_workqueue; - -/* -* Hot un-plug notifier for the per-cpu cache, if used -*/ -struct hlist_node cpuhp_dead; -}; -static inline bool bioset_initialized (struct bio_set *bs) {return bs->bio_slab !=NULL ;
include/linux/bio_types.h new file +84 -0
84 lines not on this page · raw message
include/linux/blkdev.h +1 -1
@@ -14,7 +14,7 @@#include <linux/timer_types.h> #include <linux/workqueue_types.h> #include <linux/wait_types.h> -#include <linux/bio.h> +#include <linux/bio_types.h> #include <linux/gfp_types.h> #include <linux/kdev_t.h> #include <linux/rcupdate.h>
Signature · 1 line
2.39.2
PATCH 21/28 percpu-refcount.h: move declarations to percpu-refcount_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- drivers/target/target_core_alua.c | 1 + drivers/target/target_core_pr.c | 1 + drivers/target/target_core_xcopy.c | 1 + include/linux/blkdev.h | 2 +- include/linux/bpf-cgroup-defs.h | 2 +- include/linux/bpf.h | 2 +- include/linux/cgroup-defs.h | 2 +- include/linux/cgroup.h | 1 + include/linux/percpu-refcount.h | 64 +----------------------- include/linux/percpu-refcount_types.h | 71 +++++++++++++++++++++++++++ include/linux/slab.h | 1 - include/target/target_core_base.h | 2 +- 12 files changed, 81 insertions(+), 69 deletions(-) create mode 100644 include/linux/percpu-refcount_types.h
drivers/target/target_core_alua.c +1 -0
@@ -18,6 +18,7 @@#include <linux/fcntl.h> #include <linux/file.h> #include <linux/fs.h> +#include <linux/percpu-refcount.h> #include <scsi/scsi_proto.h> #include <asm/unaligned.h>
drivers/target/target_core_pr.c +1 -0
@@ -19,6 +19,7 @@#include <linux/fcntl.h> #include <linux/fs.h> #include <linux/kref.h> +#include <linux/percpu-refcount.h> #include <scsi/scsi_proto.h> #include <asm/unaligned.h>
drivers/target/target_core_xcopy.c +1 -0
@@ -18,6 +18,7 @@#include <linux/rculist.h> #include <linux/completion.h> #include <linux/configfs.h> +#include <linux/percpu-refcount.h> #include <linux/ratelimit.h> #include <scsi/scsi_proto.h> #include <asm/unaligned.h>
include/linux/blkdev.h +1 -1
@@ -18,7 +18,7 @@#include <linux/gfp_types.h> #include <linux/kdev_t.h> #include <linux/rcupdate.h> -#include <linux/percpu-refcount.h> +#include <linux/percpu-refcount_types.h> #include <linux/blkzoned.h> #include <linux/sched.h> #include <linux/uio.h> // for iov_iter_is_aligned()
include/linux/bpf-cgroup-defs.h +1 -1
@@ -5,7 +5,7 @@#ifdef CONFIG_CGROUP_BPF #include <linux/list.h> -#include <linux/percpu-refcount.h> +#include <linux/percpu-refcount_types.h> #include <linux/workqueue_types.h> struct bpf_prog_array ;
include/linux/bpf.h +1 -1
@@ -21,7 +21,7 @@#include <linux/capability.h> #include <linux/sched/mm.h> #include <linux/slab.h> -#include <linux/percpu-refcount.h> +#include <linux/percpu-refcount_types.h> #include <linux/stddef.h> #include <linux/bpfptr.h> #include <linux/btf.h>
include/linux/cgroup-defs.h +1 -1
@@ -15,7 +15,7 @@#include <linux/mutex_types.h> #include <linux/rcupdate.h> #include <linux/refcount_types.h> -#include <linux/percpu-refcount.h> +#include <linux/percpu-refcount_types.h> #include <linux/percpu-rwsem.h> #include <linux/u64_stats_sync.h> #include <linux/workqueue.h>
include/linux/cgroup.h +1 -0
@@ -21,6 +21,7 @@#include <linux/ns_common.h> #include <linux/nsproxy.h> #include <linux/user_namespace.h> +#include <linux/percpu-refcount.h> #include <linux/refcount.h> #include <linux/kernel_stat.h>
include/linux/percpu-refcount.h +1 -63
75 lines not on this page · raw message
include/linux/percpu-refcount_types.h new file +71 -0
71 lines not on this page · raw message
include/linux/slab.h +0 -1
@@ -16,7 +16,6 @@#include <linux/gfp_types.h> #include <linux/overflow.h> #include <linux/types.h> -#include <linux/percpu-refcount.h> #include <linux/cleanup.h> #include <linux/hash.h> #include <linux/mmzone.h>
include/target/target_core_base.h +1 -1
@@ -5,7 +5,7 @@#include <linux/configfs.h> /* struct config_group */ #include <linux/dma-direction.h> /* enum dma_data_direction */ #include <linux/sbitmap.h> -#include <linux/percpu-refcount.h> +#include <linux/percpu-refcount_types.h> #include <linux/semaphore.h> /* struct semaphore */ #include <linux/completion_types.h>
Signature · 1 line
2.39.2
PATCH 22/28 blkdev.h: move declarations to blkdev_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/blkdev.h | 444 +------------------------------ include/linux/blkdev_types.h | 461 +++++++++++++++++++++++++++++++++ include/linux/cdrom.h | 2 +- include/linux/io_uring_types.h | 2 +- io_uring/io_uring.c | 1 + 5 files changed, 465 insertions(+), 445 deletions(-) create mode 100644 include/linux/blkdev_types.h
include/linux/blkdev.h +1 -443
@@ -5,11 +5,9 @@#ifndef _LINUX_BLKDEV_H#define _LINUX_BLKDEV_H -#include <linux/types.h> +#include <linux/blkdev_types.h> #include <linux/fs.h> // for inode_unhashed() #include <linux/blk_types.h> -#include <linux/device_types.h> -#include <linux/list.h> #include <linux/minmax.h> #include <linux/timer_types.h> #include <linux/workqueue_types.h>
@@ -44,173 +42,6 @@ extern const struct device_type disk_type;extern const struct device_type part_type;extern struct class block_class; -/* -* Maximum number of blkcg policies allowed to be registered concurrently. -* Defined here to simplify include dependency. -*/ -#define BLKCG_MAX_POLS 6 - -#define DISK_MAX_PARTS 256 -#define DISK_NAME_LEN 32 - -#define PARTITION_META_INFO_VOLNAMELTH 64 -/* -* Enough for the string representation of any kind of UUID plus NULL. -* EFI UUID is 36 characters. MSDOS UUID is 11 characters. -*/ -#define PARTITION_META_INFO_UUIDLTH (UUID_STRING_LEN + 1) - -struct partition_meta_info { -char uuid[PARTITION_META_INFO_UUIDLTH ]; -u8 volname[PARTITION_META_INFO_VOLNAMELTH ]; -}; - -/** -* DOC: genhd capability flags -* -* ``GENHD_FL_REMOVABLE``: indicates that the block device gives access to -* removable media. When set, the device remains present even when media is not -* inserted. Shall not be set for devices which are removed entirely when the -* media is removed. -* -* ``GENHD_FL_HIDDEN``: the block device is hidden; it doesn't produce events, -* doesn't appear in sysfs, and can't be opened from userspace or using -* blkdev_get*. Used for the underlying components of multipath devices. -* -* ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not -* scan for partitions from add_disk, and users can't add partitions manually. -* -*/ -enum { -GENHD_FL_REMOVABLE =1 <<0 , -GENHD_FL_HIDDEN =1 <<1 , -GENHD_FL_NO_PART =1 <<2 , -}; - -enum { -DISK_EVENT_MEDIA_CHANGE =1 <<0 ,/* media changed */ -DISK_EVENT_EJECT_REQUEST =1 <<1 ,/* eject requested */ -}; - -enum { -/* Poll even if events_poll_msecs is unset */ -DISK_EVENT_FLAG_POLL =1 <<0 , -/* Forward events to udev */ -DISK_EVENT_FLAG_UEVENT =1 <<1 , -/* Block event polling when open for exclusive write */ -DISK_EVENT_FLAG_BLOCK_ON_EXCL_WRITE =1 <<2 , -}; - -struct disk_events ; -struct badblocks ; - -struct blk_integrity { -const struct blk_integrity_profile *profile; -unsigned char flags; -unsigned char tuple_size; -unsigned char interval_exp; -unsigned char tag_size; -}; - -typedef unsigned int __bitwise blk_mode_t ; - -/* open for reading */ -#define BLK_OPEN_READ ((__force blk_mode_t)(1 << 0)) -/* open for writing */ -#define BLK_OPEN_WRITE ((__force blk_mode_t)(1 << 1)) -/* open exclusively (vs other exclusive openers */ -#define BLK_OPEN_EXCL ((__force blk_mode_t)(1 << 2)) -/* opened with O_NDELAY */ -#define BLK_OPEN_NDELAY ((__force blk_mode_t)(1 << 3)) -/* open for "writes" only for ioctls (specialy hack for floppy.c) */ -#define BLK_OPEN_WRITE_IOCTL ((__force blk_mode_t)(1 << 4)) -/* open is exclusive wrt all other BLK_OPEN_WRITE opens to the device */ -#define BLK_OPEN_RESTRICT_WRITES ((__force blk_mode_t)(1 << 5)) - -struct gendisk { -/* -* major/first_minor/minors should not be set by any new driver, the -* block core will take care of allocating them automatically. -*/ -int major; -int first_minor; -int minors; - -char disk_name[DISK_NAME_LEN ];/* name of major driver */ - -unsigned short events;/* supported events */ -unsigned short event_flags;/* flags related to event processing */ - -struct xarray part_tbl; -struct block_device *part0; - -const struct block_device_operations *fops; -struct request_queue *queue; -void *private_data; - -struct bio_set bio_split; - -int flags; -unsigned long state; -#define GD_NEED_PART_SCAN 0 -#define GD_READ_ONLY 1 -#define GD_DEAD 2 -#define GD_NATIVE_CAPACITY 3 -#define GD_ADDED 4 -#define GD_SUPPRESS_PART_SCAN 5 -#define GD_OWNS_QUEUE 6 - -struct mutex open_mutex;/* open/close mutex */ -unsigned open_partitions;/* number of open partitions */ - -struct backing_dev_info *bdi; -struct kobject queue_kobj;/* the queue/ directory */ -struct kobject *slave_dir; -#ifdef CONFIG_BLOCK_HOLDER_DEPRECATED -struct list_head slave_bdevs; -#endif -struct timer_rand_state *random; -atomic_t sync_io;/* RAID */ -struct disk_events *ev; - -#ifdef CONFIG_BLK_DEV_ZONED -/* -* Zoned block device information for request dispatch control. -* nr_zones is the total number of zones of the device. This is always -* 0 for regular block devices. conv_zones_bitmap is a bitmap of nr_zones -* bits which indicates if a zone is conventional (bit set) or -* sequential (bit clear). seq_zones_wlock is a bitmap of nr_zones -* bits which indicates if a zone is write locked, that is, if a write -* request targeting the zone was dispatched. -* -* Reads of this information must be protected with blk_queue_enter() / -* blk_queue_exit(). Modifying this information is only allowed while -* no requests are being processed. See also blk_mq_freeze_queue() and -* blk_mq_unfreeze_queue(). -*/ -unsigned int nr_zones; -unsigned int max_open_zones; -unsigned int max_active_zones; -unsigned long *conv_zones_bitmap; -unsigned long *seq_zones_wlock; -#endif /* CONFIG_BLK_DEV_ZONED */ - -#if IS_ENABLED (CONFIG_CDROM ) -struct cdrom_device_info *cdi; -#endif -int node_id; -struct badblocks *bb; -struct lockdep_map lockdep_map; -u64 diskseq; -blk_mode_t open_mode; - -/* -* Independent sector access ranges. This is always NULL for -* devices that do not have multiple independent access ranges. -*/ -struct blk_independent_access_ranges *ia_ranges; -}; -static inline bool disk_live (struct gendisk *disk) {return !inode_unhashed (disk->part0->bd_inode);
@@ -259,57 +90,6 @@ static inline int blk_validate_block_size(unsigned long bsize)return 0 ; } -/* -* BLK_BOUNCE_NONE: never bounce (default) -* BLK_BOUNCE_HIGH: bounce all highmem pages -*/ -enum blk_bounce { -BLK_BOUNCE_NONE , -BLK_BOUNCE_HIGH , -}; - -struct queue_limits { -enum blk_bounce bounce; -unsigned long seg_boundary_mask; -unsigned long virt_boundary_mask; - -unsigned int max_hw_sectors; -unsigned int max_dev_sectors; -unsigned int chunk_sectors; -unsigned int max_sectors; -unsigned int max_user_sectors; -unsigned int max_segment_size; -unsigned int physical_block_size; -unsigned int logical_block_size; -unsigned int alignment_offset; -unsigned int io_min; -unsigned int io_opt; -unsigned int max_discard_sectors; -unsigned int max_hw_discard_sectors; -unsigned int max_secure_erase_sectors; -unsigned int max_write_zeroes_sectors; -unsigned int max_zone_append_sectors; -unsigned int discard_granularity; -unsigned int discard_alignment; -unsigned int zone_write_granularity; - -unsigned short max_segments; -unsigned short max_integrity_segments; -unsigned short max_discard_segments; - -unsigned char misaligned; -unsigned char discard_misaligned; -unsigned char raid_partial_stripes_expensive; -bool zoned; - -/* -* Drivers that set dma_alignment to less than 511 must be prepared to -* handle individual bvec's that are not a multiple of a SECTOR_SIZE -* due to possible offsets. -*/ -unsigned int dma_alignment; -}; -typedef int (*report_zones_cb )(struct blk_zone *zone,unsigned int idx,void *data);
@@ -350,194 +130,6 @@ struct blk_independent_access_ranges {struct blk_independent_access_range ia_range[]; }; -struct request_queue { -/* -* The queue owner gets to use this for whatever they like. -* ll_rw_blk doesn't touch it. -*/ -void *queuedata; - -struct elevator_queue *elevator; - -const struct blk_mq_ops *mq_ops; - -/* sw queues */ -struct blk_mq_ctx __percpu *queue_ctx; - -/* -* various queue flags, see QUEUE_* below -*/ -unsigned long queue_flags; - -unsigned int rq_timeout; - -unsigned int queue_depth; - -refcount_t refs; - -/* hw dispatch queues */ -unsigned int nr_hw_queues; -struct xarray hctx_table; - -struct percpu_ref q_usage_counter; - -struct request *last_merge; - -spinlock_t queue_lock; - -int quiesce_depth; - -struct gendisk *disk; - -/* -* mq queue kobject -*/ -struct kobject *mq_kobj; - -struct queue_limits limits; - -#ifdef CONFIG_BLK_DEV_INTEGRITY -struct blk_integrity integrity; -#endif /* CONFIG_BLK_DEV_INTEGRITY */ - -#ifdef CONFIG_PM -struct device *dev; -enum rpm_status rpm_status; -#endif - -/* -* Number of contexts that have called blk_set_pm_only(). If this -* counter is above zero then only RQF_PM requests are processed. -*/ -atomic_t pm_only; - -struct blk_queue_stats *stats; -struct rq_qos *rq_qos; -struct mutex rq_qos_mutex; - -/* -* ida allocated id for this queue. Used to index queues from -* ioctx. -*/ -int id; - -unsigned int dma_pad_mask; - -/* -* queue settings -*/ -unsigned long nr_requests;/* Max # of requests */ - -#ifdef CONFIG_BLK_INLINE_ENCRYPTION -struct blk_crypto_profile *crypto_profile; -struct kobject *crypto_kobject; -#endif - -struct timer_list timeout; -struct work_struct timeout_work; - -atomic_t nr_active_requests_shared_tags; - -unsigned int required_elevator_features; - -struct blk_mq_tags *sched_shared_tags; - -struct list_head icq_list; -#ifdef CONFIG_BLK_CGROUP - DECLARE_BITMAP (blkcg_pols, BLKCG_MAX_POLS); -struct blkcg_gq *root_blkg; -struct list_head blkg_list; -struct mutex blkcg_mutex; -#endif - -int node; - -spinlock_t requeue_lock; -struct list_head requeue_list; -struct delayed_work requeue_work; - -#ifdef CONFIG_BLK_DEV_IO_TRACE -struct blk_trace __rcu *blk_trace; -#endif -/* -* for flush operations -*/ -struct blk_flush_queue *fq; -struct list_head flush_list; - -struct mutex sysfs_lock; -struct mutex sysfs_dir_lock; - -/* -* for reusing dead hctx instance in case of updating -* nr_hw_queues -*/ -struct list_head unused_hctx_list; -spinlock_t unused_hctx_lock; - -int mq_freeze_depth; - -#ifdef CONFIG_BLK_DEV_THROTTLING -/* Throttle data */ -struct throtl_data *td; -#endif -struct rcu_head rcu_head; -wait_queue_head_t mq_freeze_wq; -/* -* Protect concurrent access to q_usage_counter by -* percpu_ref_kill() and percpu_ref_reinit(). -*/ -struct mutex mq_freeze_lock; - -struct blk_mq_tag_set *tag_set; -struct list_head tag_set_list; - -struct dentry *debugfs_dir; -struct dentry *sched_debugfs_dir; -struct dentry *rqos_debugfs_dir; -/* -* Serializes all debugfs metadata operations using the above dentries. -*/ -struct mutex debugfs_mutex; - -bool mq_sysfs_init_done; -}; - -/* Keep blk_queue_flag_name[] in sync with the definitions below */ -#define QUEUE_FLAG_STOPPED 0/* queue is stopped */ -#define QUEUE_FLAG_DYING 1/* queue being torn down */ -#define QUEUE_FLAG_NOMERGES 3/* disable merge attempts */ -#define QUEUE_FLAG_SAME_COMP 4/* complete on same CPU-group */ -#define QUEUE_FLAG_FAIL_IO 5/* fake timeout */ -#define QUEUE_FLAG_NONROT 6/* non-rotational device (SSD) */ -#define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT/* paravirt device */ -#define QUEUE_FLAG_IO_STAT 7/* do disk/partitions IO accounting */ -#define QUEUE_FLAG_NOXMERGES 9/* No extended merges */ -#define QUEUE_FLAG_ADD_RANDOM 10/* Contributes to random pool */ -#define QUEUE_FLAG_SYNCHRONOUS 11/* always completes in submit context */ -#define QUEUE_FLAG_SAME_FORCE 12/* force complete on same CPU */ -#define QUEUE_FLAG_HW_WC 13/* Write back caching supported */ -#define QUEUE_FLAG_INIT_DONE 14/* queue is initialized */ -#define QUEUE_FLAG_STABLE_WRITES 15/* don't modify blks until WB is done */ -#define QUEUE_FLAG_POLL 16/* IO polling enabled if set */ -#define QUEUE_FLAG_WC 17/* Write back caching */ -#define QUEUE_FLAG_FUA 18/* device supports FUA writes */ -#define QUEUE_FLAG_DAX 19/* device supports DAX */ -#define QUEUE_FLAG_STATS 20/* track IO start and completion times */ -#define QUEUE_FLAG_REGISTERED 22/* queue has been registered to a disk */ -#define QUEUE_FLAG_QUIESCED 24/* queue has been quiesced */ -#define QUEUE_FLAG_PCI_P2PDMA 25/* device supports PCI p2p requests */ -#define QUEUE_FLAG_ZONE_RESETALL 26/* supports Zone Reset All */ -#define QUEUE_FLAG_RQ_ALLOC_TIME 27/* record rq->alloc_time_ns */ -#define QUEUE_FLAG_HCTX_ACTIVE 28/* at least one blk-mq hctx is active */ -#define QUEUE_FLAG_NOWAIT 29/* device supports NOWAIT */ -#define QUEUE_FLAG_SQ_SCHED 30/* single queue style io dispatch */ -#define QUEUE_FLAG_SKIP_TAGSET_QUIESCE 31/* quiesce_tagset skip the queue*/ - -#define QUEUE_FLAG_MQ_DEFAULT ((1UL << QUEUE_FLAG_IO_STAT) | \ - (1UL << QUEUE_FLAG_SAME_COMP) | \ - (1UL << QUEUE_FLAG_NOWAIT)) -void blk_queue_flag_set (unsigned int flag,struct request_queue *q);void blk_queue_flag_clear (unsigned int flag,struct request_queue *q);bool blk_queue_flag_test_and_set (unsigned int flag,struct request_queue *q);
@@ -920,32 +512,6 @@ extern void blk_put_queue(struct request_queue *);void blk_mark_disk_dead (struct gendisk *disk);#ifdef CONFIG_BLOCK -/* -* blk_plug permits building a queue of related requests by holding the I/O -* fragments for a short period. This allows merging of sequential requests -* into single larger request. As the requests are moved from a per-task list to -* the device's request_queue in a batch, this results in improved scalability -* as the lock contention for request_queue lock is reduced. -* -* It is ok not to disable preemption when adding the request to the plug list -* or when attempting a merge. For details, please see schedule() where -* blk_flush_plug() is called. -*/ -struct blk_plug { -struct request *mq_list;/* blk-mq requests */ - -/* if ios_left is > 1, we can batch tag/rq allocations */ -struct request *cached_rq; -u64 cur_ktime; -unsigned short nr_ios; - -unsigned short rq_count; - -bool multiple_queues; -bool has_elevator; - -struct list_head cb_list;/* md requires an unplug callback */ -};struct blk_plug_cb ;typedef void (*blk_plug_cb_fn )(struct blk_plug_cb *,bool );
@@ -982,8 +548,6 @@ static inline void blk_plug_invalidate_ts(struct task_struct *tsk)int blkdev_issue_flush (struct block_device *bdev);long nr_blockdev_pages (void );#else /* CONFIG_BLOCK */ -struct blk_plug { -};static inline void blk_start_plug_nr_ios (struct blk_plug *plug,unsigned short nr_ios)
@@ -1545,12 +1109,6 @@ static inline int early_lookup_bdev(const char *pathname, dev_t *dev)int bdev_freeze (struct block_device *bdev);int bdev_thaw (struct block_device *bdev); -struct io_comp_batch { -struct request *req_list; -bool need_ts; -void (*complete)(struct io_comp_batch *); -}; -#define DEFINE_IO_COMP_BATCH (name) struct io_comp_batch name = { }#endif /* _LINUX_BLKDEV_H */
include/linux/blkdev_types.h new file +461 -0
461 lines not on this page · raw message
include/linux/cdrom.h +1 -1
@@ -13,7 +13,7 @@#include <linux/fs.h> /* not really needed, later.. */ #include <linux/list.h> -#include <linux/blkdev.h> +#include <linux/blkdev_types.h> #include <scsi/scsi_common.h> #include <uapi/linux/cdrom.h>
include/linux/io_uring_types.h +1 -1
@@ -1,7 +1,7 @@#ifndef IO_URING_TYPES_H #define IO_URING_TYPES_H -#include <linux/blkdev.h> +#include <linux/blkdev_types.h> #include <linux/task_work.h> #include <linux/bitmap.h> #include <linux/llist.h>
io_uring/io_uring.c +1 -0
@@ -47,6 +47,7 @@#include <linux/refcount.h> #include <linux/uio.h> #include <linux/bits.h> +#include <linux/blkdev.h> #include <linux/sched/signal.h> #include <linux/fs.h>
Signature · 1 line
2.39.2
PATCH 23/28 sbitmap.h: move declarations to sbitmap_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- block/blk-mq.h | 1 + include/linux/blk-mq.h | 2 +- include/linux/sbitmap.h | 124 +------------------------------- include/linux/sbitmap_types.h | 129 ++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+), 124 deletions(-) create mode 100644 include/linux/sbitmap_types.h
block/blk-mq.h +1 -0
@@ -3,6 +3,7 @@#define INT_BLK_MQ_H #include <linux/blk-mq.h> +#include <linux/sbitmap.h> #include "blk-stat.h" struct blk_mq_tag_set ;
include/linux/blk-mq.h +1 -1
@@ -4,7 +4,7 @@#include <linux/bio.h> #include <linux/blkdev.h> -#include <linux/sbitmap.h> +#include <linux/sbitmap_types.h> #include <linux/lockdep_types.h> #include <linux/scatterlist.h> #include <linux/prefetch.h>
include/linux/sbitmap.h +1 -123
143 lines not on this page · raw message
include/linux/sbitmap_types.h new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 24/28 list_lru.h: move declarations to list_lru_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- fs/super.c | 1 + include/linux/fs.h | 2 +- include/linux/list_lru.h | 36 +---------------------------- include/linux/list_lru_types.h | 42 ++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 36 deletions(-) create mode 100644 include/linux/list_lru_types.h
fs/super.c +1 -0
@@ -33,6 +33,7 @@#include <linux/rculist_bl.h> #include <linux/fscrypt.h> #include <linux/fsnotify.h> +#include <linux/list_lru.h> #include <linux/lockdep.h> #include <linux/user_namespace.h> #include <linux/fs_context.h>
include/linux/fs.h +1 -1
@@ -10,7 +10,7 @@#include <linux/stat.h> #include <linux/cache.h> #include <linux/list.h> -#include <linux/list_lru.h> +#include <linux/list_lru_types.h> #include <linux/llist.h> #include <linux/xarray.h> #include <linux/rbtree.h>
include/linux/list_lru.h +1 -35
@@ -8,14 +8,10 @@#ifndef _LRU_LIST_H#define _LRU_LIST_H -#include <linux/list.h> +#include <linux/list_lru_types.h> #include <linux/nodemask.h> #include <linux/shrinker.h> -#ifdef CONFIG_MEMCG_KMEM -#include <linux/xarray_types.h> -#endif -struct mem_cgroup ;/* list_lru_walk_cb has to always return one of those */
@@ -29,36 +25,6 @@ enum lru_status {internally, but has to return locked. */ }; -struct list_lru_one { -struct list_head list; -/* may become negative during memcg reparenting */ -long nr_items; -}; - -struct list_lru_memcg { -struct rcu_head rcu; -/* array of per cgroup per node lists, indexed by node id */ -struct list_lru_one node[]; -}; - -struct list_lru_node { -/* protects all lists on the node, including per cgroup */ -spinlock_t lock; -/* global list, used for the root cgroup in cgroup aware lrus */ -struct list_lru_one lru; -long nr_items; -}____cacheline_aligned_in_smp ; - -struct list_lru { -struct list_lru_node *node; -#ifdef CONFIG_MEMCG_KMEM -struct list_head list; -int shrinker_id; -bool memcg_aware; -struct xarray xa; -#endif -}; -void list_lru_destroy (struct list_lru *lru);int __list_lru_init (struct list_lru *lru,bool memcg_aware,struct lock_class_key *key,struct shrinker *shrinker);
include/linux/list_lru_types.h new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 25/28 list_bl.h: move declarations to list_bl_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/list_bl.h | 19 +----------------- include/linux/list_bl_types.h | 36 +++++++++++++++++++++++++++++++++++ include/linux/mbcache.h | 2 +- 3 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 include/linux/list_bl_types.h
include/linux/list_bl.h +1 -18
@@ -2,7 +2,7 @@#ifndef _LINUX_LIST_BL_H#define _LINUX_LIST_BL_H -#include <linux/list.h> +#include <linux/list_bl_types.h> #include <linux/bit_spinlock.h> /*
@@ -30,23 +30,6 @@#define LIST_BL_BUG_ON (x)#endif - -struct hlist_bl_head { -struct hlist_bl_node *first; -}; - -struct hlist_bl_node { -struct hlist_bl_node *next, **pprev; -}; -#define INIT_HLIST_BL_HEAD (ptr) \ - ((ptr)->first = NULL) - -static inline void INIT_HLIST_BL_NODE (struct hlist_bl_node *h) -{ - h->next =NULL ; - h->pprev =NULL ; -} -#define hlist_bl_entry (ptr, type, member) container_of(ptr,type,member)static inline bool hlist_bl_unhashed (const struct hlist_bl_node *h)
include/linux/list_bl_types.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_LIST_BL_TYPES_H +#define _LINUX_LIST_BL_TYPES_H + +#include <linux/list.h> + +/* +* Special version of lists, where head of the list has a lock in the lowest +* bit. This is useful for scalable hash tables without increasing memory +* footprint overhead. +* +* For modification operations, the 0 bit of hlist_bl_head->first +* pointer must be set. +* +* With some small modifications, this can easily be adapted to store several +* arbitrary bits (not just a single lock bit), if the need arises to store +* some fast and compact auxiliary data. +*/ + +struct hlist_bl_head { +struct hlist_bl_node *first; +}; + +struct hlist_bl_node { +struct hlist_bl_node *next, **pprev; +}; +#define INIT_HLIST_BL_HEAD (ptr) \ + ((ptr)->first = NULL) + +static inline void INIT_HLIST_BL_NODE (struct hlist_bl_node *h) +{ + h->next =NULL ; + h->pprev =NULL ; +} + +#endif
include/linux/mbcache.h +1 -1
@@ -3,7 +3,7 @@#define _LINUX_MBCACHE_H#include <linux/hash.h> -#include <linux/list_bl.h> +#include <linux/list_bl_types.h> #include <linux/list.h> #include <linux/atomic.h> #include <linux/fs.h>
Signature · 1 line
2.39.2
PATCH 26/28 percpu-rwsem.h: move declarations to percpu-rwsem_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- include/linux/cgroup-defs.h | 2 +- include/linux/percpu-rwsem.h | 15 +-------------- include/linux/percpu-rwsem_types.h | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 include/linux/percpu-rwsem_types.h
include/linux/cgroup-defs.h +1 -1
@@ -16,7 +16,7 @@#include <linux/rcupdate.h> #include <linux/refcount_types.h> #include <linux/percpu-refcount_types.h> -#include <linux/percpu-rwsem.h> +#include <linux/percpu-rwsem_types.h> #include <linux/u64_stats_sync.h> #include <linux/workqueue.h> #include <linux/bpf-cgroup-defs.h>
include/linux/percpu-rwsem.h +1 -14
@@ -2,24 +2,11 @@#ifndef _LINUX_PERCPU_RWSEM_H#define _LINUX_PERCPU_RWSEM_H +#include <linux/percpu-rwsem_types.h> #include <linux/atomic.h> #include <linux/percpu.h> -#include <linux/rcuwait.h> -#include <linux/wait.h> -#include <linux/rcu_sync.h> #include <linux/lockdep.h> -struct percpu_rw_semaphore { -struct rcu_sync rss; -unsigned int __percpu *read_count; -struct rcuwait writer; -wait_queue_head_t waiters; -atomic_t block; -#ifdef CONFIG_DEBUG_LOCK_ALLOC -struct lockdep_map dep_map; -#endif -}; -#ifdef CONFIG_DEBUG_LOCK_ALLOC #define __PERCPU_RWSEM_DEP_MAP_INIT (lockname) .dep_map = { .name = #lockname },#else
include/linux/percpu-rwsem_types.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PERCPU_RWSEM_TYPES_H +#define _LINUX_PERCPU_RWSEM_TYPES_H + +#include <linux/rcu_sync.h> +#include <linux/rcuwait.h> +#include <linux/types.h> +#include <linux/wait_types.h> +#ifdef CONFIG_DEBUG_LOCK_ALLOC +#include <linux/lockdep_types.h> +#endif + +struct percpu_rw_semaphore { +struct rcu_sync rss; +unsigned int __percpu *read_count; +struct rcuwait writer; +wait_queue_head_t waiters; +atomic_t block; +#ifdef CONFIG_DEBUG_LOCK_ALLOC +struct lockdep_map dep_map; +#endif +}; + +#endif
Signature · 1 line
2.39.2
PATCH 27/28 quota.h: move declarations to quota_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- fs/gfs2/incore.h | 1 + fs/xfs/xfs_qm.h | 1 + fs/xfs/xfs_qm_syscalls.c | 2 ++ fs/xfs/xfs_quotaops.c | 1 + fs/xfs/xfs_super.c | 1 + fs/xfs/xfs_trans_dquot.c | 2 ++ include/linux/fs.h | 2 +- include/linux/quota.h | 33 +----------------- include/linux/quota_types.h | 68 +++++++++++++++++++++++++++++++++++++ 9 files changed, 78 insertions(+), 33 deletions(-) create mode 100644 include/linux/quota_types.h
fs/gfs2/incore.h +1 -0
@@ -18,6 +18,7 @@#include <linux/rbtree.h> #include <linux/ktime.h> #include <linux/percpu.h> +#include <linux/quota.h> #include <linux/lockref.h> #include <linux/rhashtable.h> #include <linux/mutex.h>
fs/xfs/xfs_qm.h +1 -0
@@ -9,6 +9,7 @@#include "xfs_dquot_item.h" #include "xfs_dquot.h" +struct qc_dqblk ;struct xfs_inode ;extern struct kmem_cache *xfs_dqtrx_cache;
fs/xfs/xfs_qm_syscalls.c +2 -0
@@ -19,6 +19,8 @@#include "xfs_qm.h" #include "xfs_icache.h" +#include <linux/quota.h> + int xfs_qm_scall_quotaoff( xfs_mount_t *mp,
fs/xfs/xfs_quotaops.c +1 -0
@@ -15,6 +15,7 @@#include "xfs_icache.h" #include "xfs_qm.h" +#include <linux/quota.h> static void xfs_qm_fill_state(
fs/xfs/xfs_super.c +1 -0
@@ -48,6 +48,7 @@#include <linux/magic.h> #include <linux/fs_context.h> #include <linux/fs_parser.h> +#include <linux/quota.h> static const struct super_operations xfs_super_operations;
fs/xfs/xfs_trans_dquot.c +2 -0
@@ -18,6 +18,8 @@#include "xfs_trace.h" #include "xfs_error.h" +#include <linux/quota.h> + STATIC void xfs_trans_alloc_dqinfo(xfs_trans_t *);/*
include/linux/fs.h +1 -1
@@ -261,7 +261,7 @@ struct iattr {/* * Includes for diskquotas. */ -#include <linux/quota.h> +#include <linux/quota_types.h> /* * Maximum number of layers of fs stack. Needs to be limited to
include/linux/quota.h +1 -32
@@ -32,9 +32,8 @@#ifndef _LINUX_QUOTA_#define _LINUX_QUOTA_ -#include <linux/list.h> +#include <linux/quota_types.h> #include <linux/mutex_types.h> -#include <linux/rwsem_types.h> #include <linux/spinlock_types.h> #include <linux/percpu_counter.h>
@@ -45,7 +44,6 @@#include <linux/atomic.h> #include <linux/uidgid_types.h> #include <linux/projid.h> -#include <uapi/linux/quota.h> #undef USRQUOTA#undef GRPQUOTA
@@ -61,9 +59,6 @@ enum quota_type {#define QTYPE_MASK_GRP (1 << GRPQUOTA)#define QTYPE_MASK_PRJ (1 << PRJQUOTA) -typedef __kernel_uid32_t qid_t ;/* Type in which we store ids in memory */ -typedef long long qsize_t ;/* Type in which we store sizes */ -struct kqid {/* Type in which we store the quota identifier */ union {kuid_t uid;
@@ -213,24 +208,6 @@ struct mem_dqblk {time64_t dqb_itime;/* time limit for excessive inode use */ }; -/* -* Data for one quotafile kept in memory -*/ -struct quota_format_type ; - -struct mem_dqinfo { -struct quota_format_type *dqi_format; -int dqi_fmt_id;/* Id of the dqi_format - used when turning -* quotas on after remount RW */ -struct list_head dqi_dirty_list;/* List of dirty dquots [dq_list_lock] */ -unsigned long dqi_flags;/* DFQ_ flags [dq_data_lock] */ -unsigned int dqi_bgrace;/* Space grace time [dq_data_lock] */ -unsigned int dqi_igrace;/* Inode grace time [dq_data_lock] */ -qsize_t dqi_max_spc_limit;/* Maximum space limit [static] */ -qsize_t dqi_max_ino_limit;/* Maximum inode limit [static] */ -void *dqi_priv; -}; -struct super_block ;/* Mask for flags passed to userspace */
@@ -517,14 +494,6 @@ static inline void quota_send_warning(struct kqid qid, dev_t dev, }#endif /* CONFIG_QUOTA_NETLINK_INTERFACE */ -struct quota_info { -unsigned int flags;/* Flags for diskquotas on this device */ -struct rw_semaphore dqio_sem;/* Lock quota file while I/O in progress */ -struct inode *files[MAXQUOTAS ];/* inodes of quotafiles */ -struct mem_dqinfo info[MAXQUOTAS ];/* Information for each quota type */ -const struct quota_format_ops *ops[MAXQUOTAS ];/* Operations for each type */ -}; -int register_quota_format (struct quota_format_type *fmt);void unregister_quota_format (struct quota_format_type *fmt);
include/linux/quota_types.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 28/28 radix-tree.h: move declarations to radix-tree_types.h
In reply to Max KellermannBy providing declarations in a lean header, we can reduce header dependencies.
--- drivers/usb/cdns3/cdnsp-mem.c | 1 + include/linux/backing-dev-defs.h | 2 +- include/linux/iocontext.h | 2 +- include/linux/irqdomain.h | 2 +- include/linux/mlx4/device.h | 2 +- include/linux/radix-tree.h | 44 +--------------------------- include/linux/radix-tree_types.h | 50 ++++++++++++++++++++++++++++++++ kernel/dma/debug.c | 1 + kernel/irq/irqdomain.c | 1 + 9 files changed, 58 insertions(+), 47 deletions(-) create mode 100644 include/linux/radix-tree_types.h
drivers/usb/cdns3/cdnsp-mem.c +1 -0
@@ -12,6 +12,7 @@#include <linux/dma-mapping.h> #include <linux/dmapool.h> +#include <linux/radix-tree.h> #include <linux/slab.h> #include <linux/usb.h>
include/linux/backing-dev-defs.h +1 -1
@@ -3,7 +3,7 @@#define __LINUX_BACKING_DEV_DEFS_H#include <linux/list.h> -#include <linux/radix-tree.h> +#include <linux/radix-tree_types.h> #include <linux/rbtree_types.h> #include <linux/spinlock_types.h> #include <linux/percpu_counter_types.h>
include/linux/iocontext.h +1 -1
@@ -2,7 +2,7 @@#ifndef IOCONTEXT_H #define IOCONTEXT_H -#include <linux/radix-tree.h> +#include <linux/radix-tree_types.h> #include <linux/rcupdate.h> #include <linux/workqueue_types.h>
include/linux/irqdomain.h +1 -1
@@ -35,7 +35,7 @@#include <linux/irqhandler.h> #include <linux/of.h> #include <linux/mutex_types.h> -#include <linux/radix-tree.h> +#include <linux/radix-tree_types.h> struct device_node ;struct fwnode_handle ;
include/linux/mlx4/device.h +1 -1
@@ -37,7 +37,7 @@#include <linux/if_ether.h> #include <linux/pci.h> #include <linux/completion_types.h> -#include <linux/radix-tree.h> +#include <linux/radix-tree_types.h> #include <linux/cpu_rmap.h> #include <linux/crash_dump.h>
include/linux/radix-tree.h +1 -43
62 lines not on this page · raw message
include/linux/radix-tree_types.h new file +50 -0
50 lines not on this page · raw message
kernel/dma/debug.c +1 -0
@@ -18,6 +18,7 @@#include <linux/uaccess.h> #include <linux/export.h> #include <linux/device.h> +#include <linux/radix-tree.h> #include <linux/types.h> #include <linux/sched.h> #include <linux/ctype.h>
kernel/irq/irqdomain.c +1 -0
@@ -14,6 +14,7 @@#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/radix-tree.h> #include <linux/topology.h> #include <linux/seq_file.h> #include <linux/slab.h>
Signature · 1 line
2.39.2
Hi Max,
Quoted 11 lines · Max Kellermann
This patch set aims to reduce the dependencies between headers, in order to have cleaner code and speed up the build. It continues previous efforts by other developers.
As a preparation, the first patch adds "#include" directives to source files that were missing previously, but due to indirect includes, this was never noticed. After the cleanup, many missing directives would result in a compiler failure.
The second patch removes superfluous "#include" directives, some of which may be a leftover from refactoring patches.
[snip]
Quoted 3 lines
Max Kellermann (28):
include: add missing includes
include: remove unnecessary #include directives
How were these (a) missing and (b) unnecessary includes found or determined?
Did you use some tool for that? If so, which one?
thanks.
Signature · 1 line
#Randy
Quoted 3 lines · Randy Dunlap
How were these (a) missing and (b) unnecessary includes found or determined?
Did you use some tool for that? If so, which one?
No tool, just stgit to edit the patches (in arbitrary order). I reduced header dependencies, but got lots of build errors because symbols were missing in different sources, which were previously fulfilled by indirect includes that were now removed. I fixed all those build errors by adding missing includes to those headers, moving those changes to the first patch.
I found the unnecessary includes manually along the way by using "git grep" to find all include directives for a certain header; I checked the source for the reason why this header was included, and whether the include could be replaced with "X_types.h" instead. Sometimes, I found that not even "X_types.h" was necessary, but no include at all, so I removed the include completely and had those changes in the second patch.
The first two patches grew along the way. It was refreshed over and over (with stgit), while I was editing the other patches.
I know there's the "iwyu" tool, and it may be helpful eventually, but there's so much low-hanging fruit in the kernel, iwyu is not useful yet I think.
Max
Quoted 20 lines · Max Kellermann
Quoted 3 lines · Randy Dunlap
How were these (a) missing and (b) unnecessary includes found or determined?
Did you use some tool for that? If so, which one?No tool, just stgit to edit the patches (in arbitrary order). I reduced header dependencies, but got lots of build errors because symbols were missing in different sources, which were previously fulfilled by indirect includes that were now removed. I fixed all those build errors by adding missing includes to those headers, moving those changes to the first patch.
I found the unnecessary includes manually along the way by using "git grep" to find all include directives for a certain header; I checked the source for the reason why this header was included, and whether the include could be replaced with "
X_types.h" instead. Sometimes, I found that not even "X_types.h" was necessary, but no include at all, so I removed the include completely and had those changes in the second patch.
Quoted 6 lines
The first two patches grew along the way. It was refreshed over and over (with stgit), while I was editing the other patches.
I know there's the "iwyu" tool, and it may be helpful eventually, but there's so much low-hanging fruit in the kernel, iwyu is not useful yet I think.
We just wrapped up an internship where Tanzir was looking into getting IWYU working on the kernel. He presented about it at Linux Plumbers Conf '23 recently.
https://youtu.be/eFq_oqLiXPM?si=0VhuMnwjHnMPJeaR
https://youtu.be/XMVLSEzbpQ8?si=_2DQpS7JBlEC4FK1
https://github.com/ClangBuiltLinux/IWYUScripts
https://lore.kernel.org/lkml/?q=f%3Atanzirh%40google.com
Some of his patches have landed, others had requests from maintainers that weren't reasonable to satisfy in the short duration of an internship. But still worth pursuing. Happy to chat more about the general problem sometime.
Quoted 2 lines
Max