Message ID | 20190208160944.13281-5-gregory.clement@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Adding scale support to the lpc32xx ADC driver | expand |
On Fri, 8 Feb 2019 17:09:43 +0100 Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > A few headers was useless: remove them, and also sort them in alphabetic > order. > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Hmm. Given the headers in question are mostly only useless (I think) in the sense they are always included by something else, I'm not sure this patch is worth the churn. It's also tricky to see which ones were actually removed given the combination with sorting. I think it's just kernel.h, device.h, err.h all of which are used in various ways and often directly included. The other one is the iio/sysfs.h file. That one we could do to eventually kill off entirely, so happy to see that one alone go. Jonathan > --- > drivers/iio/adc/lpc32xx_adc.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c > index e361c1532a75..f391c1e10136 100644 > --- a/drivers/iio/adc/lpc32xx_adc.c > +++ b/drivers/iio/adc/lpc32xx_adc.c > @@ -7,20 +7,13 @@ > * Copyright (C) 2011, 2012 Roland Stigge <stigge@antcom.de> > */ > > -#include <linux/module.h> > -#include <linux/platform_device.h> > -#include <linux/interrupt.h> > -#include <linux/device.h> > -#include <linux/kernel.h> > -#include <linux/slab.h> > -#include <linux/io.h> > #include <linux/clk.h> > -#include <linux/err.h> > #include <linux/completion.h> > -#include <linux/of.h> > - > #include <linux/iio/iio.h> > -#include <linux/iio/sysfs.h> > +#include <linux/interrupt.h> > +#include <linux/io.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > > /* > * LPC32XX registers definitions
Hi Jonathan, On sam., févr. 09 2019, Jonathan Cameron <jic23@kernel.org> wrote: > On Fri, 8 Feb 2019 17:09:43 +0100 > Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > >> A few headers was useless: remove them, and also sort them in alphabetic >> order. >> >> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> > Hmm. Given the headers in question are mostly only useless (I think) > in the sense they are always included by something else, I'm > not sure this patch is worth the churn. > > It's also tricky to see which ones were actually removed > given the combination with sorting. > I think it's just kernel.h, device.h, err.h all of which > are used in various ways and often directly included. Actually, as I needed to add a header, I wanted to sort the list to put it in the right place and then some of the header looked superfluous that why I remove some of them. For example there was no reason to use slab.h or of.h. > > The other one is the iio/sysfs.h file. That one we could > do to eventually kill off entirely, so happy to see that > one alone go. I am nit sure to know what do you want with this patch. Gregory > > Jonathan > >> --- >> drivers/iio/adc/lpc32xx_adc.c | 15 ++++----------- >> 1 file changed, 4 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c >> index e361c1532a75..f391c1e10136 100644 >> --- a/drivers/iio/adc/lpc32xx_adc.c >> +++ b/drivers/iio/adc/lpc32xx_adc.c >> @@ -7,20 +7,13 @@ >> * Copyright (C) 2011, 2012 Roland Stigge <stigge@antcom.de> >> */ >> >> -#include <linux/module.h> >> -#include <linux/platform_device.h> >> -#include <linux/interrupt.h> >> -#include <linux/device.h> >> -#include <linux/kernel.h> >> -#include <linux/slab.h> >> -#include <linux/io.h> >> #include <linux/clk.h> >> -#include <linux/err.h> >> #include <linux/completion.h> >> -#include <linux/of.h> >> - >> #include <linux/iio/iio.h> >> -#include <linux/iio/sysfs.h> >> +#include <linux/interrupt.h> >> +#include <linux/io.h> >> +#include <linux/module.h> >> +#include <linux/platform_device.h> >> >> /* >> * LPC32XX registers definitions > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, 15 Feb 2019 16:42:55 +0100 Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > Hi Jonathan, > > On sam., févr. 09 2019, Jonathan Cameron <jic23@kernel.org> wrote: > > > On Fri, 8 Feb 2019 17:09:43 +0100 > > Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > > > >> A few headers was useless: remove them, and also sort them in alphabetic > >> order. > >> > >> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> > > Hmm. Given the headers in question are mostly only useless (I think) > > in the sense they are always included by something else, I'm > > not sure this patch is worth the churn. > > > > It's also tricky to see which ones were actually removed > > given the combination with sorting. > > I think it's just kernel.h, device.h, err.h all of which > > are used in various ways and often directly included. > > Actually, as I needed to add a header, I wanted to sort the list to put > it in the right place and then some of the header looked superfluous > that why I remove some of them. For example there was no reason to use > slab.h or of.h. Agreed on those two. I missed them probably because of the re organization being combined with them. No specific allocations except via interfaces from elsewhere and no direct use of the devicetree stuff, so fine to drop them. > > > > > The other one is the iio/sysfs.h file. That one we could > > do to eventually kill off entirely, so happy to see that > > one alone go. > > I am nit sure to know what do you want with this patch. Break it in two. Drop the unwanted ones first, then reorganize. That way the diff is easy to read. Clearly I missed some changes on my first read as it stands! Jonathan > > Gregory > > > > > > Jonathan > > > >> --- > >> drivers/iio/adc/lpc32xx_adc.c | 15 ++++----------- > >> 1 file changed, 4 insertions(+), 11 deletions(-) > >> > >> diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c > >> index e361c1532a75..f391c1e10136 100644 > >> --- a/drivers/iio/adc/lpc32xx_adc.c > >> +++ b/drivers/iio/adc/lpc32xx_adc.c > >> @@ -7,20 +7,13 @@ > >> * Copyright (C) 2011, 2012 Roland Stigge <stigge@antcom.de> > >> */ > >> > >> -#include <linux/module.h> > >> -#include <linux/platform_device.h> > >> -#include <linux/interrupt.h> > >> -#include <linux/device.h> > >> -#include <linux/kernel.h> > >> -#include <linux/slab.h> > >> -#include <linux/io.h> > >> #include <linux/clk.h> > >> -#include <linux/err.h> > >> #include <linux/completion.h> > >> -#include <linux/of.h> > >> - > >> #include <linux/iio/iio.h> > >> -#include <linux/iio/sysfs.h> > >> +#include <linux/interrupt.h> > >> +#include <linux/io.h> > >> +#include <linux/module.h> > >> +#include <linux/platform_device.h> > >> > >> /* > >> * LPC32XX registers definitions > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >
diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c index e361c1532a75..f391c1e10136 100644 --- a/drivers/iio/adc/lpc32xx_adc.c +++ b/drivers/iio/adc/lpc32xx_adc.c @@ -7,20 +7,13 @@ * Copyright (C) 2011, 2012 Roland Stigge <stigge@antcom.de> */ -#include <linux/module.h> -#include <linux/platform_device.h> -#include <linux/interrupt.h> -#include <linux/device.h> -#include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/io.h> #include <linux/clk.h> -#include <linux/err.h> #include <linux/completion.h> -#include <linux/of.h> - #include <linux/iio/iio.h> -#include <linux/iio/sysfs.h> +#include <linux/interrupt.h> +#include <linux/io.h> +#include <linux/module.h> +#include <linux/platform_device.h> /* * LPC32XX registers definitions
A few headers was useless: remove them, and also sort them in alphabetic order. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> --- drivers/iio/adc/lpc32xx_adc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)