[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180224184530.GC31264@thunk.org>
Date: Sat, 24 Feb 2018 13:45:30 -0500
From: Theodore Ts'o <tytso@....edu>
To: Borislav Petkov <bp@...e.de>
Cc: Gustavo Leite <gustavoleite.ti@...il.com>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Kees Cook <keescook@...omium.org>, Baoquan He <bhe@...hat.com>,
Ian Abbott <abbotti@....co.uk>,
Randy Dunlap <rdunlap@...radead.org>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>
Subject: Re: [PATCH] linux/kernel.h: break long lines
On Sat, Feb 24, 2018 at 07:30:44PM +0100, Borislav Petkov wrote:
>
> And, for the record, if we have to break a function signature, we align the
> arguments at the opening brace like this:
>
> static inline int __must_check kstrtou64_from_user(const char __user *s,
> size_t count, unsigned int base, u64 *res)
>
An alternate approach is this:
static inline int __must_check
kstrtou64_from_user(const char __user *s, size_t count, unsigned int base, u64 *res)
Which yes, is still longer than 80 characters. But this is where
blindly following coding guidelines as if they are fundamentalist
biblical doctrine is not really a great idea. The goal is to make the
code easier to read, and very often it's important to apply _judgement_.
(Which is one of the reasons why I generally don't really like newbies
trying to apply checkpatch.pl to existing source files.)
Cheers,
- Ted
Powered by blists - more mailing lists