lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 5 Jun 2011 14:55:37 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Baruch Siach <baruch@...s.co.il>,
	Jassi Brar <jassisinghbrar@...il.com>,
	spi-devel-general@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: reorganize drivers

On Sun, Jun 5, 2011 at 5:49 AM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Sun, Jun 5, 2011 at 09:54, Baruch Siach <baruch@...s.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@...retlab.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ