public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: josh@joshtriplett.org
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Julia Lawall <julia.lawall@lip6.fr>,
	tapaswenipathak@gmail.com, opw-kernel@googlegroups.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Dan Carpenter <error27@gmail.com>,
	Andy Whitcroft <apw@canonical.com>
Subject: Re: [OPW kernel] checkpatch: Does anyone care that comments are freeform aligned?
Date: Fri, 26 Sep 2014 16:03:14 -0700	[thread overview]
Message-ID: <20140926230314.GN20632@cloud> (raw)
In-Reply-To: <1411584074.3594.17.camel@joe-AO725>

On Wed, Sep 24, 2014 at 11:41:14AM -0700, Joe Perches wrote:
> On Wed, 2014-09-24 at 07:47 +0200, Julia Lawall wrote:
> > In the following patch extract, one line is indented with spaces rather 
> > than tabs.  Is it intentional that checkpatch doesn't complain about this, 
> > I guess due to the line being a comment?
> []
> >  struct bcm_hdr_suppression_contextinfo {
> > -	UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */
> > -	UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */
> > +    /* Intermediate buffer to accumulate pkt Header for PHS */
> > +	UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS];
> > +	/* Intermediate buffer containing pkt Header after PHS */
> > +	UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN];
> >  };
> 
> checkpatch does not care when comments start in any
> particular position or ensure comments have tabs
> preceding them.
> 
> Does anyone care?

This should have already been caught by other whitespace checks that
check for indentations of 8 or more spaces.  Similarly, mixed tab/space
indentations would get caught by those same checks.  I don't think
checkpatch needs to check those.

- Josh Triplett

  reply	other threads:[~2014-09-26 23:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.02.1409240745160.2051@localhost6.localdomain6>
2014-09-24 18:41 ` checkpatch: Does anyone care that comments are freeform aligned? Joe Perches
2014-09-26 23:03   ` josh [this message]
2014-09-27  4:58     ` [OPW kernel] " Joe Perches

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=20140926230314.GN20632@cloud \
    --to=josh@joshtriplett.org \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=error27@gmail.com \
    --cc=joe@perches.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opw-kernel@googlegroups.com \
    --cc=tapaswenipathak@gmail.com \
    /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