(Adding GregKH to the CC, he needs to Ack this before I can merge it).
On Tue, Sep 11, 2007 at 12:16:48AM +0100, Adrian McMenamin wrote:
Please use obj-$(CONFIG_MAPLE) here, too.
I don't believe the 'or any later version' thing was intended by any of
the original authors, this should probably be dropped. The original file
lacked explicit terms, so the default behaviour there is to fall back to
what the top-level COPYING says, which has the 'or any later version'
garbage removed.
It would be better to have accessors for this rather than exporting the
mutex globally.
Please use the mapleq list_head directly. Yes, it happens to exist at the
beginning of the structure, but casting outright rather than just using
mq->list is ridiculous.
Is !mdev->mq possible?
Use dma_cache_sync() for this. Ralf is currently trying to get rid of
these other dma_cache_xxx() functions.
You should be using time_before()/time_after() to guard against wraparound.
Please use a less visually offensive driver name. Also, why has the },
moved over a few levels for no reason?
You don't need fancy caps in slab caches unless you're ACPI, please also
use a more descriptive name (maple_queue_cache or something like that).
Goto labels should be on the margin at the beginning of the line, not at
an arbitrary location.
Please use subsys_initcall() or something like that, this isn't a file
system. The comment is also pointless, it's obvious what the initcall is
for if you use the proper one.
Please use the
#ifndef __LINUX_MAPLE_H
#define __LINUX_MAPLE_H
...
#endif /* __LINUX_MAPLE_H */
convention. And create an asm/maple.h that gets dragged in. Things like
the base address for the bus, ports/packets/dma setup and things like
that should be platform-specific properties, not things that are
hardcoded in a linux/ header. Only thing like the bus API, data
structures, and response codes are generic.
Namespace pollution. You also seem to only use this as a convenience
accessor in certain places in the bus code itself, and it's never visible
to the API. Move the structure definition in to the .c code in that case.
Why would these ever be accessible to drivers?
-