Message ID | 20210611142918.103708-1-jic23@kernel.org (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | iio: core: Cleanup includes | expand |
On Fri, 11 Jun 2021 15:29:18 +0100 Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Result of considering output of the include-what-you-use static checker. > Note that there are rarely hard rules on when particular headers should > be included. This series attempts to go for some level of consistency. > > Some headers were simiply not used, mostly as a result of rework that > didn't include updating them. Some others were missing that probably > should have been there from the start (mutex.h, list.h etc) > because their functionality was directly used in the file. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Alexandru Ardelean <ardeleanalex@gmail.com> Sorry. Ignore this one. I missed some includes in headers that should have been in this patch. Will do a v2 shortly. > --- > drivers/iio/industrialio-buffer.c | 2 +- > drivers/iio/industrialio-configfs.c | 6 ++---- > drivers/iio/industrialio-core.c | 7 ------- > drivers/iio/industrialio-event.c | 1 - > drivers/iio/industrialio-sw-device.c | 5 ++--- > drivers/iio/industrialio-sw-trigger.c | 5 ++--- > drivers/iio/inkern.c | 1 + > 7 files changed, 8 insertions(+), 19 deletions(-) > > diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c > index fdd623407b96..e67c6c636044 100644 > --- a/drivers/iio/industrialio-buffer.c > +++ b/drivers/iio/industrialio-buffer.c > @@ -15,7 +15,7 @@ > #include <linux/device.h> > #include <linux/file.h> > #include <linux/fs.h> > -#include <linux/cdev.h> > +#include <linux/mutex.h> > #include <linux/slab.h> > #include <linux/poll.h> > #include <linux/sched/signal.h> > diff --git a/drivers/iio/industrialio-configfs.c b/drivers/iio/industrialio-configfs.c > index 47900de1f105..f3db62aa9be6 100644 > --- a/drivers/iio/industrialio-configfs.c > +++ b/drivers/iio/industrialio-configfs.c > @@ -6,12 +6,10 @@ > */ > > #include <linux/configfs.h> > -#include <linux/module.h> > #include <linux/init.h> > -#include <linux/kmod.h> > -#include <linux/slab.h> > +#include <linux/module.h> > +#include <linux/mutex.h> > > -#include <linux/iio/iio.h> > #include <linux/iio/configfs.h> > > static const struct config_item_type iio_root_group_type = { > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c > index 6d2175eb7af2..c1113add619b 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -15,13 +15,9 @@ > #include <linux/err.h> > #include <linux/device.h> > #include <linux/fs.h> > -#include <linux/poll.h> > #include <linux/property.h> > -#include <linux/sched.h> > -#include <linux/wait.h> > #include <linux/cdev.h> > #include <linux/slab.h> > -#include <linux/anon_inodes.h> > #include <linux/debugfs.h> > #include <linux/mutex.h> > #include <linux/iio/iio.h> > @@ -29,9 +25,6 @@ > #include "iio_core.h" > #include "iio_core_trigger.h" > #include <linux/iio/sysfs.h> > -#include <linux/iio/events.h> > -#include <linux/iio/buffer.h> > -#include <linux/iio/buffer_impl.h> > > /* IDA to assign each registered device a unique id */ > static DEFINE_IDA(iio_ida); > diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c > index d0732eac0f0a..48c9a1479b83 100644 > --- a/drivers/iio/industrialio-event.c > +++ b/drivers/iio/industrialio-event.c > @@ -13,7 +13,6 @@ > #include <linux/kfifo.h> > #include <linux/module.h> > #include <linux/poll.h> > -#include <linux/sched.h> > #include <linux/slab.h> > #include <linux/uaccess.h> > #include <linux/wait.h> > diff --git a/drivers/iio/industrialio-sw-device.c b/drivers/iio/industrialio-sw-device.c > index 49f775f16ad5..0c00bdcc0e88 100644 > --- a/drivers/iio/industrialio-sw-device.c > +++ b/drivers/iio/industrialio-sw-device.c > @@ -5,11 +5,10 @@ > * Copyright (c) 2016 Intel Corporation > */ > > -#include <linux/module.h> > #include <linux/init.h> > -#include <linux/kmod.h> > #include <linux/list.h> > -#include <linux/slab.h> > +#include <linux/module.h> > +#include <linux/mutex.h> > > #include <linux/iio/sw_device.h> > #include <linux/iio/configfs.h> > diff --git a/drivers/iio/industrialio-sw-trigger.c b/drivers/iio/industrialio-sw-trigger.c > index 9ae793a70b8b..a8ab461be373 100644 > --- a/drivers/iio/industrialio-sw-trigger.c > +++ b/drivers/iio/industrialio-sw-trigger.c > @@ -5,11 +5,10 @@ > * Copyright (c) 2015 Intel Corporation > */ > > -#include <linux/module.h> > #include <linux/init.h> > -#include <linux/kmod.h> > #include <linux/list.h> > -#include <linux/slab.h> > +#include <linux/module.h> > +#include <linux/mutex.h> > > #include <linux/iio/sw_trigger.h> > #include <linux/iio/configfs.h> > diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c > index 391a3380a1d1..c2fc6cdc1c8c 100644 > --- a/drivers/iio/inkern.c > +++ b/drivers/iio/inkern.c > @@ -6,6 +6,7 @@ > #include <linux/err.h> > #include <linux/export.h> > #include <linux/slab.h> > +#include <linux/list.h> > #include <linux/mutex.h> > #include <linux/of.h> >
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index fdd623407b96..e67c6c636044 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -15,7 +15,7 @@ #include <linux/device.h> #include <linux/file.h> #include <linux/fs.h> -#include <linux/cdev.h> +#include <linux/mutex.h> #include <linux/slab.h> #include <linux/poll.h> #include <linux/sched/signal.h> diff --git a/drivers/iio/industrialio-configfs.c b/drivers/iio/industrialio-configfs.c index 47900de1f105..f3db62aa9be6 100644 --- a/drivers/iio/industrialio-configfs.c +++ b/drivers/iio/industrialio-configfs.c @@ -6,12 +6,10 @@ */ #include <linux/configfs.h> -#include <linux/module.h> #include <linux/init.h> -#include <linux/kmod.h> -#include <linux/slab.h> +#include <linux/module.h> +#include <linux/mutex.h> -#include <linux/iio/iio.h> #include <linux/iio/configfs.h> static const struct config_item_type iio_root_group_type = { diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 6d2175eb7af2..c1113add619b 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -15,13 +15,9 @@ #include <linux/err.h> #include <linux/device.h> #include <linux/fs.h> -#include <linux/poll.h> #include <linux/property.h> -#include <linux/sched.h> -#include <linux/wait.h> #include <linux/cdev.h> #include <linux/slab.h> -#include <linux/anon_inodes.h> #include <linux/debugfs.h> #include <linux/mutex.h> #include <linux/iio/iio.h> @@ -29,9 +25,6 @@ #include "iio_core.h" #include "iio_core_trigger.h" #include <linux/iio/sysfs.h> -#include <linux/iio/events.h> -#include <linux/iio/buffer.h> -#include <linux/iio/buffer_impl.h> /* IDA to assign each registered device a unique id */ static DEFINE_IDA(iio_ida); diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c index d0732eac0f0a..48c9a1479b83 100644 --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@ -13,7 +13,6 @@ #include <linux/kfifo.h> #include <linux/module.h> #include <linux/poll.h> -#include <linux/sched.h> #include <linux/slab.h> #include <linux/uaccess.h> #include <linux/wait.h> diff --git a/drivers/iio/industrialio-sw-device.c b/drivers/iio/industrialio-sw-device.c index 49f775f16ad5..0c00bdcc0e88 100644 --- a/drivers/iio/industrialio-sw-device.c +++ b/drivers/iio/industrialio-sw-device.c @@ -5,11 +5,10 @@ * Copyright (c) 2016 Intel Corporation */ -#include <linux/module.h> #include <linux/init.h> -#include <linux/kmod.h> #include <linux/list.h> -#include <linux/slab.h> +#include <linux/module.h> +#include <linux/mutex.h> #include <linux/iio/sw_device.h> #include <linux/iio/configfs.h> diff --git a/drivers/iio/industrialio-sw-trigger.c b/drivers/iio/industrialio-sw-trigger.c index 9ae793a70b8b..a8ab461be373 100644 --- a/drivers/iio/industrialio-sw-trigger.c +++ b/drivers/iio/industrialio-sw-trigger.c @@ -5,11 +5,10 @@ * Copyright (c) 2015 Intel Corporation */ -#include <linux/module.h> #include <linux/init.h> -#include <linux/kmod.h> #include <linux/list.h> -#include <linux/slab.h> +#include <linux/module.h> +#include <linux/mutex.h> #include <linux/iio/sw_trigger.h> #include <linux/iio/configfs.h> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 391a3380a1d1..c2fc6cdc1c8c 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -6,6 +6,7 @@ #include <linux/err.h> #include <linux/export.h> #include <linux/slab.h> +#include <linux/list.h> #include <linux/mutex.h> #include <linux/of.h>