Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp15638imm; Tue, 16 Oct 2018 16:57:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV61yRz8Dk6ftuCqpVdxQn5g+A+J9gWp4wOeloztNB3g7vQjot7/VfZTrdZCPFzc+S96N7lTo X-Received: by 2002:a63:4745:: with SMTP id w5-v6mr22758562pgk.377.1539734240105; Tue, 16 Oct 2018 16:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539734240; cv=none; d=google.com; s=arc-20160816; b=Hi/bVRwBEORa4OV5kW1+o+HdBmSrUrX4LNNUHcyM3SQ6S14AAYH0uf5KfKhWu+cO4+ eUaRDczfKhizmfmbSIgJz9/99ing7JEetyUyJzLYsX3hb5YhDGH96xKzBccDxy9WHid7 nrng4bsggyssf6rlAx0eN6kQkqkVsbdHsDkFDAI2qCKk7eEoLhaA9az4vySWvPUcpRUI ayge3BlE0RW/TFUnmI8E2xQpfNT4PttnZt3hPHo9+cwp9IgSldFqX9cDkOC66tu8AUCN bUjjAns6WgI56PL6QROWqfHig7bjx4K86e6IpzqHNpem87+nIUVEXwrT6VnVDx+8w2+Z UDYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=aOdwwUuIBSYrb87g8bgBF5GxaXD8rfXvHJcd9fKQrvE=; b=vDnN/tc2K3Mi7nDW/khtNw0oHfBGCnFgW43MHxSBEC647oTpYJUTnRP7GUgbhLjdZy UhfBkv3O1ripHk4P1DfuaiZtEZ32gl6zRJ/T7OnI2xf0S0UqranmAMqCpLYQTC5mWvO7 dNAkCml2oXdCmGY8K+9gIKQLA+Je+XKOyzEOok/QiWsiyEUvzwh0aW4w4fCRYZFdjPUr /ZVjjCw4L6wSazRa5slRay/ngxoQ0cEPUdlDs9pIhhvdmFjH6lbwawit+qj2a5ysmv5L umynVd24wtFXqfEZ+w1i9aOiw0QoP14XnYbCLYDORl9yLn8q9fqRMyqHNPpHDDOoCTUA KqhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="iP/y8MyF"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si13207323pfn.117.2018.10.16.16.57.04; Tue, 16 Oct 2018 16:57:20 -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=@google.com header.s=20161025 header.b="iP/y8MyF"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbeJQHrH (ORCPT + 99 others); Wed, 17 Oct 2018 03:47:07 -0400 Received: from mail-io1-f73.google.com ([209.85.166.73]:56810 "EHLO mail-io1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727605AbeJQHrF (ORCPT ); Wed, 17 Oct 2018 03:47:05 -0400 Received: by mail-io1-f73.google.com with SMTP id f9-v6so22691611iok.23 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=jyqqosTSJ1g9MX7QXwssuF6ysCJSBqN0EJ9AWssw1wlU6bYvNKLXzC/BzRmHPxgdKs Ts1VZ3CkYrNF2THMbe1tcaPtYCIDnABGLASRSAj98Dc4quw8x4Q9TnVDLAnkHMxXmn5Z ddrPhipqTfakfWtN7tdioPWKnmb19HxAQAgwDkEDtjWtTF4neLdaFEQ2Gh5464KPZJHm b+r5fCW24zn7RUUjkonxaZaWkxwtEhFzU6IW/OcEkcLw1pS3SHEBbFzD/EMXo2TIMvYV zVYY/6XU46ZCnsm4Wh06bDBRgLkXfPGC3sfdA5RRaoiJn5PHIc7VfkIXT7NDNAN9CbAW d4SQ== X-Gm-Message-State: ABuFfojagv6XsfBtwHoZO1t3V/sXbRms1pmKxbG3PPC5op8tjOf0ij3S 98sfQW6blgvA+jQvGWV1ncoSYqrxwWNSlklkUa7Yiw== 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 Cc: joel@jms.id.au, mpe@ellerman.id.au, joe@perches.com, brakmo@fb.com, rostedt@goodmis.org, Tim.Bird@sony.com, khilman@baylibre.com, julia.lawall@lip6.fr, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, jdike@addtoit.com, richard@nod.at, linux-um@lists.infradead.org, Brendan Higgins Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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)* -- 2.19.1.331.ge82ca0e54c-goog