Re: [OPW kernel] checkpatch: Does anyone care that comments are freeform aligned?
From: josh
Date: Fri Sep 26 2014 - 19:03:24 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/