From patchwork Tue Oct 16 23:51:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brendan Higgins X-Patchwork-Id: 985047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rl0PTKoR"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="iP/y8MyF"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42ZXH25nH8z9sCf for ; Wed, 17 Oct 2018 10:54:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6nUHlqZyy0KbxOsJMuOoxBEVBvxRYbecB3GM7TdUS8g=; b=rl0PTKoRPLRRGE N2knvkcZI3sH/bBNBL5iPAu2ZIedX8PXo4a2mW/t3YM4eObBTbfY/bhHXj/F0ipNi/gMFAOC8GxVL W2uPfjHuvIZgciKcxGoZ/29xyz3/+wfOcOEYI59u9VYqUNOMPTG/L+GW2xDMrKvWG85MgDObSLN7S ubQjypFv2QPQtcggHF6+gNChJcHhT1m4pmxcN41Bj7ypA5OjkRER5jxHgYDa4c4BArWPZHgT5i9nU 2jY1uq0oxhHOX9/uk83KhBg1AP1OuN7RRvizYeILsKFfGqnIC4AnLe+TvcUccLsvcVHJV5Zq3FRWm F9QyK1jqJdJ+6ysZUL2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCZAj-0004W3-II; Tue, 16 Oct 2018 23:54:45 +0000 Received: from mail-it1-x14a.google.com ([2607:f8b0:4864:20::14a]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCZAR-0004Cq-5P for linux-um@lists.infradead.org; Tue, 16 Oct 2018 23:54:31 +0000 Received: by mail-it1-x14a.google.com with SMTP id h20-v6so243866ita.0 for ; Tue, 16 Oct 2018 16:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=aOdwwUuIBSYrb87g8bgBF5GxaXD8rfXvHJcd9fKQrvE=; b=iP/y8MyFsGmeSdqTp8obc/qxmgmmwf9LAObDYZtUylHVznP5XcuFzkpY8gv4WaAD0e L+btQwyLCtTxGnIse6dnkKY/36GGaBW9paJBnJ8t56dRi0Lza3SCKJ0ggJByY4ncyPJn bYFHjWGLxBoCZRo5cMXb+2ZiYOeivU7vz9Pzjh+I6QvydFhrsnz+FLlbSbSA20eL6ACz ROH0FnhfrLrPthtqwyxiU9xPDTs5vueFT2vNO6Wqqa/QVfkyI9LYXMrefxr0Xj+g/qkF vIqdH11a+uPoNd3j3DCR5mIPtRBQiSuHdaHYL8naDULXhd1L9Ljrd1ZDV/NstzLC/IXn UdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=aOdwwUuIBSYrb87g8bgBF5GxaXD8rfXvHJcd9fKQrvE=; b=YYLTvtvYs11CdFhaXhjGNSomAi7tRM1c9PqFveiM431p51vmXMJF6ftlgf6bqyXMAk paPKpeG/w9kfETN5zw6RiVYKdknPOeOtS0xvPKAZxA8VvIzzLen4IRi1A/oYkepQnrc6 RRYOwazVYmUenUnfcNVcRrpI6le/Yx0qXRyskJIusZIkWrFtV7duwfFZmUI4lHFACPs5 qnqtatZvhy71AMu79IvoWNsTDNOtBNrD55+BUzcyQY5J4CFY3PHVQSWwT4EVwhGuo1LV yfbd1zQVE9q7XXyOFX+WEqxVOFBC6LTIs46tNRqlgLK6mczv9ydddujGf6Y9J6XBTc19 hq9w== X-Gm-Message-State: ABuFfoiAsYwi/yX9iZvYpCXczBGL5HCUjbvuRZuO4jAbW3rzFO3x2Olm cZxOxuCM7MruYUXAIP0q+aPwf+bR7Xa3sY0X8XWRZQ== X-Google-Smtp-Source: ACcGV6200mvffJhOSAeesbf9j6TKPFpbmQQCP6h6Z/FAjTh6tgj7iDw357BsNkJb8O++l+p6080vLDr9Q7wrZbFtKCQf3Q== X-Received: by 2002:a24:7f05:: with SMTP id r5-v6mr17838180itc.2.1539734056061; Tue, 16 Oct 2018 16:54:16 -0700 (PDT) Date: Tue, 16 Oct 2018 16:51:01 -0700 In-Reply-To: <20181016235120.138227-1-brendanhiggins@google.com> Message-Id: <20181016235120.138227-13-brendanhiggins@google.com> Mime-Version: 1.0 References: <20181016235120.138227-1-brendanhiggins@google.com> X-Mailer: git-send-email 2.19.1.331.ge82ca0e54c-goog Subject: [RFC v1 12/31] checkpatch: added support for struct MOCK(foo) syntax From: Brendan Higgins To: gregkh@linuxfoundation.org, keescook@google.com, mcgrof@kernel.org, shuah@kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181016_165427_233040_B5EB3717 X-CRM114-Status: UNSURE ( 6.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:14a listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: brakmo@fb.com, richard@nod.at, mpe@ellerman.id.au, Tim.Bird@sony.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, julia.lawall@lip6.fr, joel@jms.id.au, linux-kselftest@vger.kernel.org, khilman@baylibre.com, joe@perches.com, jdike@addtoit.com, Brendan Higgins , kunit-dev@googlegroups.com Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This adds struct MOCK(foo) as a NonptrType so that it is recognized correctly in declarations. Signed-off-by: Brendan Higgins --- scripts/checkpatch.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 447857ffaf6be..9806f190796de 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -745,6 +745,10 @@ sub build_types { (?: (?:typeof|__typeof__)\s*\([^\)]*\)| (?:$typeTypedefs\b)| + # Matching a \b breaks struct MOCK(foo) syntax, + # so we need to have it not lumped in with the + # types in @typeList. + (?:struct\s+MOCK\($Ident\))| (?:${all}\b) ) (?:\s+$Modifier|\s+const)*