Re: [Winbond] flash memory reader SCSI device drivers

From: dezheng shen
Date: Wed Jun 14 2006 - 02:03:15 EST




Please review the following files before posting the patches :

Documentation/CodingStyle

right now, we are working on this one. However, I spotted one statement in coding style

GLOBAL variables (to be used only if you _really_ need them) need to
have descriptive names, as do global functions. If you have a function
that counts the number of active users, you should call that
"count_active_users()" or similar, you should _not_ call it "cntusr()".

we used global variables in our codes to make coding easier. For example, we placed some variable on stack so that spaces are automatically allocated once our driver is loaded into memory and it is also automatically deallocated once our driver is unloaded. Thus, we don't have to consider WHAT IF situations in our codes. Of course, we can use dynamically allocated kernel memory but it just makes our codes a little complex.

My question is -- could we use global variables if they are NOT absolutely necessary?

thank you,

dz




Documentation/SubmittingDrivers
Documentation/SubmittingPatches

and make sure you've cleaned up the code to follow CodingStyle -
otherwise that's just going to be the first thing people will tell you
to fix :-)

Also make sure you include appropriate "Signed-off-by:" lines on the
patches and please post patches inline, not as attachments (and please
test send those mails to yourself first and check that the patches
apply and have not been mangled by your email client).


This is the first we send this request to this mailing list and we are
not sure this is the right way to do. If any of you is interested in
reviewing our sources for Memory Stick driver for Winbond w518 chip,
please let me know so that we can post our sources.

I don't have the appropriate hardware, but I'd still be interrested in
taking a look at the patches, and I'm sure many other people feel the
same way.
I'd say posting the patches on LKML and adding relevant people/lists
from the MAINTAINERS file to Cc would be the way to do it.





===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/