If not, feel free to ask specific questions. Also take a look at some code that implements it (like the public functions in drivers/usb/core/usb.c for example.)
What about things like prefixes for variable names? For instance,
I like to specify i_, o_, or io_ as prefixes for a function parameter to
indicate that this parameter is input only, output only, or both, respectively.
The same technique can be used for global variables (g_), structure fields (iv_), and local variables (l_). The cool thing about doing this is that I can use the same base name for both parameters and local variables, like this:
void myfunc(int i_count) { int l_count = i_count; ... }
If I try to submit a driver to the official kernel tree with code like this, will it count against me?
-- Timur Tabi Staff Software Engineer timur.tabi@ammasso.com
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/