From: Randy Dunlap <rdunlap@xenotime.net>
To: Arne Jansen <lists@die-jansens.de>
Cc: Jeffrin Jose <ahiliation@yahoo.co.in>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: aligning with spaces [was: Re: format fixes]
Date: Sun, 20 Mar 2011 10:35:03 -0700 [thread overview]
Message-ID: <20110320103503.8de522d1.rdunlap@xenotime.net> (raw)
In-Reply-To: <4D860381.30706@die-jansens.de>
On Sun, 20 Mar 2011 14:39:13 +0100 Arne Jansen wrote:
> On 20.03.2011 11:45, Jeffrin Jose wrote:
> > I have created a patch with fixes and format
> > error by replacing spaces with tabs.
>
> The CodingStyle guide seems to me a big vague on this topic, but
> checkpatch.pl has a clear idea of what is right and wrong. But
> the formerly present indentation seems to me totally valid.
AFAICT, the patch replaces 8 spaces with 1 tab. That's a good change
IMO, except that the patch does not apply to linux-next 2011-0318.
I can't tell if the patch was made against an earlier tree or a later one.
In either case, it looks like this particular printk has probably already
been fixed by some other patch.
> Use tab to indent to the current indentation level, then continue
> with spaces for the alignment of broken-up lines. This has a
> few advantages. One of them is that the code still looks neat with
> a different tab size (of course, no one ever does that). Another is,
> that editing is easier if you change the name of the function and
> with it the needed alignment for the following lines.
> If we really require using tabs as much as possible for aligning, we
> should also _only_ use tabs for it and require e.g. 2 tabs for
> broken-up lines.
> In fact, the example in CodingStyle uses only tabs and does not try
> to align the double quotes of the broken-up string with each other.
We accept patches either way, but it mostly depends on (a) the
current/surrounding code and (b) the maintainer who is merging the patches.
CodingStyle may be vague on all of this. It's easy to be ambiguous or
vague in language, even when you try not to be.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
prev parent reply other threads:[~2011-03-20 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-20 10:45 format fixes Jeffrin Jose
2011-03-20 13:39 ` aligning with spaces [was: Re: format fixes] Arne Jansen
2011-03-20 17:35 ` Randy Dunlap [this message]
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=20110320103503.8de522d1.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=ahiliation@yahoo.co.in \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@die-jansens.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).