lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 3 Feb 2012 10:09:29 +0100 From: Ingo Molnar <mingo@...e.hu> To: Cyrill Gorcunov <gorcunov@...nvz.org> Cc: linux-kernel@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>, Pavel Emelyanov <xemul@...allels.com>, Serge Hallyn <serge.hallyn@...onical.com>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>, Kees Cook <keescook@...omium.org>, Tejun Heo <tj@...nel.org>, Andrew Vagin <avagin@...nvz.org>, "Eric W. Biederman" <ebiederm@...ssion.com>, Alexey Dobriyan <adobriyan@...il.com>, Andi Kleen <andi@...stfloor.org>, KOSAKI Motohiro <kosaki.motohiro@...il.com>, "H. Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, Glauber Costa <glommer@...allels.com>, Matt Helsley <matthltc@...ibm.com>, Pekka Enberg <penberg@...nel.org>, Eric Dumazet <eric.dumazet@...il.com>, Vasiliy Kulikov <segoon@...nwall.com>, Valdis.Kletnieks@...edu Subject: Re: [patch cr 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7 * Cyrill Gorcunov <gorcunov@...nvz.org> 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 cases. 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. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists