From patchwork Tue Jul 2 12:30:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 168325 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp3866940ock; Tue, 2 Jul 2019 05:30:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAMO32nz4WQCfdFX+R+Yd7nXZhwKdk0qEZtl48QekgQ57gHMxUGx6N2igF5lPmS4yfsbnm X-Received: by 2002:a17:902:a40c:: with SMTP id p12mr35103873plq.146.1562070647156; Tue, 02 Jul 2019 05:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562070647; cv=none; d=google.com; s=arc-20160816; b=r2losILWVBdzvhgRIzLvWR1KiwPNe3uIyVgDcs4Grh9XffCMTXN4EPHqOxGC6FTbgj 40eu8KdYkO4SIv+QJPzHBbFo3DLAtln9ph302kh6NeS9M88blh0i5PFtfxoNHc7hITdi nvH0T26TR/G+FG29QNkiaSh24ZwUj68+oO6eXRyp7NdX08zd/lCXE197NSSRNH4Xc1oU SeWs0Cc9PEWFkiq2FINCkP8VBn+ZPEgvcSCHnL6NI7A9jJ0hscLMZC8J3IujFm4okdq2 Sc4UwDkw6CVo9uHmX4fKQ8CHYAao92Tyorozu2tCCBITPARb5daAyY9PqbmeVE5o94ku e4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=zAJAkCZQe2PLv50m79Bfa+UKIG+NXvvzFItidghkkZc=; b=tg9mqTF4X24glYewXBpIDUlN3J8dcRj98XUg786RRhB7FGOWjJvZbnS7JQCK+rSeFG lACggIlCqQ02LCKXZMzO+1SEgx2rmQEN4g7kmgo4qDVvMGlYM8ShVeamho5/JRG8xjQj t9oeqcInQdJUeO60y3na1KkkFEe0LjPJeZu15VEvbTgdAv3HlsS6rld19Wd+fnEHNXEk iMc5i9jngVaiEn9eqXCzlF+C0Ju7ef81As/uFje0/1nKrTf1+j2NtjRYbMkIZWRCfsIN OxyIGMFvFmiP08BtzJPJA85C1Q/pzQh/2Dj4DP0cuulWCadsH4U2pRQT2r/9U9025KpQ 2sxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si2222329pju.32.2019.07.02.05.30.46; Tue, 02 Jul 2019 05:30:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbfGBMap (ORCPT + 30 others); Tue, 2 Jul 2019 08:30:45 -0400 Received: from foss.arm.com ([217.140.110.172]:48752 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbfGBMap (ORCPT ); Tue, 2 Jul 2019 08:30:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7C0B7344; Tue, 2 Jul 2019 05:30:44 -0700 (PDT) Received: from e110176-lin.kfn.arm.com (unknown [10.50.4.178]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7094E3F703; Tue, 2 Jul 2019 05:30:43 -0700 (PDT) From: Gilad Ben-Yossef To: Andy Whitcroft , Joe Perches Cc: Ofir Drang , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: add *_NOTIFIER_HEAD as var definition Date: Tue, 2 Jul 2019 15:30:37 +0300 Message-Id: <20190702123037.28174-1-gilad@benyossef.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add *_NOTIFIER_HEAD as variable definition to avoid code like this: ATOMIC_NOTIFIER_HEAD(foo); EXPORT_SYMBOL_GPL(foo); >From triggering the the following warning: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Gilad Ben-Yossef --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) -- 2.21.0 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 342c7c781ba5..2377707f4441 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3864,6 +3864,7 @@ sub process { ^.DEFINE_$Ident\(\Q$name\E\)| ^.DECLARE_$Ident\(\Q$name\E\)| ^.LIST_HEAD\(\Q$name\E\)| + ^.$Ident._NOTIFIER_HEAD\(\Q$name\E\)| ^.(?:$Storage\s+)?$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(| \b\Q$name\E(?:\s+$Attribute)*\s*(?:;|=|\[|\() )/x) {