linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elmer Joandi <elmer@ylenurme.ee>
To: Alexander Viro <viro@math.psu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] removal of "static foo = 0"
Date: Sun, 26 Nov 2000 21:11:59 +0200 (GMT-2)	[thread overview]
Message-ID: <Pine.LNX.4.10.10011262049480.11180-100000@yle-server.ylenurme.sise> (raw)
In-Reply-To: <Pine.GSO.4.21.0011261321580.3258-100000@weyl.math.psu.edu>



On Sun, 26 Nov 2000, Alexander Viro wrote:

> I would suggest you to read through the following book and files:
> 	* Kernighan & Pike, "The Practice of Programming"
> 	* Documentation/CodingStyle
> 	* drivers/net/aironet4500_proc.c
> and consider, erm, discrepancies. On the second thought, reading K&R
> might also be useful. IOW, no offense, but your C is bad beyond belief.

Yep, very true.
aironet4500_proc.c is ugly. And is because there is quickly handwirtten
something that should have been generic for kernel for some long time, not
for every driver-writer to reinvent a wheel.
Note that there is something that virtually elliminates need for
exact user<->kernel level interfaces and userlevel kerneldata manipulation 
programs and lots of other maintenance pains.
And it does it in quite short sentences. Plus, half of that file is direct
repeating of some non-exported kernel functions. But, if you think you can
do better, then look into aironet4500_rid.c and handcode it (like real K&R
people do), instead of using aironet4500_proc.c to operate on it.
Also, pcmcia/aironet4500_cs.c has lots of ugly parts. Those which are
related to stupid masohistic code repetitions due to pcmcia package
interface being "cutting edge optimal stupid"

The same true is that 2.4 kernel is, in commercial production sense, late
for 6 months. And reason being that the codebase and testing becomes
unmanageable. And it becomes unmanageable, because some people only read
K&R and try to optimize last bit out of it with using and old book.

I'd really propose again:
1. universal debug macros
2. universalt user-kernelspace configuration interface via proc/sys

I'd really like C++, but it can be done with C and macros.
Some years ago I even managed to write something like stl container 
withing C and with macros. That was really screwy thing.

elmer.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-26 19:42 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-26 17:53 [PATCH] removal of "static foo = 0" Elmer Joandi
2000-11-26 18:36 ` Alexander Viro
2000-11-26 19:11   ` Elmer Joandi [this message]
2000-11-26 22:49 ` Rogier Wolff
2000-11-26 23:30   ` Universal debug macros Elmer Joandi
2000-11-27  0:45     ` Rogier Wolff
2000-11-27  1:11       ` Elmer Joandi
2000-11-27  4:25         ` H. Peter Anvin
2000-11-27  5:19           ` Michael Meissner
2000-11-27 16:56           ` Chmouel Boudjnah
2000-11-27 17:47             ` H. Peter Anvin
2000-11-27 17:56               ` Chmouel Boudjnah
2000-11-27 17:58                 ` H. Peter Anvin
2000-11-27 18:10                   ` Chmouel Boudjnah
2000-11-27 18:28                     ` H. Peter Anvin
2000-11-27 18:39                       ` Chmouel Boudjnah
2000-11-27 18:41                         ` H. Peter Anvin
2000-11-27 21:09                   ` Gerhard Mack
2000-11-27  8:35         ` Rogier Wolff
2000-11-27 14:42           ` Elmer Joandi
2000-11-27 14:59             ` Rogier Wolff
2000-11-27 15:58               ` Elmer Joandi
2000-11-28  1:34                 ` Peter Samuelson
2000-11-27 16:37     ` Andrew E. Mileski
2000-11-27 17:01       ` Richard B. Johnson
2000-11-27 17:19         ` Andrew E. Mileski
2000-11-27 18:01           ` Richard B. Johnson
2000-11-27 19:55             ` Andrew E. Mileski
  -- strict thread matches above, loose matches on Subject: below --
2000-11-27  8:41 [PATCH] removal of "static foo = 0" Werner Almesberger
2000-11-27  5:56 ` Adam J. Richter
2000-11-27  8:39   ` David S. Miller
2000-11-27  9:08     ` Werner Almesberger
2000-11-27 17:21     ` Andrea Arcangeli
2000-11-27 17:36       ` Michael Meissner
2000-11-27 19:06         ` Andrea Arcangeli
2000-11-27 19:34           ` Richard B. Johnson
2000-11-28  0:28             ` Andrea Arcangeli
2000-11-28 11:25               ` Horst von Brand
2000-11-27 21:27         ` Marcus Sundberg
2000-11-28  3:10         ` kumon
2000-11-28  3:28           ` Andrea Arcangeli
2000-11-28  3:35             ` Alexander Viro
2000-11-28  4:15               ` Michael Meissner
2000-11-28  9:55               ` Andreas Schwab
2000-11-28 15:16                 ` Andrea Arcangeli
2000-11-28 16:09                   ` Andreas Schwab
2000-11-28 19:29                     ` Andrea Arcangeli
2000-11-28 16:44                   ` Michael Meissner
2000-11-27 18:11       ` Richard B. Johnson
2000-11-27 18:01 ` Michael Meissner
2000-11-26 15:15 Adam J. Richter
2000-11-25 20:19 Andries Brouwer
2000-11-25 21:07 ` Russell King
2000-11-25 21:29   ` Andries Brouwer
2000-11-26  1:19     ` Russell King
2000-11-25 22:11 ` Herbert Xu
2000-11-25 22:46   ` Andries Brouwer
2000-11-25 22:53     ` James A Sutherland
2000-11-25 23:55       ` Tim Waugh
2000-11-26  3:10         ` James A Sutherland
2000-11-26 10:37         ` Tigran Aivazian
2000-11-26 14:52           ` Philipp Rumpf
2000-11-28  0:01           ` Peter Samuelson
2000-11-27  4:00         ` Michael Meissner
2000-11-25 23:02     ` Jeff Garzik
2000-11-26  2:08       ` Andries Brouwer
2000-11-26  9:22         ` Martin Mares
2000-11-25 23:33     ` Herbert Xu
2000-11-27 10:03     ` Helge Hafting
2000-11-27 20:33     ` Albert D. Cahalan
2000-11-27 22:57       ` Russell King
2000-11-29  1:46         ` Albert D. Cahalan
2000-11-29  3:21           ` Peter Samuelson
2000-11-29  7:25           ` Russell King
2000-11-25 22:27 ` Tigran Aivazian
2000-11-26  1:32   ` Andries Brouwer
2000-11-26  6:21     ` Werner Almesberger
2000-11-26  2:11   ` Georg Nikodym
2000-11-26  4:25     ` Alan Cox
2000-11-26  5:01       ` John Alvord
2000-11-26  5:10         ` Andre Hedrick
2000-11-26  6:22           ` Keith Owens
2000-11-26  6:28             ` Andre Hedrick
2000-11-26 10:43         ` Tigran Aivazian
2000-11-26 10:52         ` Tigran Aivazian
2000-11-24  7:47           ` Pavel Machek
2000-11-26 14:32           ` bert hubert
2000-11-26 10:52         ` Rogier Wolff
2000-11-26 14:13       ` Philipp Rumpf
2000-11-26 20:47       ` H. Peter Anvin
2000-11-27 21:12         ` Kai Henningsen
2000-11-26 15:19     ` Georg Nikodym

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10011262049480.11180-100000@yle-server.ylenurme.sise \
    --to=elmer@ylenurme.ee \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).