Re: PNP patch into kernel when?

Philip Blundell (
Thu, 5 Dec 1996 22:35:43 +0000 (GMT)

On Thu, 5 Dec 1996, Andrew E. Mileski wrote:

> Respectfully, I don't think you looked at enough of the kernel source.
> There is no standard, and Linus has said he will not impose his
> preferences on developers. (I tried to get him to, but he refused.)

There is the defacto loose standard of the majority of the kernel, which
is (loosely) similar. If you want it codified, there is

> Compare the networking sources, sound driver sources, and ext2 sources,
> and you will see at least 3 distinct styles for example.

The sound driver is a seperate package that just gets bolted into the
kernel. There are lots of ways in which it doesn't "fit" very well. The
networking sources may still be a bit of a mess because many people have
hacked on them over the years, and there are probably bits of old Biro
code floating around. And none of the code I've looked at does anything
particularly shocking - yes, personal tastes differ on indents and brace
placement, but I'm not particularly fussed about those.

> in other places in the kernel. I chose those which I found to visually
> simplify the code, and lower its "density" for readability, fortryingto
> readandunderstandsourcecodethatisdenselypackedisdifficult,andonlysuitable
> foruncaringcompilersIMHO.

IMHO, you can take this too far.

> If you have specific suggestions, I will consider them. Your use of
> the word "jarring" doesn't tell me anything, except that you don't
> approve.

My specific suggestion, then, is that you reconsider your plan of
spreading out your function definitions.

int foo(int a, int b, char *c)

is, in my view, just as readable as, if not more so than,

int a,
int b,
char *c

and uses up an awful lot less scarce screen lines. However, I don't want
to make a big issue out of it; life is just too short. If you feel
strongly that your coding style is the best, stick with it.