Re: Checkpatch error on trace events macros

From: Joe Perches
Date: Mon Jul 29 2013 - 17:48:35 EST


On Mon, 2013-07-29 at 14:23 -0700, Sarah Sharp wrote:
> On Mon, Jul 29, 2013 at 01:02:44PM -0700, Joe Perches wrote:
> > On Mon, 2013-07-29 at 12:52 -0700, Sarah Sharp wrote:
[]
> > > sarah@xanatos:~/git/kernels/xhci$ git am -s ~/Maildir.fetchmail/.to-apply
> > > Applying: xhci: add traces for debug messages in xhci_address_device()
> > > ERROR: Macros with complex values should be enclosed in parenthesis
> > > #86: FILE: drivers/usb/host/xhci-trace.h:15:
> > > +#define TRACE_SYSTEM xhci-hcd
> >
> > <shrug>
> >
> > I think these are suboptimal as the files should use
> > underscores rather than dashes.

It's ~3:2 in favor of _ in the tree.

$ git ls-files | awk -F"/" '{print $NF;}' | grep "-" | wc -l
8078
$ git ls-files | awk -F"/" '{print $NF;}' | grep "_" | wc -l
12577

closer to 1:1 if you include all the directory names too.

$ git ls-files | grep "-" | wc -l
11821
$ git ls-files | grep "_" | wc -l
13005

> The norm in the USB subsystem is to use dashes in filenames.

Not really.

$ git ls-files drivers/usb | awk -F"/" '{print $NF;}' | grep "-" | wc -l
168
$ git ls-files drivers/usb | awk -F"/" '{print $NF;}' | grep "_" | wc -l
177

> there is no "should" here, just opinions.

Given the "I think", we agree!

--
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/