Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1677290pxb; Thu, 7 Oct 2021 12:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbG/FHmbCo9RgyICgZ/ZWg5aWn+663pH6fvBKJvhGSZl9EKib2d1lCtIzMdIXeRmFI6vej X-Received: by 2002:a17:90b:390d:: with SMTP id ob13mr7717869pjb.50.1633635626853; Thu, 07 Oct 2021 12:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635626; cv=none; d=google.com; s=arc-20160816; b=Fd+duXrrXTk0QiIQZq27WhbS6A/cUYsk4GK+g4vskYKwiA3LWduutLIaMiD2SH7auo +bV+/4tcO1o8iDWWYVp+mV5uALHDCjVYE42m5ouyG5kWhOG6dwJHvmQ3T0/IhaCrw/rj 2wucsnsAtVp7r4Oier9hPoakjMinXwnxaQg6SqCmceEMxfMO9krX+aEfZ1QTyZcnvm4k 3F8itbRowmZx9Fab7Xm2uJgD+7ykx/GNJEk26NZIYXSA13FvqwC8nmM7U3d3khFoxoaj QtHS4VpuIYxJStBy77UpKQhZhOJID47MG5eF691CeLERP3rTBjl8+wjzev3KJavQul8W 2gDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=qFrD+No5DbQ5FLb3CB+4TpzyX1GFwYTIh8zI48AsiO8=; b=ea047hxcKjEZcdC3XnyCLYxuNpqxEyWXk8RfUx6dWNXKCk4wx4TNxCTb89Ura5jY6U Y5b4qAQl2GIXJLVaPj3yD49IHCIPJK8wSKAEa4O3JpdXVreyGlQnIUknoFLa2o3GKtI1 pjLsdrBDGaozIKKFYGbfYJ80omyMRVfMGSytOTU2+s88N5g6IMCFKQyH92FXzWvgcK1D XiBlCVFOm8wW65k7Dj3Qc+z9V85qtGaDMpimCNU6E+STtDrhUmblkGYyTdtj6NbjBaGr 3IkVTelQDedInqtUbm2sxWjSUuOsJqsK0NPmj25/vdEPvT3TS5Btzprk/RT4j96O3zC7 s1Jw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si358310pgk.161.2021.10.07.12.40.12; Thu, 07 Oct 2021 12:40:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242494AbhJGQGh (ORCPT + 99 others); Thu, 7 Oct 2021 12:06:37 -0400 Received: from smtprelay0025.hostedemail.com ([216.40.44.25]:47690 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233060AbhJGQGg (ORCPT ); Thu, 7 Oct 2021 12:06:36 -0400 Received: from omf14.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id BBBD818062A0E; Thu, 7 Oct 2021 16:04:41 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf14.hostedemail.com (Postfix) with ESMTPA id BE3DC268E31; Thu, 7 Oct 2021 16:04:40 +0000 (UTC) Message-ID: <9e8f251b42e405f460f26a23ba9b33ef45a94adc.camel@perches.com> Subject: [PATCH] checkpatch: Improve EXPORT_SYMBOL test for EXPORT_SYMBOL_NS uses From: Joe Perches To: Andrew Morton Cc: Ian Pilcher , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , "linux-kernel@vger.kernel.org" Date: Thu, 07 Oct 2021 09:04:39 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=4.33 X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: BE3DC268E31 X-Stat-Signature: m6hnjryndt4utiswzr8ygdmeagir194f X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19zynEo4NQerF8enbp3XV6Pr8L4gJ4c+pY= X-HE-Tag: 1633622680-946455 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The EXPORT_SYMBOL test expects a single argument but definitions of EXPORT_SYMBOL_NS have multiple arguments. Update the test to extract only the first argument from any EXPORT_SYMBOL related definition. Reported-by: Ian Pilcher Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 88cb294dc4472..91798b07c6cb5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4449,6 +4449,7 @@ sub process { # XXX(foo); # EXPORT_SYMBOL(something_foo); my $name = $1; + $name =~ s/^\s*($Ident).*/$1/; if ($stat =~ /^(?:.\s*}\s*\n)?.([A-Z_]+)\s*\(\s*($Ident)/ && $name =~ /^${Ident}_$2/) { #print "FOO C name<$name>\n";