From: <pa...@rc...> - 2000-12-07 05:20:27
|
Burkhard Kohl wrote: > I introduced quite some tab diffs, because the original source code > did use almost no indentation, making it very hard to read. I use only > tabs (no spaces except accidentally) which should expand to whatever the > editor has been set to. (8 spaces if vi default is used). I am a bit > puzzled - when I apply your diff the section where you say the spacing should > be right looks awful to me - it misses a lot of identation and it seems there > are mostly spaces (not tabs) in front of codelines. Hi, Burkhard. I'm sorry about taking so long to get back with you on this. Are you sure you don't have your tab stops set to 4? Some of the changes in your smp4 patch didn't look right unless I switched to 4 (in vi: ":set ts=4"). I played around with GNU indent a little tonight, and perhaps the best thing to do is run "indent -kr -i8" on ieee12844.c with your code changes. It's not 100% the style I use personally, but it's good enough for our purposes since it cleans up the tab vs space consistency. If you agree then I will go ahead and commit this to CVS. (You can look in the "ptal" directory to see an example of my coding style, since I wrote all of that code myself.) If you want I'll run indent on ieee12844pp.c too. That will be a bit harder because it screws up the switch blocks where I embed "case XX:" within the "SET_STATE" macro and I'll have to selectively merge indent's changes. I'm pretty sure the mailing list by itself doesn't munge tabs to spaces. The patch to xojpanel I sent out on December 2 had tabs in the attachment, and the message I got back from the list still had them as tabs. > I think I know the reason but for tonight I am to tired to come up with > a patch. Shortly, you added a couple of goto out:'s in mlc_sendmsg() where > the original code just returned. That results in calls to kfree_skb > on bufs that might be used later (e.g. after returning -EAGAIN). Let's not worry about this. Since your original changes work, I am taking out my "changes". If I get a chance later I will go back through and identify specific places where I had questions and ask you about them. David |
From: <pa...@rc...> - 2000-12-10 00:50:50
|
Burkhard Kohl wrote in response to Andreas Fester: > It looks like I missed the original posting you were answering to. If > indent would help to achieve proper indentation, I'd be happy to use > it. See http://www.geocrawler.com/lists/3/SourceForge/5745/0/4788297 for the message from me to which Andreas was replying. I have checked in the SMP/2.4 changes for the files: ieee12844/Makefile.in ieee12844/ieee12844.c ieee12844/ieee12844pp.c include/linux/ieee12844.h After checking in ieee12844.c with the code changes, I ran it through "indent -kr -i8" to standardize the indentation and checked it in again. I used two separate checkins to make it easier if anybody ever goes back and diffs revisions. I didn't do this to ieee12844pp.c because I need to selectively re-indent only certain sections. Let me know if I need to process this file too. I'm hoping this re-indention can be a one-time occurrence per file, so I won't attempt to set it up as a checkin/checkout filter. David |
From: Andreas F. <fe...@ep...> - 2000-12-07 08:12:59
Attachments:
smime.p7s
|
Hi, > > I introduced quite some tab diffs, because the original source code > > did use almost no indentation, making it very hard to read. I use only > > tabs (no spaces except accidentally) which should expand to whatever the > > editor has been set to. (8 spaces if vi default is used). I am a bit Personally, I started to never use tabs. My Editor (and Emacs should also be able to handle it that way ;-) ) can be set to use spaces instead of tabs, and then also inserts spaces for automatic indentation. The advantage of using spaces only is that it looks the same in every editor, without having to puzzle with tab settings and the like. [...] > I played around with GNU indent a little tonight, and perhaps the best thing > to do is run "indent -kr -i8" on ieee12844.c with your code changes. It's not I think using "indent " would be a convenient way to achieve a somewhat consistent code layout. However, you should be aware of some problems which might occur: - Developers should *always* run indent with the same parameters before checkin; otherwise, you can never make useful diffs between versions. - The best way would be to install indent as a filter for checkin; I dont know if this is possible at the sourceforge CVS server, and some people dont like this either because the code may look different when you check it out again ;-) Just IMHO .... Regards Andreas -- Andreas Fester Phone : +(49) 721-6291-0 __ __ EIGNER + PARTNER AG Fax : +(49) 721-6291-88 /_ /_/ Ruschgraben 133 EMail : mailto:fe...@ep... /_ / D-76139 Karlsruhe URL : http://www.ep-ag.com EIGNER + PARTNER |
From: Burkhard K. <bu...@bu...> - 2000-12-08 00:10:46
|
Andreas Fester > Hi, > > > > I introduced quite some tab diffs, because the original source code > > > did use almost no indentation, making it very hard to read. I use only > > > tabs (no spaces except accidentally) which should expand to whatever the > > > editor has been set to. (8 spaces if vi default is used). I am a bit > > Personally, I started to never use tabs. My Editor (and Emacs should > also be able to handle it that way ;-) ) can be set to use spaces > instead of tabs, and then also inserts spaces for automatic > indentation. The advantage of using spaces only is that it looks the > same in every editor, without having to puzzle with tab settings and > the like. Well, first aim should be to make the sources readable and to do it in a consistent way. There exists a CodingStyle guide imn /usr/src/linux/Documentation which gives precise instructions how to indent. I suggest to use this document at least for ieee12844 modules. From my experience tabs are the easiest way to be consistent among developers (and tabs adhere to the above mentioned guidelines). I think almost any decent editor will expand one tabstop to an 8char space by default, even emacs ;-). Only in case you have played with your editors settings you will get a different appearance. If you are using spaces and you don't check afterwards, you might have accidentially indented in a way you did not intend to use. I guess that's what happend to ieee12844*.c - tabs and spaces mixed. On the other hand I'd have no trouble to use whatever we agree upon as long we come to an agreement. For now, the lack of proper indentation makes reading the sources pretty hard. > > [...] > > I played around with GNU indent a little tonight, and perhaps the best thing > > to do is run "indent -kr -i8" on ieee12844.c with your code changes. It's not > It looks like I missed the original posting you were answering to. If indent would help to achieve proper indentation, I'd be happy to use it. Burkhard -- Burkhard Kohl bu...@bu... |