diff mbox

[PATCHv7] media: i2c/adp1653: fix includes

Message ID 20150409123155.GB9563@amd (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Machek April 9, 2015, 12:31 p.m. UTC
Fix includes according to Sebastian.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

---

On Thu 2015-04-09 14:19:14, Sebastian Reichel wrote:
> On Thu, Apr 09, 2015 at 01:29:43PM +0200, Pavel Machek wrote:
> > On Thu 2015-04-09 11:10:17, Sebastian Reichel wrote:
> > > On Thu, Apr 09, 2015 at 09:42:38AM +0200, Pavel Machek wrote:
> > > > [...]
> > > > +#include <linux/of_gpio.h>
> > > > +#include <linux/gpio.h>
> > > > [...]
> > > 
> > > This should probably be
> > > 
> > > #include <linux/of.h>
> > > #include <linux/gpio/consumer.h>
> > 
> > And I thought people would only bikesched paint on the
> > Documentation. Sakari, feel free to change that, but
> 
> > a) I don't see why Sebastian's version is better
> 
> You neither use <linux/of_gpio.h> nor <linux/gpio.h>.
> 
> Well "include/linux/gpio.h" describes the old gpio API. The new
> gpiod gpiod API is described in "include/linux/gpio/consumer.h" and
> you use it, so the include should be included ;)
> 
> You don't use anything from "include/linux/of_gpio.h", but it
> includes "include/linux/of.h", which you are using. So you should
> include <linux/of.h> instead ;)

Comments

Javier Martinez Canillas April 9, 2015, 12:43 p.m. UTC | #1
Hello Pavel,

On Thu, Apr 9, 2015 at 2:31 PM, Pavel Machek <pavel@ucw.cz> wrote:
> Fix includes according to Sebastian.
>
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
>
> ---
>
> On Thu 2015-04-09 14:19:14, Sebastian Reichel wrote:
>> On Thu, Apr 09, 2015 at 01:29:43PM +0200, Pavel Machek wrote:
>> > On Thu 2015-04-09 11:10:17, Sebastian Reichel wrote:
>> > > On Thu, Apr 09, 2015 at 09:42:38AM +0200, Pavel Machek wrote:
>> > > > [...]
>> > > > +#include <linux/of_gpio.h>
>> > > > +#include <linux/gpio.h>
>> > > > [...]
>> > >
>> > > This should probably be
>> > >
>> > > #include <linux/of.h>
>> > > #include <linux/gpio/consumer.h>
>> >
>> > And I thought people would only bikesched paint on the
>> > Documentation. Sakari, feel free to change that, but
>>
>> > a) I don't see why Sebastian's version is better
>>
>> You neither use <linux/of_gpio.h> nor <linux/gpio.h>.
>>
>> Well "include/linux/gpio.h" describes the old gpio API. The new
>> gpiod gpiod API is described in "include/linux/gpio/consumer.h" and
>> you use it, so the include should be included ;)
>>
>> You don't use anything from "include/linux/of_gpio.h", but it
>> includes "include/linux/of.h", which you are using. So you should
>> include <linux/of.h> instead ;)
>
> diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
> index d703636..7107ac2 100644
> --- a/drivers/media/i2c/adp1653.c
> +++ b/drivers/media/i2c/adp1653.c
> @@ -35,8 +35,8 @@
>  #include <linux/module.h>
>  #include <linux/i2c.h>
>  #include <linux/slab.h>
> -#include <linux/of_gpio.h>
> -#include <linux/gpio.h>
> +#include <linux/of.h>
> +#include <linux/gpio/consumer.h>
>  #include <media/adp1653.h>
>  #include <media/v4l2-device.h>
>

Please re-spin your previous patch and submit it properly.

Best regards,
Javier
Pali Rohár April 9, 2015, 12:59 p.m. UTC | #2
On Thursday 09 April 2015 14:43:59 Javier Martinez Canillas wrote:
> Hello Pavel,
> 
> >
> > diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
> > index d703636..7107ac2 100644
> > --- a/drivers/media/i2c/adp1653.c
> > +++ b/drivers/media/i2c/adp1653.c
> > @@ -35,8 +35,8 @@
> >  #include <linux/module.h>
> >  #include <linux/i2c.h>
> >  #include <linux/slab.h>
> > -#include <linux/of_gpio.h>
> > -#include <linux/gpio.h>
> > +#include <linux/of.h>
> > +#include <linux/gpio/consumer.h>
> >  #include <media/adp1653.h>
> >  #include <media/v4l2-device.h>
> >
> 
> Please re-spin your previous patch and submit it properly.
> 
> Best regards,
> Javier

Hi all! What about stopping this meaningless discussion about resending
full patch series when everybody know how to fix is quickly in editor
(e.g with sed under 5s) and not wasting another 10 minutes to generate
new unified diff sent via SMTP protocol?
Javier Martinez Canillas April 13, 2015, 8:32 a.m. UTC | #3
Hello Pali,

On Thu, Apr 9, 2015 at 2:59 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Thursday 09 April 2015 14:43:59 Javier Martinez Canillas wrote:
>>
>> Please re-spin your previous patch and submit it properly.
>>
>> Best regards,
>> Javier
>
> Hi all! What about stopping this meaningless discussion about resending
> full patch series when everybody know how to fix is quickly in editor
> (e.g with sed under 5s) and not wasting another 10 minutes to generate
> new unified diff sent via SMTP protocol?
>

No, there is a reason why we have written rules on how patches should
be submitted. Everyone in the kernel community is expected to optimize
their workflow according to these rules to make life easier for people
reviewing and merging the patches.

As you said now someone has to fix this using an editor and that is an
error prone process. Besides, why it would take 10 minutes to generate
a proper patch-set? git is very good on this regard (i.e: git commit
---fixup && git rebase -i && git format-patch && git send-email).

I won't argue anymore but I find very sad that people who have been in
the kernel community for years don't follow the basic rules we have
documented it. So I wonder why we have the documentation in the first
place and how can we expect newcomers to follow if even experienced
kernel hackers don't.

> --
> Pali Rohár
> pali.rohar@gmail.com

Best regards,
Javier
diff mbox

Patch

diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
index d703636..7107ac2 100644
--- a/drivers/media/i2c/adp1653.c
+++ b/drivers/media/i2c/adp1653.c
@@ -35,8 +35,8 @@ 
 #include <linux/module.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
-#include <linux/of_gpio.h>
-#include <linux/gpio.h>
+#include <linux/of.h>
+#include <linux/gpio/consumer.h>
 #include <media/adp1653.h>
 #include <media/v4l2-device.h>