From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbdAPC5m (ORCPT ); Sun, 15 Jan 2017 21:57:42 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:29391 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751431AbdAPC5l (ORCPT ); Sun, 15 Jan 2017 21:57:41 -0500 Message-ID: <1484535455.17875.3.camel@mtkswgap22> Subject: Re: [PATCH] checkpatch: update $logFunctions From: Miles Chen To: Joe Perches CC: , , Date: Mon, 16 Jan 2017 10:57:35 +0800 In-Reply-To: <1484295257.3065.31.camel@perches.com> References: <1484293088-17617-1-git-send-email-miles.chen@mediatek.com> <1484295257.3065.31.camel@perches.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-01-13 at 00:14 -0800, Joe Perches wrote: > On Fri, 2017-01-13 at 15:38 +0800, miles.chen@mediatek.com wrote: > > From: Miles Chen > > > > 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. Hi Joe, Thanks for your advice, I'll modify my patch and submit it again. thanks, Miles > > Or perhaps changing both lines if there are to be > macros/functions like pr__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|)| >