linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Baruch Siach <baruch@tkos.co.il>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	spi-devel-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: reorganize drivers
Date: Sun, 5 Jun 2011 14:55:37 -0600	[thread overview]
Message-ID: <BANLkTimgbxmBnTN9Sb55-hkbBi1AEfiPdg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=5XLxcZiBcZT8W4Gh+Ph_BUjs-yw@mail.gmail.com>

On Sun, Jun 5, 2011 at 5:49 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sun, Jun 5, 2011 at 09:54, Baruch Siach <baruch@tkos.co.il> wrote:
>> On Sun, Jun 05, 2011 at 01:13:28PM +0530, Jassi Brar wrote:
>>> On Sun, Jun 5, 2011 at 12:48 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>>> > [repost: I had a typo on the spi-devel-general mailing list address]
>>> >
>>> > Sort the SPI makefile and enforce the naming convention spi_*.c for
>>> > spi drivers.
>>
>> [snip]
>>
>>> Though the spi_ prefix seems redundant considering the files are in
>>> 'spi' directory.
>>> Just a thought, no objection.
>>
>> When looking at the list of loaded modules (e.g. in an Oops message), the name
>> "spi_xilinx" is much more meaningful than just "xilinx", for example.
>
> Plus, when dropping the prefix, spi_xilinx.ko and gpio-xilinx.ko
> become the same...

Exactly.  We essentially have a flat namespace for modules, despite
the fact of them being organized into directories.  At least for the
subsystems I maintain, I'd like to have a consistent prefix for that
reason.

> So now we have spi_<name>.c (with underscore) and gpio-<name>.c (with dash)?
> And other subsystems go with <name>-<type>.c instead, e.g.
> drivers/mfd/wm831x-spi.c?

On a brief survey of drivers:

apci: *.c
ata: pata_*.c, sata_*.c
atm: *.c
block: *.c
bluetooth: *.c
crypto: *.c
dma: *dma.c
gpio: gpio-*.c (after applying my patch)
hid: hid-*.c
hwmon: *.c
i2c: i2c-*.c
ide: *.c and ide-*.c
input: *.c
leds: leds-*.c
mca: mca-*.c
md: largely dm-*.c
mfd: *.c
mmc: *.c
mtd: *.c
net: *.c
rtc: rtc-*.c
scsi: *.c and scsi_*.c for core code
spi: (before patch) mix of spi_*.c and *_spi.c and *.c
uio: uio_*.c
virtio: virtio_*.c
wdt: *wdt.c and *_wdt.c

So, in this (admittedly incomplete) survey, I see 5 users of the
"prefix_" pattern, 8 of the "prefix-" pattern, a small number using a
suffix, and a whole lot without any pattern at all.  Personally, I
prefer the using a prefix with a '-', but in the spi directory there
was already a number of drivers using '_', so it was smaller impact to
change to using that instead of a dash.  If people don't think it is a
big deal though, then I'll change it to '-' to match the gpio change.

g.

  parent reply	other threads:[~2011-06-05 20:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05  7:18 [PATCH] spi: reorganize drivers Grant Likely
2011-06-05  7:43 ` Jassi Brar
     [not found]   ` <BANLkTinoEQf2a65KwQZOVK_4H9DSfqybjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-05  7:54     ` Baruch Siach
2011-06-05 11:49       ` Geert Uytterhoeven
2011-06-05 13:08         ` Stefan Richter
2011-06-05 20:55         ` Grant Likely [this message]
2011-06-05 21:19           ` Jassi Brar
2011-06-05 13:12       ` Jassi Brar
2011-06-05 20:57         ` Grant Likely
2011-06-05  8:13 ` Mika Westerberg
2011-06-05 14:37   ` Grant Likely
2011-06-06  9:00 ` Arnd Bergmann
2011-06-06  9:08   ` Dominik Brodowski
2011-06-06  9:08   ` Russell King - ARM Linux
2011-06-06  9:17   ` Jean Delvare
2011-06-06  9:29   ` James Bottomley
2011-06-06 11:21     ` Arnd Bergmann
2011-06-06 12:16       ` Jean Delvare
2011-06-06 12:35         ` Geert Uytterhoeven
     [not found]         ` <20110606141636.150c54b5-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-06-06 12:57           ` Arnd Bergmann
2011-06-06 13:44             ` Stefan Richter
2011-06-06 15:04               ` Arnd Bergmann
2011-06-06 10:01   ` Geert Uytterhoeven
2011-06-06 14:39   ` Grant Likely
2011-06-06 15:15     ` Russell King - ARM Linux

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=BANLkTimgbxmBnTN9Sb55-hkbBi1AEfiPdg@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=baruch@tkos.co.il \
    --cc=geert@linux-m68k.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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).