lkml.org 
[lkml]   [2007]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] firewire: OHCI-1394 lowlevel driver
Christoph Hellwig wrote:
>> + if (pci_enable_device(dev)) {
>> + fw_error("Failed to enable OHCI hardware.\n");
>> + return cleanup(ohci, CLEANUP_PUT_CARD, -ENODEV);
>
> Please use normal goto unwinding so the driver follows the same model
> as almost all other pci drivers and allows people to follow your driver
> more easily. Also it's not a alot of cleanup code, so removing this
> might actually be a net decrease in lines of code.

Sure. The patch I have here says 42 insertions, 44 deletions :)

>> + if (software_reset(ohci)) {
>
> Please give all your function a nice prefix so that oops messages are
> more readable.

I don't see a strong precedence for this for static functions. For example,
if you grep for 'static' in drivers/usb/core, there's a mix of usb_* prefixed
functions and functions without a consistent prefix. Plus, when the drivers
are loaded as modules, the module name will be in the stack trace. I can
track down the most generic sounding functions and give them a fw_ prefix, but
doing a whole-sale prefixing of static functions will make the source more
noisy and reduce readabilty - I'm not sure it's worth it.

cheers,
Kristian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-10 01:47    [W:0.357 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site