From patchwork Sun Oct 3 15:32:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12532757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 373FEC433EF for ; Sun, 3 Oct 2021 15:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CD2261A50 for ; Sun, 3 Oct 2021 15:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbhJCPa6 (ORCPT ); Sun, 3 Oct 2021 11:30:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:34308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbhJCPa6 (ORCPT ); Sun, 3 Oct 2021 11:30:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9B2F261A38; Sun, 3 Oct 2021 15:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633274950; bh=6PtDNg+0h3rPNGmigGLqP3LCmTvyDiow3N2VIxWpoK0=; h=From:To:Cc:Subject:Date:From; b=MLVrBDzF3cvVbr9PnLeMn52Eh7viou6fYTVMsj8OfmPPzJhsRpOXkJKBKv4WjFCeS mA2u1e3PXRBosMw3qksx90WYKnc3JyKSRN8+HIOykvsIUTIWAlgBLbRX18dCCDFiv9 ZAxblk9/00lN/hRjJvaj0XfGKwvJNKr/t5A9Fiy2O8Q0UcCY2ev8sD1qM30YkvQlwN ZFqFpBYkwKeP6xmDy0rivTyjeWO6mSW/bU1VEW9GsSsUIH5gfHXtH6BfMYkpr+JqKo LP2ztoV7SgYCr9WPLFcSSoH2BdlzjfUJCdRlCZQ+gzWmmSXlU6BGPCE8hOIKBqraTQ IT1lBEJRtC5lg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Jonathan Cameron Subject: [RFC PATCH 00/11] IIO: Bring core header includes up to date. Date: Sun, 3 Oct 2021 16:32:55 +0100 Message-Id: <20211003153306.391766-1-jic23@kernel.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron The includes from the various IIO core files have bitrotted over time (and probably were not great in the first place). This series is based loosely on the suggests the include-what-you-use tool provides but with a lot of discretion applied. Note that tool will tell you: 1) What includes provide elements directly used in a given .c file. 2) What includes are providing nothing that is directly used in the .c file. 3) It will not follow 'include chains', then concept being that anything used should be defined in a header directly included. It can't always distinguish between different paths to the header and knows nothing about intended include structures in the kernel. (for example including eventpoll.h directly is not intended to be safe, instead poll.h should be used). In recent times a lot of code has moved around in IIO and as a result often headers have gotten left behind or haven't made the move along with the code they were there to support. I made some decisions to reduce includes. #include can be assumed to bring in dev_printk.h and device/bus.h so don't include those directly. #include is a good general header to bring in errno.h as well as the various PTR_ERR() macros and similar. #include brings in everything related to polling. #include or as appropriate will bring in irqreturn.h. (probably some other cases I've forgotten about). Andy has been working on breaking up some of the headers that tend to get included everywhere because they are a pile of unrelated things. Some impact of that can be seen in this series. I would like to move IIO in the right direction even if we then end up with some additional churn in future reflecting changes in the headers we are using. This is an RFC primarily because there is a lot of 'interpretation' involved so I'd like to get high level feedback. I've included below the suggestions iwyu made for reference. As you can see the raw output is mostly useful for highlighting things that should not be there and roughly what should be. drivers/iio/buffer/kfifo_buf.c should add these lines: #include // for size_t, NULL #include "asm-generic/errno-base.h" // for EINVAL, EBUSY, ENOMEM #include "linux/compiler_types.h" // for __user, inline #include "linux/errno.h" // for ERESTARTSYS #include "linux/export.h" // for EXPORT_SYMBOL, EXPORT_SYMBOL_GPL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/log2.h" // for roundup_pow_of_two #include "linux/stddef.h" // for true, false #include "vdso/limits.h" // for UINT_MAX struct attribute; drivers/iio/buffer/kfifo_buf.c should remove these lines: - #include // lines 14-14 - #include // lines 13-13 - #include // lines 6-6 The full include-list for drivers/iio/buffer/kfifo_buf.c: #include // for devres_add, devres_free, devres_... #include // for iio_device_attach_buffer #include // for iio_buffer, iio_buffer_init, iio... #include // for iio_dev, INDIO_BUFFER_SOFTWARE #include // for devm_iio_kfifo_buffer_setup_ext #include // for container_of #include // for __kfifo_alloc, kfifo_free, kfifo #include // for MODULE_LICENSE #include // for mutex_unlock, mutex_lock, mutex_... #include // for kfree, kzalloc #include // for size_t, NULL #include "asm-generic/errno-base.h" // for EINVAL, EBUSY, ENOMEM #include "linux/compiler_types.h" // for __user, inline #include "linux/errno.h" // for ERESTARTSYS #include "linux/export.h" // for EXPORT_SYMBOL, EXPORT_SYMBOL_GPL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/log2.h" // for roundup_pow_of_two #include "linux/stddef.h" // for true, false #include "vdso/limits.h" // for UINT_MAX struct attribute; drivers/iio/buffer/industrialio-buffer-cb.c should add these lines: #include // for NULL, size_t #include "asm-generic/bitops/instrumented-atomic.h" // for set_bit #include "asm-generic/errno-base.h" // for EINVAL, ENOMEM #include "linux/bitmap.h" // for bitmap_free, bit... #include "linux/dev_printk.h" // for dev_err #include "linux/gfp.h" // for GFP_KERNEL #include "linux/list.h" // for INIT_LIST_HEAD struct device; drivers/iio/buffer/industrialio-buffer-cb.c should remove these lines: The full include-list for drivers/iio/buffer/industrialio-buffer-cb.c: #include // for ERR_PTR, IS_ERR #include // for EXPORT_SYMBOL_GPL #include // for iio_buffer, iio_... #include // for iio_channel, iio... #include // for INDIO_BUFFER_SOF... #include // for container_of #include // for MODULE_AUTHOR #include // for kfree, kzalloc #include // for NULL, size_t #include "asm-generic/bitops/instrumented-atomic.h" // for set_bit #include "asm-generic/errno-base.h" // for EINVAL, ENOMEM #include "linux/bitmap.h" // for bitmap_free, bit... #include "linux/dev_printk.h" // for dev_err #include "linux/gfp.h" // for GFP_KERNEL #include "linux/list.h" // for INIT_LIST_HEAD struct device; drivers/iio/buffer/industrialio-triggered-buffer.c should add these lines: #include // for NULL #include "asm-generic/errno-base.h" // for ENOMEM #include "linux/device.h" // for devm_add_action_or_reset #include "linux/interrupt.h" // for IRQF_ONESHOT #include "linux/irqreturn.h" // for irqreturn_t struct attribute; drivers/iio/buffer/industrialio-triggered-buffer.c should remove these lines: - #include // lines 7-7 The full include-list for drivers/iio/buffer/industrialio-triggered-buffer.c: #include // for EXPORT_SYMBOL, EXPORT_SYMBOL... #include // for iio_device_attach_buffer #include // for iio_buffer #include // for iio_dev, iio_device_id, INDI... #include // for iio_kfifo_free, iio_kfifo_al... #include // for iio_dealloc_pollfunc, iio_al... #include // for devm_iio_triggered_buffer_se... #include // for MODULE_AUTHOR, MODULE_DESCRI... #include // for NULL #include "asm-generic/errno-base.h" // for ENOMEM #include "linux/device.h" // for devm_add_action_or_reset #include "linux/interrupt.h" // for IRQF_ONESHOT #include "linux/irqreturn.h" // for irqreturn_t struct attribute; drivers/iio/industrialio-triggered-event.c should add these lines: #include // for NULL #include "asm-generic/errno-base.h" // for ENOMEM #include "linux/interrupt.h" // for IRQF_ONESHOT #include "linux/irqreturn.h" // for irqreturn_t drivers/iio/industrialio-triggered-event.c should remove these lines: - #include // lines 6-6 The full include-list for drivers/iio/industrialio-triggered-event.c: #include // for EXPORT_SYMBOL #include // for iio_dev, iio_device_id, INDI... #include // for iio_alloc_pollfunc, iio_deal... #include // for iio_triggered_event_cleanup #include // for MODULE_AUTHOR, MODULE_DESCRI... #include // for NULL #include "asm-generic/errno-base.h" // for ENOMEM #include "linux/interrupt.h" // for IRQF_ONESHOT #include "linux/irqreturn.h" // for irqreturn_t drivers/iio/industrialio-event.c should add these lines: #include // for test_bit #include // for NULL, size_t #include // for ssize_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, test_... #include "asm-generic/errno-base.h" // for EINVAL, ENODEV #include "asm-generic/fcntl.h" // for O_NONBLOCK, O_CL... #include "asm-generic/int-ll64.h" // for s64, u64 #include "asm/string_64.h" // for memcpy #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_types.h" // for __user, inline #include "linux/errno.h" // for ERESTARTSYS #include "linux/eventpoll.h" // for EPOLLIN, EPOLLRD... #include "linux/export.h" // for EXPORT_SYMBOL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/events.h" // for iio_event_data #include "linux/iio/types.h" // for iio_event_direction #include "linux/kstrtox.h" // for strtobool #include "linux/list.h" // for INIT_LIST_HEAD #include "linux/mutex.h" // for mutex_lock_inter... #include "linux/stddef.h" // for false, true #include "linux/sysfs.h" // for attribute_group #include "linux/types.h" // for list_head, bool drivers/iio/industrialio-event.c should remove these lines: - #include // lines 24-24 - #include // lines 14-14 - #include // lines 16-16 The full include-list for drivers/iio/industrialio-event.c: #include // for test_bit #include // for anon_inode_getfd #include // for device_attribute #include // for file, noop_llseek #include // for iio_dev_opaque #include // for iio_dev, iio_eve... #include // for iio_dev_attr #include // for kasprintf, ARRAY... #include // for kfifo_is_empty #include // for poll_wait #include // for kfree, kcalloc #include // for copy_to_user #include // for init_waitqueue_head #include // for NULL, size_t #include // for ssize_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, test_... #include "asm-generic/errno-base.h" // for EINVAL, ENODEV #include "asm-generic/fcntl.h" // for O_NONBLOCK, O_CL... #include "asm-generic/int-ll64.h" // for s64, u64 #include "asm/string_64.h" // for memcpy #include "iio_core.h" // for iio_free_chan_de... #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_types.h" // for __user, inline #include "linux/errno.h" // for ERESTARTSYS #include "linux/eventpoll.h" // for EPOLLIN, EPOLLRD... #include "linux/export.h" // for EXPORT_SYMBOL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/events.h" // for iio_event_data #include "linux/iio/types.h" // for iio_event_direction #include "linux/kstrtox.h" // for strtobool #include "linux/list.h" // for INIT_LIST_HEAD #include "linux/mutex.h" // for mutex_lock_inter... #include "linux/stddef.h" // for false, true #include "linux/sysfs.h" // for attribute_group #include "linux/types.h" // for list_head, bool drivers/iio/industrialio-core.c should add these lines: #include // for WARN #include // for ktime_get_bootti... #include // for NULL, size_t #include // for uintptr_t #include // for ssize_t, dev_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, test_... #include "asm-generic/errno-base.h" // for EINVAL, EBUSY #include "asm-generic/int-ll64.h" // for s64, u64 #include "asm/bug.h" // for BUG #include "asm/page_types.h" // for PAGE_SIZE #include "asm/string_64.h" // for memcpy #include "generated/autoconf.h" // for CONFIG_DEBUG_FS #include "linux/align.h" // for ALIGN #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_attributes.h" // for fallthrough #include "linux/compiler_types.h" // for __user #include "linux/dev_printk.h" // for dev_err, dev_info #include "linux/device/bus.h" // for bus_unregister #include "linux/export.h" // for EXPORT_SYMBOL_GPL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/hrtimer.h" // for hrtimer_resolution #include "linux/iio/types.h" // for IIO_VAL_INT, IIO... #include "linux/init.h" // for __exit, __init #include "linux/kstrtox.h" // for kstrtoint #include "linux/ktime.h" // for ktime_to_ns #include "linux/list.h" // for INIT_LIST_HEAD #include "linux/math.h" // for abs #include "linux/math64.h" // for div_s64_rem, div... #include "linux/minmax.h" // for min_t #include "linux/of.h" // for of_get_property #include "linux/printk.h" // for pr_err #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stddef.h" // for false, true #include "linux/string.h" // for sysfs_streq, str... #include "linux/sysfs.h" // for sysfs_emit_at #include "linux/time.h" // for CLOCK_BOOTTIME #include "linux/time64.h" // for timespec64_to_ns #include "linux/timex.h" // for shift_right #include "linux/types.h" // for list_head, bool #include "linux/uaccess.h" // for copy_from_user #include "vdso/ktime.h" // for LOW_RES_NSEC struct iio_buffer; drivers/iio/industrialio-core.c should remove these lines: - #include // lines 24-24 - #include // lines 33-33 - #include // lines 34-34 - #include // lines 32-32 - #include // lines 18-18 - #include // lines 20-20 - #include // lines 21-21 The full include-list for drivers/iio/industrialio-core.c: #include // for WARN #include // for cdev_init, cdev_... #include // for debugfs_create_dir #include // for device, device_a... #include // for IS_ERR, PTR_ERR #include // for noop_llseek, inode #include // for DEFINE_IDA, ida_... #include // for iio_dev_opaque #include // for iio_dev, iio_cha... #include // for iio_dev_attr #include // for MAJOR, MKDEV #include // for kasprintf, sscanf #include // for ktime_get_bootti... #include // for MODULE_AUTHOR #include // for mutex_unlock #include // for device_property_... #include // for kfree, kzalloc #include // for NULL, size_t #include // for uintptr_t #include // for ssize_t, dev_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, test_... #include "asm-generic/errno-base.h" // for EINVAL, EBUSY #include "asm-generic/int-ll64.h" // for s64, u64 #include "asm/bug.h" // for BUG #include "asm/page_types.h" // for PAGE_SIZE #include "asm/string_64.h" // for memcpy #include "generated/autoconf.h" // for CONFIG_DEBUG_FS #include "iio_core.h" // for iio_ioctl_handler #include "iio_core_trigger.h" // for iio_device_regis... #include "linux/align.h" // for ALIGN #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_attributes.h" // for fallthrough #include "linux/compiler_types.h" // for __user #include "linux/dev_printk.h" // for dev_err, dev_info #include "linux/device/bus.h" // for bus_unregister #include "linux/export.h" // for EXPORT_SYMBOL_GPL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/hrtimer.h" // for hrtimer_resolution #include "linux/iio/types.h" // for IIO_VAL_INT, IIO... #include "linux/init.h" // for __exit, __init #include "linux/kstrtox.h" // for kstrtoint #include "linux/ktime.h" // for ktime_to_ns #include "linux/list.h" // for INIT_LIST_HEAD #include "linux/math.h" // for abs #include "linux/math64.h" // for div_s64_rem, div... #include "linux/minmax.h" // for min_t #include "linux/of.h" // for of_get_property #include "linux/printk.h" // for pr_err #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stddef.h" // for false, true #include "linux/string.h" // for sysfs_streq, str... #include "linux/sysfs.h" // for sysfs_emit_at #include "linux/time.h" // for CLOCK_BOOTTIME #include "linux/time64.h" // for timespec64_to_ns #include "linux/timex.h" // for shift_right #include "linux/types.h" // for list_head, bool #include "linux/uaccess.h" // for copy_from_user #include "vdso/ktime.h" // for LOW_RES_NSEC struct iio_buffer; drivers/iio/industrialio-configfs.c should add these lines: #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex, __MUTEX_INITIALIZER drivers/iio/industrialio-configfs.c should remove these lines: - #include // lines 15-15 - #include // lines 14-14 - #include // lines 11-11 - #include // lines 12-12 The full include-list for drivers/iio/industrialio-configfs.c: #include // for configfs_subsystem, config_group_init #include // for __exit, __init #include // for MODULE_AUTHOR, MODULE_DESCRIPTION, MODUL... #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex, __MUTEX_INITIALIZER drivers/iio/inkern.c should add these lines: #include // for NULL, size_t #include // for uint32_t #include // for ssize_t #include "asm-generic/errno-base.h" // for ENODEV, EINVAL, ENOMEM #include "asm-generic/int-ll64.h" // for s64 #include "generated/autoconf.h" // for CONFIG_OF #include "linux/dev_printk.h" // for dev_err #include "linux/device.h" // for devm_add_action_or_reset, dev_name #include "linux/device/bus.h" // for bus_find_device #include "linux/errno.h" // for EPROBE_DEFER #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/types.h" // for iio_chan_info_enum, IIO_CHAN_INF... #include "linux/list.h" // for list_add_tail, list_del, list_fo... #include "linux/math64.h" // for div_s64 #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strcmp #include "linux/types.h" // for list_head drivers/iio/inkern.c should remove these lines: The full include-list for drivers/iio/inkern.c: #include // for ERR_PTR, IS_ERR, PTR_ERR #include // for EXPORT_SYMBOL_GPL #include // for iio_channel, devm_iio_channel_get #include // for devm_iio_map_array_register, iio... #include // for iio_dev_opaque, to_iio_dev_opaque #include // for iio_dev, iio_device_put, iio_cha... #include // for iio_map #include // for mutex_unlock, mutex_lock, mutex #include // for of_phandle_args, of_parse_phandl... #include // for kfree, kzalloc, kcalloc #include // for NULL, size_t #include // for uint32_t #include // for ssize_t #include "asm-generic/errno-base.h" // for ENODEV, EINVAL, ENOMEM #include "asm-generic/int-ll64.h" // for s64 #include "generated/autoconf.h" // for CONFIG_OF #include "iio_core.h" // for iio_device_type #include "linux/dev_printk.h" // for dev_err #include "linux/device.h" // for devm_add_action_or_reset, dev_name #include "linux/device/bus.h" // for bus_find_device #include "linux/errno.h" // for EPROBE_DEFER #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/types.h" // for iio_chan_info_enum, IIO_CHAN_INF... #include "linux/list.h" // for list_add_tail, list_del, list_fo... #include "linux/math64.h" // for div_s64 #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strcmp #include "linux/types.h" // for list_head drivers/iio/industrialio-sw-device.c should add these lines: #include // for NULL #include "asm-generic/errno-base.h" // for EBUSY, EINVAL #include "linux/err.h" // for IS_ERR, ERR_CAST, ERR_PTR, PTR_ERR #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex_lock, mutex_unlock, mutex #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strlen, strcmp #include "linux/types.h" // for list_head drivers/iio/industrialio-sw-device.c should remove these lines: - #include // lines 10-10 - #include // lines 12-12 The full include-list for drivers/iio/industrialio-sw-device.c: #include // for configfs_register_default_group #include // for iio_configfs_subsys #include // for iio_sw_device_type, iio_sw_device #include // for __exit, __init #include // for list_add_tail, list_del, LIST_HEAD #include // for module_put, try_module_get, MODU... #include // for NULL #include "asm-generic/errno-base.h" // for EBUSY, EINVAL #include "linux/err.h" // for IS_ERR, ERR_CAST, ERR_PTR, PTR_ERR #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex_lock, mutex_unlock, mutex #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strlen, strcmp #include "linux/types.h" // for list_head drivers/iio/industrialio-trigger.c should add these lines: #include // for WARN_ON #include // for generic_handle_irq #include // for va_list #include // for NULL, size_t #include // for ssize_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit #include "asm-generic/errno-base.h" // for EINVAL, EBUSY #include "generated/autoconf.h" // for CONFIG_IIO_CONSU... #include "linux/atomic/atomic-instrumented.h" // for atomic_read, ato... #include "linux/bitmap.h" // for bitmap_empty #include "linux/compiler_attributes.h" // for __printf #include "linux/export.h" // for EXPORT_SYMBOL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/irq.h" // for irq_data_get_irq... #include "linux/irqreturn.h" // for irqreturn_t, IRQ... #include "linux/log2.h" // for ilog2 #include "linux/module.h" // for module_put, __mo... #include "linux/mutex.h" // for mutex_unlock #include "linux/printk.h" // for pr_err #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stdarg.h" // for va_end, va_start #include "linux/stddef.h" // for true, false #include "linux/string.h" // for strcmp, sysfs_streq #include "linux/sysfs.h" // for sysfs_emit, ATTR... #include "linux/types.h" // for list_head, bool drivers/iio/industrialio-trigger.c should remove these lines: - #include // lines 9-9 The full include-list for drivers/iio/industrialio-trigger.c: #include // for WARN_ON #include // for device, device_del #include // for ida_simple_remove #include // for iio_dev_opaque #include // for iio_dev, dev_to_... #include // for iio_trigger, iio... #include // for iio_poll_func #include // for free_irq, reques... #include // for generic_handle_irq #include // for kvasprintf, cont... #include // for list_add_tail #include // for kfree, kmalloc #include // for va_list #include // for NULL, size_t #include // for ssize_t #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit #include "asm-generic/errno-base.h" // for EINVAL, EBUSY #include "generated/autoconf.h" // for CONFIG_IIO_CONSU... #include "iio_core.h" // for iio_device_regis... #include "iio_core_trigger.h" // for iio_device_regis... #include "linux/atomic/atomic-instrumented.h" // for atomic_read, ato... #include "linux/bitmap.h" // for bitmap_empty #include "linux/compiler_attributes.h" // for __printf #include "linux/export.h" // for EXPORT_SYMBOL #include "linux/gfp.h" // for GFP_KERNEL #include "linux/irq.h" // for irq_data_get_irq... #include "linux/irqreturn.h" // for irqreturn_t, IRQ... #include "linux/log2.h" // for ilog2 #include "linux/module.h" // for module_put, __mo... #include "linux/mutex.h" // for mutex_unlock #include "linux/printk.h" // for pr_err #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stdarg.h" // for va_end, va_start #include "linux/stddef.h" // for true, false #include "linux/string.h" // for strcmp, sysfs_streq #include "linux/sysfs.h" // for sysfs_emit, ATTR... #include "linux/types.h" // for list_head, bool drivers/iio/industrialio-sw-trigger.c should add these lines: #include // for NULL #include "asm-generic/errno-base.h" // for EBUSY, EINVAL #include "linux/err.h" // for IS_ERR, ERR_CAST, ERR_PTR, PTR_ERR #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex_lock, mutex_unlock, mutex #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strlen, strcmp #include "linux/types.h" // for list_head drivers/iio/industrialio-sw-trigger.c should remove these lines: - #include // lines 10-10 - #include // lines 12-12 The full include-list for drivers/iio/industrialio-sw-trigger.c: #include // for configfs_register_default_group #include // for iio_configfs_subsys #include // for iio_sw_trigger_type, iio_sw_trigger #include // for __exit, __init #include // for list_add_tail, list_del, LIST_HEAD #include // for module_put, try_module_get, MODU... #include // for NULL #include "asm-generic/errno-base.h" // for EBUSY, EINVAL #include "linux/err.h" // for IS_ERR, ERR_CAST, ERR_PTR, PTR_ERR #include "linux/export.h" // for EXPORT_SYMBOL, THIS_MODULE #include "linux/mutex.h" // for mutex_lock, mutex_unlock, mutex #include "linux/printk.h" // for pr_err #include "linux/string.h" // for strlen, strcmp #include "linux/types.h" // for list_head drivers/iio/industrialio-buffer.c should add these lines: #include // for test_bit #include // for WARN #include // for size_t, NULL #include // for ssize_t #include "asm-generic/bitops/find.h" // for find_next_bit #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, set_bit #include "asm-generic/errno-base.h" // for ENOMEM, EINVAL #include "asm-generic/fcntl.h" // for O_NONBLOCK, O_CL... #include "asm-generic/int-ll64.h" // for u8 #include "asm/current.h" // for current #include "asm/string_64.h" // for memcpy, memset #include "linux/align.h" // for ALIGN #include "linux/bitmap.h" // for bitmap_free, bit... #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_types.h" // for __user #include "linux/dev_printk.h" // for dev_dbg #include "linux/errno.h" // for ERESTARTSYS #include "linux/eventpoll.h" // for EPOLLIN, EPOLLRD... #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/buffer.h" // for IIO_BUFFER_GET_F... #include "linux/iio/types.h" // for IIO_TIMESTAMP #include "linux/kconfig.h" // for __LITTLE_ENDIAN #include "linux/kref.h" // for kref_get, kref_init #include "linux/kstrtox.h" // for strtobool, kstrt... #include "linux/list.h" // for list_empty, INIT... #include "linux/math.h" // for roundup #include "linux/minmax.h" // for max, min, min_t #include "linux/mutex.h" // for mutex_lock, mute... #include "linux/sched.h" // for MAX_SCHEDULE_TIM... #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stddef.h" // for false, true #include "linux/string.h" // for kstrdup_const #include "linux/sysfs.h" // for sysfs_emit, attr... #include "linux/types.h" // for list_head, bool #include "linux/uaccess.h" // for copy_from_user #include "linux/wait.h" // for woken_wake_function drivers/iio/industrialio-buffer.c should remove these lines: - #include // lines 18-18 The full include-list for drivers/iio/industrialio-buffer.c: #include // for test_bit #include // for WARN #include // for anon_inode_getfd #include // for device_attribute #include // for EXPORT_SYMBOL_GPL #include // for put_unused_fd #include // for file, noop_llseek #include // for iio_device_attac... #include // for iio_buffer, iio_... #include // for iio_dev_opaque #include // for iio_dev, iio_cha... #include // for iio_dev_attr #include // for ARRAY_SIZE, cont... #include // for poll_wait #include // for signal_pending #include // for kfree, kzalloc #include // for size_t, NULL #include // for ssize_t #include "asm-generic/bitops/find.h" // for find_next_bit #include "asm-generic/bitops/instrumented-atomic.h" // for clear_bit, set_bit #include "asm-generic/errno-base.h" // for ENOMEM, EINVAL #include "asm-generic/fcntl.h" // for O_NONBLOCK, O_CL... #include "asm-generic/int-ll64.h" // for u8 #include "asm/current.h" // for current #include "asm/string_64.h" // for memcpy, memset #include "iio_core.h" // for __iio_add_chan_d... #include "iio_core_trigger.h" // for iio_trigger_deta... #include "linux/align.h" // for ALIGN #include "linux/bitmap.h" // for bitmap_free, bit... #include "linux/bitops.h" // for for_each_set_bit #include "linux/compiler_types.h" // for __user #include "linux/dev_printk.h" // for dev_dbg #include "linux/errno.h" // for ERESTARTSYS #include "linux/eventpoll.h" // for EPOLLIN, EPOLLRD... #include "linux/gfp.h" // for GFP_KERNEL #include "linux/iio/buffer.h" // for IIO_BUFFER_GET_F... #include "linux/iio/types.h" // for IIO_TIMESTAMP #include "linux/kconfig.h" // for __LITTLE_ENDIAN #include "linux/kref.h" // for kref_get, kref_init #include "linux/kstrtox.h" // for strtobool, kstrt... #include "linux/list.h" // for list_empty, INIT... #include "linux/math.h" // for roundup #include "linux/minmax.h" // for max, min, min_t #include "linux/mutex.h" // for mutex_lock, mute... #include "linux/sched.h" // for MAX_SCHEDULE_TIM... #include "linux/stat.h" // for S_IRUGO, S_IWUSR #include "linux/stddef.h" // for false, true #include "linux/string.h" // for kstrdup_const #include "linux/sysfs.h" // for sysfs_emit, attr... #include "linux/types.h" // for list_head, bool #include "linux/uaccess.h" // for copy_from_user #include "linux/wait.h" // for woken_wake_function Jonathan Cameron (11): iio: industrialio-core: Reorder header includes to be alphabetical. iio: industrialio-core - Bring includes up to date. iio: industrialio-buffer.c: Bring includes up to date. iio: industrialio-event.c: Bring includes up to date. iio: industrialio-trigger.c: Bring includes up to date. iio: inkern: Bring includes up to date. iio: configfs: Bring includes up to date iio: misc core files: Bring includes up to date iio: industrialio-triggered-buffer: Bring includes up to date. iio: industrialio-buffer-cb: Bring includes up to date. iio: kfifo-buf.c: Bring includes up to date. drivers/iio/buffer/industrialio-buffer-cb.c | 7 +++- .../buffer/industrialio-triggered-buffer.c | 6 ++- drivers/iio/buffer/kfifo_buf.c | 15 ++++--- drivers/iio/industrialio-buffer.c | 23 ++++++++-- drivers/iio/industrialio-configfs.c | 7 ++-- drivers/iio/industrialio-core.c | 42 ++++++++++++------- drivers/iio/industrialio-event.c | 9 +++- drivers/iio/industrialio-sw-device.c | 8 ++-- drivers/iio/industrialio-sw-trigger.c | 9 ++-- drivers/iio/industrialio-trigger.c | 15 +++++-- drivers/iio/industrialio-triggered-event.c | 3 +- drivers/iio/inkern.c | 7 +++- 12 files changed, 107 insertions(+), 44 deletions(-)