Advice on first patch
Peter Senna Tschudin
peter.senna at gmail.com
Wed Oct 3 09:40:16 EDT 2012
Matthew,
The file
drivers/net/wan/cosa.c
has many lines like:
return -1;
and
err = -1;
goto err_out;
Returning -1 is not the default way of returning error codes. Take a
look at http://lxr.free-electrons.com/source/include/asm-generic/errno-base.h
for a small list of error codes. There is also
http://lxr.free-electrons.com/source/include/asm-generic/errno.h.
If you decide to propose the use of error codes instead of -1, make
sure to update include section if needed. You can see how other
functions use return codes...
Peter
On Tue, Oct 2, 2012 at 12:56 PM, <matthew at walster.org> wrote:
>
> I'm hopefully going to be submitting the attached patch to the mainline kernel tree, and as it's my first patch, I figured it would be wise to run it past KN first in case I'd done something monumentally stupid! I found it through a checkpatch run, from the excellent talk by GregKH at FOSDEM a year or so back.
>
> Any input would be greatly appreciated!
>
> Matthew Walster
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
--
Peter
More information about the Kernelnewbies
mailing list