Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239197 > unrolled thread

Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically

Started byPavel Machek <pavel@ucw.cz>
First post2015-10-04 21:50 +0200
Last post2015-10-05 23:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically Pavel Machek <pavel@ucw.cz> - 2015-10-04 21:50 +0200
    RE: [PATCH v5 1/9] Input: goodix - sort includes alphabetically "Tirdea, Irina" <irina.tirdea@intel.com> - 2015-10-05 16:20 +0200
      Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically Pavel Machek <pavel@ucw.cz> - 2015-10-05 23:00 +0200

#1239197 — Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically

FromPavel Machek <pavel@ucw.cz>
Date2015-10-04 21:50 +0200
SubjectRe: [PATCH v5 1/9] Input: goodix - sort includes alphabetically
Message-ID<qfXsd-1xd-9@gated-at.bofh.it>
On Mon 2015-09-07 17:36:15, Irina Tirdea wrote:
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
>  drivers/input/touchscreen/goodix.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Don't.

Yes, we sometimes sort includes... to avoid patch rejects.

This is guaranteed to cause rejects.

If we do sort them, we use "longest-first" usually.

> 
> diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> index e36162b..6ae28c5 100644
> --- a/drivers/input/touchscreen/goodix.c
> +++ b/drivers/input/touchscreen/goodix.c
> @@ -14,18 +14,18 @@
>   * Software Foundation; version 2 of the License.
>   */
>  
> -#include <linux/kernel.h>
> +#include <linux/acpi.h>
> +#include <linux/delay.h>
>  #include <linux/dmi.h>
>  #include <linux/i2c.h>
>  #include <linux/input.h>
>  #include <linux/input/mt.h>
> -#include <linux/module.h>
> -#include <linux/delay.h>
> -#include <linux/irq.h>
>  #include <linux/interrupt.h>
> -#include <linux/slab.h>
> -#include <linux/acpi.h>
> +#include <linux/irq.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/slab.h>
>  #include <asm/unaligned.h>
>  
>  struct goodix_ts_data {
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1239589

From"Tirdea, Irina" <irina.tirdea@intel.com>
Date2015-10-05 16:20 +0200
Message-ID<qgeMq-1i4-13@gated-at.bofh.it>
In reply to#1239197

> -----Original Message-----
> From: Pavel Machek [mailto:pavel@ucw.cz]
> Sent: 04 October, 2015 22:47
> To: Tirdea, Irina
> Cc: Dmitry Torokhov; Bastien Nocera; Aleksei Mamlin; linux-input@vger.kernel.org; Mark Rutland; Purdila, Octavian; linux-
> kernel@vger.kernel.org; devicetree@vger.kernel.org
> Subject: Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically
> 
> On Mon 2015-09-07 17:36:15, Irina Tirdea wrote:
> > Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> > ---
> >  drivers/input/touchscreen/goodix.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Don't.
> 
> Yes, we sometimes sort includes... to avoid patch rejects.
> 
> This is guaranteed to cause rejects.
> 
> If we do sort them, we use "longest-first" usually.
> 

When using random order, I've been told by reviewers that my ordering
is wrong [1], but I could not figure out what the "right" ordering is in order to apply.
I did not find any mention of how to sort includes in  Documentation/CodingStyle,
but I've seen patches in the kernel that fix random ordering by sorting them
alphabetically [2].

However, I do not feel strongly about this so I can drop this patch.

Thanks,
Irina

[1] https://lkml.org/lkml/2015/5/28/363
[2] https://patchwork.ozlabs.org/patch/408022/

> >
> > diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
> > index e36162b..6ae28c5 100644
> > --- a/drivers/input/touchscreen/goodix.c
> > +++ b/drivers/input/touchscreen/goodix.c
> > @@ -14,18 +14,18 @@
> >   * Software Foundation; version 2 of the License.
> >   */
> >
> > -#include <linux/kernel.h>
> > +#include <linux/acpi.h>
> > +#include <linux/delay.h>
> >  #include <linux/dmi.h>
> >  #include <linux/i2c.h>
> >  #include <linux/input.h>
> >  #include <linux/input/mt.h>
> > -#include <linux/module.h>
> > -#include <linux/delay.h>
> > -#include <linux/irq.h>
> >  #include <linux/interrupt.h>
> > -#include <linux/slab.h>
> > -#include <linux/acpi.h>
> > +#include <linux/irq.h>
> > +#include <linux/kernel.h>
> > +#include <linux/module.h>
> >  #include <linux/of.h>
> > +#include <linux/slab.h>
> >  #include <asm/unaligned.h>
> >
> >  struct goodix_ts_data {
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1239952

FromPavel Machek <pavel@ucw.cz>
Date2015-10-05 23:00 +0200
Message-ID<qgl1x-1KE-15@gated-at.bofh.it>
In reply to#1239589
Hi!

> > Subject: Re: [PATCH v5 1/9] Input: goodix - sort includes alphabetically
> > 
> > On Mon 2015-09-07 17:36:15, Irina Tirdea wrote:
> > > Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> > > ---
> > >  drivers/input/touchscreen/goodix.c | 12 ++++++------
> > >  1 file changed, 6 insertions(+), 6 deletions(-)
> > 
> > Don't.
> > 
> > Yes, we sometimes sort includes... to avoid patch rejects.
> > 
> > This is guaranteed to cause rejects.
> > 
> > If we do sort them, we use "longest-first" usually.
> > 
> 
> When using random order, I've been told by reviewers that my ordering
> is wrong [1], but I could not figure out what the "right" ordering is in order to apply.
> I did not find any mention of how to sort includes in  Documentation/CodingStyle,
> but I've seen patches in the kernel that fix random ordering by sorting them
> alphabetically [2].

Ok, I have seen this more often:

https://lkml.org/lkml/2009/3/28/99
 
> However, I do not feel strongly about this so I can drop this patch.

Well, its really nit picking.

										Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web