lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1287428987.20968.156.camel@Joe-Laptop>
Date:	Mon, 18 Oct 2010 12:09:47 -0700
From:	Joe Perches <joe@...ches.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Mike Frysinger <vapier@...too.org>, Ted Ts'o <tytso@....edu>,
	Andy Whitcroft <apw@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: allow single space before labels

On Mon, 2010-10-18 at 20:32 +0200, Peter Zijlstra wrote:
> On Mon, 2010-10-18 at 14:21 -0400, Mike Frysinger wrote:
> > sounds like an ACK for Joe's patch

I didn't submit a patch, I suggested a possible improvement to
your patch.  If you agree with it, you could resubmit.

> There are checks I don't really like, for those I simply ignore its
> output, I suggest others do the same.

Seems sensible.

Mike, checkpatch does already allow a single space to precede
a label but there's a conflict between the leading spaces test
and this test below it, so something like your patch is useful.

----------------
#goto labels aren't indented, allow a single space however
		if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
		   !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
			WARN("labels should not be indented\n" . $herecurr);
		}
----------------

The leading space test may be overly noisy.
Maybe Andy can fix it a different way.

About 1% (~500) of the labels in the kernel source tree use
leading tabs.  I think that label style is harder for me to
visually scan and find, but it's probably not code I'd change
just for conformity.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ