Re: [patch cr 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7

From: Ingo Molnar
Date: Fri Feb 03 2012 - 04:10:10 EST

* Cyrill Gorcunov <gorcunov@xxxxxxxxxx> wrote:

> > > + get_random_bytes(&cookies[i][j],
> > > + sizeof(cookies[i][j]));
> >
> > ugly line break.
> >
> Why? Looks pretty good to me. But sure I'll change it.

It's ugly because it serves no purpose other than pacifying
checkpatch and makes the code *uglier*.

It's a disease. When checkpatch tells you "this line is too
long" then consider it a code cleanliness warning!

And code
readability and cleanliness
is not improved
by random line-
breaks, right?

'breaking the line' is the *wrong fix* in roughly 90% of the

So instead of dumbly breaking the line you need to think about
*WHY* the line got too long, not just mechanically work around
the checkpatch warning!

Too long lines can have many reasons, it's usually one of
several reasons:

- too much nesting due to too large function.
solution: break up the function
or: - too verbose statements with not enough abbreviation
solution: find a more compact way to write it

or if the code looks compact enough and is not over-nested then
*leave the line alone*. By breaking it you have not improved -
you have made it worse.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at