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: <20091026111642.GE12089@shadowen.org>
Date:	Mon, 26 Oct 2009 11:16:42 +0000
From:	Andy Whitcroft <apw@...onical.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch.pl: Allow > 80 char lines for logging
 functions not just printk

On Fri, Oct 02, 2009 at 05:10:04PM -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@...ches.com>
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 87bbb8b..ae74ab1 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -186,6 +186,14 @@ our $typeTypedefs = qr{(?x:
>  	atomic_t
>  )};
>  
> +our $logFunctions = qr{(?x:
> +	printk|
> +	pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)|
> +	dev_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)|
> +	WARN|
> +	panic
> +)};
> +
>  our @typeList = (
>  	qr{void},
>  	qr{(?:unsigned\s+)?char},
> @@ -1367,7 +1375,7 @@ sub process {
>  #80 column limit
>  		if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
>  		    $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
> -		    $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
> +		    $line !~ /^\+\s*$logFunctions\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
>  		    $length > 80)
>  		{
>  			WARN("line over 80 characters\n" . $herecurr);

Yep that looks reasonable to me.  I have a slightly modified version in
my tree.  Will be in the next batch to akpm.

  http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

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