Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp926320imm; Thu, 5 Jul 2018 11:21:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdbnVBmMUGnWSKshwpJVOaToT4kXTZ3T2tBWoG5W3fUMMT4eL/4m0nG8I+zJi0/gmY2BSju X-Received: by 2002:a63:743:: with SMTP id 64-v6mr6788572pgh.216.1530814866020; Thu, 05 Jul 2018 11:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530814865; cv=none; d=google.com; s=arc-20160816; b=XDt9jCEA70VQK47CgqCEBPkYfzJLyjoQP0hs3uxd4mNdDP7QABnW9qmZvSWWnBPv0a LWg1ffYL6cA0ndFM091IwmNmeUg/xCqHGwxyTKfKWNTk501hWlv0rAD8VMqNsPuIjF1A CDKtQXAk1qrghnMpUj9Qa5ttfuRYic5w3ycJfZrzDciKivAepmhghOr2ySrMvu5jow2o bPOugRs/nS5mYmqaoxyVJqmYJ+Xl9x7oH7fMyIiNrrOiu62nXx5CbM2owzrEheWRCqfr sajxJpKFrUPArX+8kxERnZWpfT6bY79+r3ADVSAbdMNyu1uetTfbqffkbXEL4aHxsVum OT9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=YrRDBeSyg3z50T+47k5mlG6rhEWPYYYYVkjwzn9CCDQ=; b=cp1/kO5+0ZUwDhDjdPkzo40nTWcng8pxJ/Gh2vro8fXooXeIPDwIzA8xrGlxuvnalP a2joHaJxy3VsPuFNfL/Wr+8KS3hyiyfo7brnG/L1BYqoikqAM0E2gNDX/SotGhm4A6gs QPxB5STkyiflbPKG/EZyokRhja4kVXtzNaE1S9/pIwSvm7O4YKviZ6JyeNSoHkQh+HiH 5BDphl8MGXd44AEQgOG2jeEzJyoqkbrW8WOz4OPPfgdcQ1mB/PJ5zBn/BTggIdc3E9O8 fXIGSlI/M1SNs9y/ypNhAWmB1GYMZTyDj6/tlGvxBB73JAEAzWGrbJGlKN99CBpiGEI0 9vlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="VqE/lXKj"; dkim=pass header.i=@codeaurora.org header.s=default header.b=I+v7iXoQ; 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 bd1-v6si6307393plb.338.2018.07.05.11.20.49; Thu, 05 Jul 2018 11:21:05 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="VqE/lXKj"; dkim=pass header.i=@codeaurora.org header.s=default header.b=I+v7iXoQ; 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 S1753934AbeGESTv (ORCPT + 99 others); Thu, 5 Jul 2018 14:19:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53724 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753812AbeGESTu (ORCPT ); Thu, 5 Jul 2018 14:19:50 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 48D5960B19; Thu, 5 Jul 2018 18:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530814790; bh=2uqVOsCHcnPMKQGtBV6D3kkd1tnTg786zhLFaWrHsHo=; h=From:To:Cc:Subject:Date:From; b=VqE/lXKjcOcmI8csKeOcgJcFMlrMiwALFZiX32stQxxnhcmc5FuNx05uAl5maWj+G wWslzwZmtnH/WnRCtjgJ73D+HXEsIv+SLLvNJzaa1/y+gC82Skyzrv+g1n6yAVpOs4 H+Keol5LlueB8EzCIZ2a2YAqc65n4KjcdSkzay4o= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from pheragu-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pheragu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8A2DC607EB; Thu, 5 Jul 2018 18:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530814789; bh=2uqVOsCHcnPMKQGtBV6D3kkd1tnTg786zhLFaWrHsHo=; h=From:To:Cc:Subject:Date:From; b=I+v7iXoQ6Fp9ykaIuZJAe4oKcFlDtTO1q61X6xbLO+pdqNMx44VA2XtdlPx35A85i vqAU3pHCx6jHyIENZpE7B945aXBODRP4sOEp+yo15V5dC87CKCvIbNqnKncmvh3U2p Wuu93m8nG9kgOpIxxnd+120POTRcwmQW1i4vzIU8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8A2DC607EB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pheragu@codeaurora.org From: Prakruthi Deepak Heragu To: apw@canonical.com, joe@perches.com Cc: linux-kernel@vger.kernel.org, ckadabi@codeaurora.org, tsoni@codeaurora.org, bryanh@codeaurora.org, Prakruthi Deepak Heragu Subject: [PATCH] checkpatch: Add exceptions for dsb keyword usage Date: Thu, 5 Jul 2018 11:19:36 -0700 Message-Id: <1530814776-16988-1-git-send-email-pheragu@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mb() API can relpace the dsb() API in the kernel code. So, dsb() usage is discouraged. However, there are exceptions when dsb is used in a variable or a function name. Exceptions are when 'dsb' is prefixed with class [-_>*\.] and/or suffixed with class [-_\.;]. Signed-off-by: Prakruthi Deepak Heragu --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a9c0550..978c752 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5372,6 +5372,12 @@ sub process { "Avoid line continuations in quoted strings\n" . $herecurr); } +# dsb is too ARMish, and should usually be mb. + if ($line =~ /[^-_>*\.]\bdsb\b[^-_\.;]/) { + WARN("ARM_BARRIER", + "Use of dsb is discouranged: prefer mb.\n" . + $herecurr); + } # warn about #if 0 if ($line =~ /^.\s*\#\s*if\s+0\b/) { CHK("REDUNDANT_CODE", -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project