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-next>] [day] [month] [year] [list]
Date:	Thu, 26 Dec 2013 16:58:35 -0800
From:	Josh Triplett <josh@...htriplett.org>
To:	Joe Perches <joe@...ches.com>, akpm@...ux-foundation.org
Cc:	Manfred Spraul <manfred@...orfullife.com>,
	Andy Whitcroft <apw@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] checkpatch: Add tests for function pointer style
 misuses

On Thu, Dec 26, 2013 at 12:07:23PM -0800, Josh Triplett wrote:
> On Thu, Dec 26, 2013 at 11:20:28AM -0800, Joe Perches wrote:
> > Kernel style uses function pointers in this form:
> >         "type (*funcptr)(args...)"
> > 
> > Emit warnings when this function pointer form isn't used.
> > 
> > Signed-off-by: Joe Perches <joe@...ches.com>
> 
> Two comments below.

On Thu, Dec 26, 2013 at 02:16:10PM -0800, akpm@...ux-foundation.org wrote:
> The patch titled
>      Subject: checkpatch: add tests for function pointer style misuses
> has been added to the -mm tree.  Its filename is
>      checkpatch-add-tests-for-function-pointer-style-misuses.patch

Here's a patch that fixes the two messages I commented about, which
applies on top of the version of the patch that went into -mm.

---8<---
From: Josh Triplett <josh@...htriplett.org>
Subject: [PATCH] Fix up messages from "checkpatch: Add tests for function pointer style misuses"

Fix an ambiguity in one warning message and a copy/paste problem in
another.

Signed-off-by: Josh Triplett <josh@...htriplett.org>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2460094..b74b086 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2831,7 +2831,7 @@ sub process {
 			if (defined $pre_pointer_space &&
 			    $pre_pointer_space =~ /^\s/) {
 				WARN("SPACING",
-				     "Unnecessary space after function pointer open parenthesis\n" . $herecurr);
+				     "Unnecessary space between open parenthesis and '*' in function pointer declaration\n" . $herecurr);
 			}
 
 # unnecessary space "type (* funcptr)(args...)"
@@ -2852,7 +2852,7 @@ sub process {
 			if (defined $pre_args_space &&
 			    $pre_args_space =~ /^\s/) {
 				WARN("SPACING",
-				     "Unnecessary space before function pointer name\n" . $herecurr);
+				     "Unnecessary space before function pointer argument list\n" . $herecurr);
 			}
 
 			if (show_type("SPACING") && $fix) {
-- 
1.8.5.2

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