All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Borislav Petkov <bp@suse.de>
Cc: "Gustavo Leite" <gustavoleite.ti@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Kees Cook" <keescook@chromium.org>,
	"Baoquan He" <bhe@redhat.com>, "Ian Abbott" <abbotti@mev.co.uk>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: Re: [PATCH] linux/kernel.h: break long lines
Date: Sat, 24 Feb 2018 13:45:30 -0500	[thread overview]
Message-ID: <20180224184530.GC31264@thunk.org> (raw)
In-Reply-To: <20180224183044.GB29374@pd.tnic>

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

  reply	other threads:[~2018-02-24 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 18:10 [PATCH] linux/kernel.h: break long lines Gustavo Leite
2018-02-24 18:30 ` Borislav Petkov
2018-02-24 18:45   ` Theodore Ts'o [this message]
2018-02-24 18:51     ` Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2018-02-24 21:17 Alexey Dobriyan

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=20180224184530.GC31264@thunk.org \
    --to=tytso@mit.edu \
    --cc=abbotti@mev.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bp@suse.de \
    --cc=gustavoleite.ti@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.