From: Joe Perches <joe@perches.com>
To: miles.chen@mediatek.com, apw@canonical.com
Cc: linux-kernel@vger.kernel.org, wsd_upstream@mediatek.com
Subject: Re: [PATCH] checkpatch: update $logFunctions
Date: Fri, 13 Jan 2017 00:14:17 -0800 [thread overview]
Message-ID: <1484295257.3065.31.camel@perches.com> (raw)
In-Reply-To: <1484293088-17617-1-git-send-email-miles.chen@mediatek.com>
On Fri, 2017-01-13 at 15:38 +0800, miles.chen@mediatek.com wrote:
> From: Miles Chen <miles.chen@mediatek.com>
>
> Currently checkpatch.pl does not recognize printk_deferred* functions as
> log functions and complains about the line length of printk_deferred*
> functoins. Add printk_deferred* to logFunctions to fix it.
Hi Miles.
Good idea, perhaps less good an implementation though.
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -425,7 +425,7 @@ our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
>
> our $logFunctions = qr{(?x:
> printk(?:_ratelimited|_once|)|
> - (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
> + (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN|deferred)(?:_ratelimited|_once|)|
This should be a change on the line above like
printk(?:_ratelimited|_once|_deferred|_deferred_once|)|
without a change on your suggested line.
Or perhaps changing both lines if there are to be
macros/functions like pr_<level>_deferred_once someday.
printk(?:_ratelimited|_once|_deferred|_deferred_once|)|
(?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|_deferred|deferred_once|)|
next prev parent reply other threads:[~2017-01-13 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 7:38 [PATCH] checkpatch: update $logFunctions miles.chen
2017-01-13 8:14 ` Joe Perches [this message]
2017-01-16 2:57 ` Miles Chen
2017-01-16 3:14 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484295257.3065.31.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miles.chen@mediatek.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.