Messages in this thread |  | | | Subject | Re: [PATCH 05/29] memstick: mspro_block: move declarations to header and refactor things a bit | | From | Maxim Levitsky <> | | Date | Tue, 26 Oct 2010 03:46:16 +0200 |
| |
On Mon, 2010-10-25 at 08:07 -0700, Alex Dubov wrote: > --- On Fri, 22/10/10, Maxim Levitsky <maximlevitsky@gmail.com> wrote: > > > From: Maxim Levitsky <maximlevitsky@gmail.com> > > Subject: [PATCH 05/29] memstick: mspro_block: move declarations to header and refactor things a bit > > To: "Alex Dubov" <oakad@yahoo.com> > > Cc: "Andrew Morton" <akpm@linux-foundation.org>, "LKML" <linux-kernel@vger.kernel.org>, "Maxim Levitsky" <maximlevitsky@gmail.com> > > Received: Friday, 22 October, 2010, 4:53 PM > > This makes it much easier to lookup > > things and reduces size of mspro_block.c > > Subjective and irrelevant. > My editor makes it easier to look up things when they are in the same file, > and this declarations are not expected to be used by any other compilation > unit. Belongs to the cosmetic category which should be discussed later. I agree that it is subjective. However when you have 2 files, you can always open them in different copies of an editor, terminal tabs. When you have decorations in one file you depend on the editor a lot. also its not about finding them. Its about distrupting the workflow, because once you find the declaration you need to find the place you were before. I understand that some editors help with that, yea.
> > > Also add debbuging macros so that it becames possible to > > control > > debbuging via module param. > > > > Should be done through a common kernel infrastructure, namely DYNAMIC_DEBUG > feature (pr_debug and friends). How a user can turn DYNAMIC_DEBUG on? How about different levels of verbosity? Last time I checked DYNAMIC_DEBUG doesn't allow that. Besides the macros I add revert to DYNAMIC_DEBUG if user doesn't specify the debug= module param.
When dynamic debugs grows that features (I have seen a ddebug= patchset, hope it gets merged, I will just trim down these macros). Besides the goal of these macros is to reduce typing. I need to add/remove the debug printouts very often, and then I don't want even to type that '\n' at the end. Besides, a lot of drivers are doing that. Just look around.
I already added similiar looking macros to 2 my other driver (r852 sm_ftls and ene_cir) and no complains.
Best regards, Maxim Levitsky
|  |