linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PULL REQUEST] i2c for 4.13
Date: Thu, 13 Jul 2017 09:56:10 +0200	[thread overview]
Message-ID: <20170713075610.ufck6nxokifamcvs@pengutronix.de> (raw)
In-Reply-To: <CA+55aFzHpnRw6Vw3GNGydzQbxK5SUFKkDH-MLUWPm5r1rAHeDQ@mail.gmail.com>

Hello,

On Wed, Jul 12, 2017 at 10:16:32AM -0700, Linus Torvalds wrote:
> On Wed, Jul 12, 2017 at 8:49 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> >  drivers/i2c/i2c-core-acpi.c                        |  665 ++++++++
> >  drivers/i2c/{i2c-core.c => i2c-core-base.c}        | 1684 +-------------------
> >  drivers/i2c/i2c-core-of.c                          |  276 ++++
> >  drivers/i2c/i2c-core-slave.c                       |  115 ++
> >  drivers/i2c/i2c-core-smbus.c                       |  594 +++++++
> >  drivers/i2c/i2c-core.h                             |   24 +
> >  drivers/i2c/i2c-stub.c                             |   14 +-
> 
> Side note on this.. (and doesn't affect the pull - I pulled it and
> it's going through my test build right now).
> 
> Please don't do the silly "start every filename with the same prefix".
> It annoys people (ie me) that use tab-completion, and it just looks
> stupid.
> 
> And this core re-org does it twice over - first with "i2c-" and then
> with "core-".
> 
> Of *course* it's "i2c-something.c" - it's in the i2c directory. So
> that part is entirely pointless.
> 
> And the "core-something.c" part seems to be entirely to keep the files
> together - but if the issue really is "sort files together", then
> that's why we have subdirectories.
> 
> So I personally tend to much prefer
> 
>    drivers/i2c/core/acpi.c
>    drivers/i2c/core/base.c
>    drivers/i2c/core/of.c
>    drivers/i2c/core/slave.c
>    drivers/i2c/core/smbus.c
>    drivers/i2c/core/core.h
> 
> as the model. Then things *really* sort together, auto-complete works
> better, and tools like "git diff --dirstat" etc that group changes by
> directories also automatically just do the right thing.
> 
> And notice how the filenames are smaller and prettier too? It's just a
> win/win situation.
> 
> But I'm not going to enforce my style guide on you, since I very
> seldom actually end up touching those files. If this was some area
> where I often actually ended up looking at things, I'd almost require
> a sane directory structure, though.
> 
> Because "name things with the same prefix" is not a sane directory structure.

Another reason I remember for the prefix thing is that this way the
kernel modules are not named of.ko, core.ko and base.ko. (But this can
be fixed in the Makefile of course with some more prose.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2017-07-13  7:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 15:49 [PULL REQUEST] i2c for 4.13 Wolfram Sang
2017-07-12 15:54 ` Wolfram Sang
2017-07-12 17:16 ` Linus Torvalds
2017-07-13  7:56   ` Uwe Kleine-König [this message]
2017-07-13 20:57     ` Peter Rosin
2017-07-13 21:05       ` Linus Torvalds
2017-07-13 21:41         ` Peter Rosin
2017-07-13 10:03   ` Wolfram Sang
2017-07-13 10:50     ` Wolfram Sang
2017-08-09 19:29 Wolfram Sang
2017-08-25 14:30 Wolfram Sang
2017-09-01 21:40 Wolfram Sang

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=20170713075610.ufck6nxokifamcvs@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wsa@the-dreams.de \
    /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).