linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Joe Perches <joe@perches.com>, Dan O'Donovan <dan@emutex.com>,
	linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux-gpio@vger.kernel.org, linux-leds@vger.kernel.org,
	Carlos Iglesias <carlos.iglesias@emutex.com>,
	Javier Arteaga <javier@emutex.com>
Subject: Re: [PATCH v2 2/3] leds: upboard: Add LED support
Date: Tue, 23 Oct 2018 22:31:19 +0200	[thread overview]
Message-ID: <1570e79b-3ea4-b389-72c8-1d595a46f380@gmail.com> (raw)
In-Reply-To: <16591e6735e32baad10f083c688119ce79d12911.camel@perches.com>

On 10/23/2018 09:23 PM, Joe Perches wrote:
> On Tue, 2018-10-23 at 20:50 +0200, Jacek Anaszewski wrote:
>>> diff --git a/drivers/leds/leds-upboard.c b/drivers/leds/leds-upboard.c
>>> new file mode 100644
>>> index 0000000..34a6973
>>> --- /dev/null
>>> +++ b/drivers/leds/leds-upboard.c
>>> @@ -0,0 +1,104 @@
> []
>>> +#include <linux/kernel.h>
>>> +#include <linux/leds.h>
>>> +#include <linux/mfd/upboard.h>
>>> +#include <linux/module.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/regmap.h>
>>> +#include <linux/acpi.h>
>>
>> The last include should go first to keep alphabetical order.
> 
> There is no accepted single kernel style for #include
> file ordering.

Well, I myself have been asked several times for sorting
includes, that's why I keep requiring it for the LED subsystem too.

When it's by the occasion of a new driver submission, it costs
virtually nothing. And it allows for avoiding any prospective
noise on the list due to the submissions like "Order includes".

As a first shot the following returns 77:

git log | grep -i "include.*alphabetical" | wc -l

Aside of that, in case of this particular patch the intention seemingly
was to have includes ordered lexicographically, since only the last
item didn't fit for this pattern.

> drivers/leds does not use a single style nor is this
> particular variant documented anywhere to my knowledge.

Unspecified kind of includes sorting is mentioned in the
Documentation/process/coding-style.rst, line 637.

> Until such a time when either a local preferred style
> document or a treewide preferred style exists, please
> stop asking people to modify #include ordering for
> various styles like reverse christmas tree by length,
> alphabetic ordering, or other individual style
> My preferred style would always have kernel.h first
> as that may help with precompiled headers and overall
> kernel compilation time one day.

If that will happen we'll see massive rearrangement of includes
anyway.

But OK, I've skimmed through other subsystems and core kernel
files and realized that this is indeed often not preserved.

So, provided there are no other strong arguments in favor
of sorting, I will give up this nitpicking from now on.

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2018-10-23 20:31 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-21  8:50 [RFC PATCH RESEND 0/3] UP Squared board drivers Javier Arteaga
2018-04-21  8:50 ` [RFC PATCH RESEND 1/3] mfd: upboard: Add UP2 platform controller driver Javier Arteaga
2018-04-25  9:51   ` Mika Westerberg
2018-04-25 12:05     ` Javier Arteaga
2018-04-25 15:57   ` Andy Shevchenko
2018-04-26  2:33     ` Javier Arteaga
2018-04-21  8:50 ` [RFC PATCH RESEND 2/3] leds: upboard: Add LED support Javier Arteaga
2018-04-25  6:41   ` Pavel Machek
2018-04-25  7:02     ` Javier Arteaga
2018-04-25  7:04       ` Pavel Machek
2018-04-25 16:15   ` Andy Shevchenko
2018-04-26  2:34     ` Javier Arteaga
2018-04-26  7:55       ` Andy Shevchenko
2018-04-26 12:49         ` Javier Arteaga
2018-05-02 13:55           ` Andy Shevchenko
2018-04-26  7:34   ` Lee Jones
2018-04-26 13:03     ` Javier Arteaga
2018-04-27  7:38       ` Lee Jones
2018-04-21  8:50 ` [RFC PATCH RESEND 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Javier Arteaga
2018-04-25 16:49   ` Andy Shevchenko
2018-04-26  2:38     ` Javier Arteaga
2018-04-26  6:50   ` Lee Jones
2018-04-26 13:36     ` Javier Arteaga
2018-04-25  9:53 ` [RFC PATCH RESEND 0/3] UP Squared board drivers Mika Westerberg
2018-10-19 17:15 ` [PATCH v2 " Dan O'Donovan
2018-10-19 17:15   ` [PATCH v2 1/3] mfd: upboard: Add UP2 platform controller driver Dan O'Donovan
2018-10-20 11:49     ` Andy Shevchenko
2018-10-25 11:05       ` Lee Jones
2018-10-25 13:15         ` Andy Shevchenko
2018-10-31 20:40       ` Dan O'Donovan
2018-10-19 17:15   ` [PATCH v2 2/3] leds: upboard: Add LED support Dan O'Donovan
2018-10-20 11:17     ` Andy Shevchenko
2018-10-21  8:31       ` Pavel Machek
2018-10-23 18:50     ` Jacek Anaszewski
2018-10-23 18:54       ` Pavel Machek
2018-10-23 19:09         ` Jacek Anaszewski
2018-10-23 19:30           ` Pavel Machek
2018-10-24 20:07             ` Jacek Anaszewski
2018-10-25  9:22               ` Andy Shevchenko
2018-10-25 17:44                 ` Jacek Anaszewski
2018-10-23 19:23       ` Joe Perches
2018-10-23 20:31         ` Jacek Anaszewski [this message]
2018-10-24 10:13         ` Andy Shevchenko
2018-10-24 10:24           ` Joe Perches
2018-10-19 17:15   ` [PATCH v2 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Dan O'Donovan
2018-10-20 11:40     ` Andy Shevchenko
2018-10-31 19:55       ` Dan O'Donovan
2018-10-22  9:07     ` Linus Walleij
2018-10-24 13:05   ` [PATCH v2 0/3] UP Squared board drivers Andy Shevchenko
2018-10-31 20:44   ` [PATCH v3 " Dan O'Donovan
2018-10-31 20:44     ` [PATCH v3 1/3] mfd: upboard: Add UP2 platform controller driver Dan O'Donovan
2018-11-01  8:07       ` Lee Jones
2018-11-01  9:58         ` Dan O'Donovan
2018-11-11 11:29       ` Pavel Machek
2018-11-15 14:56         ` Linus Walleij
2018-10-31 20:44     ` [PATCH v3 2/3] leds: upboard: Add LED support Dan O'Donovan
2018-10-31 20:44     ` [PATCH v3 3/3] pinctrl: upboard: Add UP2 pinctrl and gpio driver Dan O'Donovan
2018-10-31 21:30       ` Linus Walleij
2018-10-31 21:39         ` Dan O'Donovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1570e79b-3ea4-b389-72c8-1d595a46f380@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=carlos.iglesias@emutex.com \
    --cc=dan@emutex.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=javier@emutex.com \
    --cc=joe@perches.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).