From patchwork Mon Nov 27 10:38:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 119667 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp55922qgn; Mon, 27 Nov 2017 02:38:57 -0800 (PST) X-Google-Smtp-Source: AGs4zMYzZ+NIwOnuS2TOQq5Oo6uZhnB4eDAAvNrG5eGr7s1VjdBJ7pFk9sa6TZzFGibPNNVm0uSi X-Received: by 10.84.168.193 with SMTP id f59mr35846531plb.251.1511779137529; Mon, 27 Nov 2017 02:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511779137; cv=none; d=google.com; s=arc-20160816; b=rSHoaJ3VDApfnh9IeOu2Gocl/Edc/TAP01COuw3iSxWiZTMX1zGNAix3NYQxLDKd6X BRpcrLGOkA1L26LCEG/WzY+G45yBR2PAhmpWktWdko+bULpPjPxvYQB8nDRRVcUb9CLv odN+eH4pB7wCwxFrI3RtsMf4OXSYVrnGdl2WKLG8XFR1UdSe/qRgJUQOQm0ZL2O//5nj rOFG89OnS0VqSDyZ/ImJt9/DmCHTcrUzT5a82Y9i8n/RdPEkRIlOcsFkoKNDhrgjIYN3 rA/2x6kOVT9lmkQHozJtTBy9OSV6AwlyIB7i4wYRdNMBZ+MI9tB57w55/vzBnnCsQgew CPIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=JBLUYbJvrzbMvL2u4WslclxEryY3kwugNFIokAAlXoI=; b=RCr4uEBIvb+GZadDoqzQhadubr6Bvv8x53Prwlzev5EWz4XHAonl8EutkKt2jWMHkk Je2nJVWBy8X4RGOBeocH9unp0nx+gIe5X8RBQtSN5/TaNT+729Q/Mu0vGKFmhDVNY1+7 +Euyu4u6Aa/tlVLYWbYcT6YD5ome+F+PHjZbdnueO3u36UjeZ3O/mYHQ9clSLKJ5Gvl0 e6aVTl3XRFV5FdLYkkUCoyflgxGZ1Td12pcA+YAeVJJOr9BMwwBZAOC9TasYl5VxvoYd agTcTXWBm2xdG5AkmS/9yoLB3Di4i2Rd6K5/dJ5E9unjmgQmT+cxyHcBNfeTtntT0q14 mIwA== 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 j21si22835555pga.622.2017.11.27.02.38.57; Mon, 27 Nov 2017 02:38:57 -0800 (PST) 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 S1752036AbdK0Kim (ORCPT + 28 others); Mon, 27 Nov 2017 05:38:42 -0500 Received: from foss.arm.com ([217.140.101.70]:35810 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbdK0Kik (ORCPT ); Mon, 27 Nov 2017 05:38:40 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1F7AB1650; Mon, 27 Nov 2017 02:38:40 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9A2133F246; Mon, 27 Nov 2017 02:38:38 -0800 (PST) From: Mark Rutland To: linux-kernel@vger.kernel.org, mingo@redhat.com Cc: acme@redhat.com, apw@canonical.com, joe@perches.com, mark.rutland@arm.com, paulmck@linux.vnet.ibm.com, peterz@infradead.org Subject: [PATCH 4/4] checkpatch: remove ACCESS_ONCE() warning Date: Mon, 27 Nov 2017 10:38:24 +0000 Message-Id: <20171127103824.36526-5-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171127103824.36526-1-mark.rutland@arm.com> References: <20171127103824.36526-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that ACCESS_ONCE() has been excised from the kernel, any uses will result in a build error, and we no longer need to whine about it in checkpatch. This patch removes the newly redundant warning. Signed-off-by: Mark Rutland Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Joe Perches Cc: Paul E. McKenney Cc: Peter Zijlstra --- scripts/checkpatch.pl | 22 ---------------------- 1 file changed, 22 deletions(-) -- 2.11.0 Acked-by: Joe Perches diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 95cda3ecc66b..95c08493b78b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6233,28 +6233,6 @@ sub process { } } -# whine about ACCESS_ONCE - if ($^V && $^V ge 5.10.0 && - $line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) { - my $par = $1; - my $eq = $2; - my $fun = $3; - $par =~ s/^\(\s*(.*)\s*\)$/$1/; - if (defined($eq)) { - if (WARN("PREFER_WRITE_ONCE", - "Prefer WRITE_ONCE(, ) over ACCESS_ONCE() = \n" . $herecurr) && - $fix) { - $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)\s*$eq\s*\Q$fun\E/WRITE_ONCE($par, $fun)/; - } - } else { - if (WARN("PREFER_READ_ONCE", - "Prefer READ_ONCE() over ACCESS_ONCE()\n" . $herecurr) && - $fix) { - $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)/READ_ONCE($par)/; - } - } - } - # check for mutex_trylock_recursive usage if ($line =~ /mutex_trylock_recursive/) { ERROR("LOCKING",