Re: [PATCH v3] UIO: Implement a UIO interface for the SMX Cryptengine

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Mundt
Date: Thursday, March 13, 2008 - 3:06 am

On Thu, Mar 13, 2008 at 08:35:40PM +1100, Ben Nizette wrote:
linux/io.h is preferable here.


You may as well use DRV_NAME and DRV_VERSION, then you can toss that over
to MODULE_VERSION() if you're so inclined. It's generally nice to keep
modinfo happy.

platform_get_irq() can fail, which you don't presently handle (though I
guess uio_register_device() will error out if you hand off -ENXIO as your
IRQ anyways, so it's not technically an issue). That's a pretty minor
issue, though, but might be something you wish to fix up if you are
planning on using this as an example driver for others.

Your error paths are also pretty quiet. A dev_err() or so in the few
failure cases you do have might not be a terrible idea.

uio_register_device() also has quite a few different error cases, so it's
at least worth preserving the error value and returning that back,
rather than always returning -ENODEV.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH v3] UIO: Implement a UIO interface for the SMX ..., Paul Mundt, (Thu Mar 13, 3:06 am)