From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Christoph Hellwig <hch@lst.de>
Cc: Joel Becker <jlbec@evilplan.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH 02/12] samples: configfs: order includes alphabetically
Date: Thu, 8 Oct 2020 15:23:11 +0200 [thread overview]
Message-ID: <CAMRc=Mf8BDyoy+V-S_JQjAZ9+Lt=+5pEYH2ugSL0pbQ5E5Dfrw@mail.gmail.com> (raw)
In-Reply-To: <20201007134323.GA764@lst.de>
On Wed, Oct 7, 2020 at 3:43 PM Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, Sep 24, 2020 at 02:45:16PM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > The preferred coding style is to order all includes alphabetically for
> > improved readability. There's no need for the configfs header to come
> > last.
>
> Is it? People seem to have all kinds of weird opinions, but I don't
> think any ordering really makes sense. What does make sense it dropping
> the pointless empty line, so I've folded that into the next patch.
This is not just a baseless opinion, keeping headers sorted clearly
has an advantage: you more easily avoid duplicating includes, you see
right away if a header is already included or not. Many maintainers
will require ordering in new patches.
It's your call but it's better code with not much effort.
Bartosz
next prev parent reply other threads:[~2020-10-08 13:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 12:45 [PATCH 00/12] samples: configfs: refactor the configfs sample code Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 01/12] MAINTAINERS: add the sample directory to the configfs entry Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 02/12] samples: configfs: order includes alphabetically Bartosz Golaszewski
2020-10-07 13:43 ` Christoph Hellwig
2020-10-08 13:23 ` Bartosz Golaszewski [this message]
2020-10-08 14:05 ` Christoph Hellwig
2020-09-24 12:45 ` [PATCH 03/12] samples: configfs: remove redundant newlines Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 04/12] samples: configfs: drop unnecessary ternary operators Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 05/12] samples: configfs: improve alignment of broken lines Bartosz Golaszewski
2020-10-07 13:44 ` Christoph Hellwig
2020-09-24 12:45 ` [PATCH 06/12] samples: configfs: fix alignment in item struct Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 07/12] samples: configfs: replace simple_strtoul() with kstrtoint() Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 08/12] samples: configfs: don't reinitialize variables which are already zeroed Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 09/12] samples: configfs: prefer sizeof(*var) to sizeof(struct var_type) Bartosz Golaszewski
2020-10-07 13:46 ` Christoph Hellwig
2020-09-24 12:45 ` [PATCH 10/12] samples: configfs: consolidate local variables of the same type Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 11/12] samples: configfs: don't use spaces before tabs Bartosz Golaszewski
2020-09-24 12:45 ` [PATCH 12/12] samples: configfs: prefer pr_err() over bare printk(KERN_ERR Bartosz Golaszewski
2020-10-06 10:40 ` [PATCH 00/12] samples: configfs: refactor the configfs sample code Bartosz Golaszewski
2020-10-07 13:46 ` Christoph Hellwig
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='CAMRc=Mf8BDyoy+V-S_JQjAZ9+Lt=+5pEYH2ugSL0pbQ5E5Dfrw@mail.gmail.com' \
--to=brgl@bgdev.pl \
--cc=bgolaszewski@baylibre.com \
--cc=hch@lst.de \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
/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).