iio: adc: spear_adc: cleans up, update and sorts the existing includes
PATCH v3 1/1 iio: adc: spear_adc: cleans up, update and sorts the existing includes
Remove unused includes and add what is being used (IWYU principle) and sort the remaining ones.
---
Hi, all,
Revisiting this, sorry for the delay.
Quoted 2 lines
+#include <
linux/of.h>
Why includeof.h?
Double-checked, we don't need that.
Quoted 3 lines
For these, given we've been round a few times, it is useful to add a brief on what is being used from each header in this change log or indeed the patch description.
For the record, what was added:
#include <linux/array_size.h> // for ARRAY_SIZE #include <linux/bits.h> // for GENMASKxx
#include <linux/dev_printk.h> // for dev_err_probe, dev_info #include <linux/math.h> // for DIV_ROUND_UP #include <linux/mutex.h> // for struct mutex #include <linux/types.h> // for uXX defitinions
Changelog:
v3: removed of.h/compiler_types.h
added types.h
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
Tks and regards.
--- drivers/iio/adc/spear_adc.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-)
drivers/iio/adc/spear_adc.c +14 -11
@@ -5,22 +5,25 @@* Copyright 2012 Stefan Roese <[email protected]> */ -#include <linux/mod_devicetable.h> -#include <linux/module.h> -#include <linux/platform_device.h> -#include <linux/property.h> -#include <linux/interrupt.h> -#include <linux/device.h> -#include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/io.h> +#include <linux/array_size.h> #include <linux/bitfield.h> +#include <linux/bits.h> #include <linux/clk.h> -#include <linux/err.h> #include <linux/completion.h> +#include <linux/dev_printk.h> +#include <linux/err.h> +#include <linux/interrupt.h> +#include <linux/io.h> +#include <linux/math.h> +#include <linux/module.h> +#include <linux/mod_devicetable.h> +#include <linux/mutex.h> +#include <linux/platform_device.h> +#include <linux/property.h> +#include <linux/types.h> #include <linux/iio/iio.h> -#include <linux/iio/sysfs.h> +#include <linux/iio/types.h> /* SPEAR registers definitions */ #define SPEAR600_ADC_SCAN_RATE_LO (x) ((x) & 0xFFFF)
Signature · 1 line
2.48.1
Quoted 2 lines · Rodrigo Gobbi
Remove unused includes and add what is being used (IWYU principle) and sort the remaining ones.
Thanks, make it two patches:
1: sort headers
2: apply IWYU
Signature · 2 lines
With Best Regards, Andy Shevchenko