Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1424495pxb; Fri, 10 Sep 2021 05:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzecN30TzIaldsqpW2oWVWWrGZTzsJn2SnfRtRjmzuyP++3UTcwJjG0fcBLex3F8cllm6Hz X-Received: by 2002:a05:6602:2597:: with SMTP id p23mr6924391ioo.195.1631278015940; Fri, 10 Sep 2021 05:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631278015; cv=none; d=google.com; s=arc-20160816; b=oKpdRKug6qEIw6TdbcHLPixT/6e0Gb52isVzMLPHiJwPjbl5LpNObqdMQvLbTzIwxe r8SmTqdRvWXBkF8KrLHO0dlV6T+3ViN6v9s1R4VTaQrqLp+PQg/6OmWRbQPjnkFnbmZh TxT+YtNoY7egC/2Lb1yqtcxpHTeFoOyH+YuMIgjD+byO+KqErSC+Zmw0L6cbXmZMiUSK QKbXu6uAC8dC1KtrnlJvjtC2KJTtUR54R1yEmwpZpzpczfvkH//ilYQnyyfV76zdNzWe hISN9KgnJdJcSpK5AAxtnqq46I/4AdK0Cc2KWOLrIOVwKUl1s9hrDFHJBcGng5erVQqh KFcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :date:message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=lOcmrQBKqFtpYDC8vrDmy3K/bJ9ui5jmkS279d2Cn64=; b=ZeoAvfVdLHGKYBaH56+ZRcmD9b0O/uu43vUoKBnfREt9T8qGB81REEbHYJ2B4rW/NT qn0dqHHYJNxWIHoHxKhuuhbMslqRxL7/b0/Sz/ftnhbys4giz71af+q+1WsDES1ej8GY U7U7KQUPwWSXyX58XDd+3s7V+8Ao4a560krL5Wao/b7G71I4NH+U1IFX8lkVqpkCR0mb 72rrODxnw3WAaXicugO7cbvn24YHpClcQ4fM13+7ONs+1+c4ttaQChTlQRGA0GD6GCQM L+gAGzkEkQeY/5JSPyX1hMxPZquhJe8+zNHJ1fP1lvUu0ZYpe5lqEyNRAwuinhHTexm3 kmyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FXpdBMKy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si4840410ion.97.2021.09.10.05.46.44; Fri, 10 Sep 2021 05:46:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=FXpdBMKy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233224AbhIJMqq (ORCPT + 99 others); Fri, 10 Sep 2021 08:46:46 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:53587 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233559AbhIJMqq (ORCPT ); Fri, 10 Sep 2021 08:46:46 -0400 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210910124533epoutp024c1f8b45cc054b3c291762034c40933f~jdqM8RmrH3195931959epoutp02y for ; Fri, 10 Sep 2021 12:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210910124533epoutp024c1f8b45cc054b3c291762034c40933f~jdqM8RmrH3195931959epoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1631277933; bh=lOcmrQBKqFtpYDC8vrDmy3K/bJ9ui5jmkS279d2Cn64=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=FXpdBMKyzMrK+b6NVpOrn7Xx/1jY/ob4wJD0zJ5xAS6ktGn2LRZZJP8LlprVIZejo 2/ow8ODEdYyKR/I03ESpNwqrgGDijSis5UxjWnSosGMx2rwecBQg/t2i3SRPbt6d+f IlZa7J24CWA5wFWs0HsdIbLaIsJAVP9H3yk9Sh3M= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20210910124532epcas5p336995bb63633949fea4acee875577b3e~jdqMVGzAN0678906789epcas5p30; Fri, 10 Sep 2021 12:45:32 +0000 (GMT) X-AuditID: b6c32a4b-251ff700000095ca-14-613b536c5c67 Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id A9.F7.38346.C635B316; Fri, 10 Sep 2021 21:45:32 +0900 (KST) Mime-Version: 1.0 Subject: RE: [PATCH 1/1] scripts/checkpatch.pl: remove warning for pritk_deferred also Reply-To: maninder1.s@samsung.com Sender: Maninder Singh From: Maninder Singh To: Andy Whitcroft CC: "joe@perches.com" , "dwaipayanray1@gmail.com" , "lukas.bulwahn@gmail.com" , "linux-kernel@vger.kernel.org" , AMIT SAHRAWAT , Vaneet Narang X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20210910124532epcms5p3b63de3ee7ae2511817cb106c55a74946@epcms5p3> Date: Fri, 10 Sep 2021 18:15:32 +0530 X-CMS-MailID: 20210910124532epcms5p3b63de3ee7ae2511817cb106c55a74946 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8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w9ciZY9L7jlpACvHv/a4Pb81ik8110ilTZzK7EU ZyQaajEXFScCANaU/CySAwAA X-CMS-RootMailID: 20210824063513epcas5p46ba8b375c3e32fab210640a28041efb6 References: <1629786900-4644-1-git-send-email-maninder1.s@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, >It looks sensible to add `_deferred`, there also looks to be an >`_deferred_once` variant which should also be added. See the first >stanza of `$logFunctions`. We might also consider splitting up >`$logFunctions` so that we can consume the reset without that first >stanza? Something like this (completly untested): > > our $logFunctionsCore = qr{(?x: > (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| > TP_printk| > WARN(?:_RATELIMIT|_ONCE|)| > panic| > MODULE_[A-Z_]+| > seq_vprintf|seq_printf|seq_puts > )}; > our $logFunctions = qr{(?x: > printk(?:_ratelimited|_once|_deferred_once|_deferred|)| > $logFunctionsCore > )}; > sent V2 patch with testing basic checks: https://lkml.org/lkml/2021/9/7/329 $ cat test.c printk_deferred(KERN_ALERT "checking deferred\n"); printk_deferred_once(KERN_ALERT "checking deferred\n"); printk(KERN_ERR"error"); pr_emerg("Protocol: %#06hx\n", ntohs(eth->h_proto)); printk_deferred(KERN_ALERT "Protocol: %#06hx\n", ntohs(eth->h_proto)); WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... #22: FILE: test.c:22: +printk(KERN_ERR"error"); WARNING: Integer promotion: Using 'h' in '%#06hx' is unnecessary #23: FILE: test.c:23: +pr_emerg("Protocol: %#06hx\n", ntohs(eth->h_proto)); WARNING: Integer promotion: Using 'h' in '%#06hx' is unnecessary #24: FILE: test.c:24: +printk_deferred(KERN_ALERT "Protocol: %#06hx\n", ntohs(eth->h_proto)); Thanks, Maninder Singh