Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5771508ybe; Tue, 17 Sep 2019 13:14:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt5aLJDbnrRk3apAkJCoVxS4O0NrYWPLML0xdimSAJgubHZRHXXKezSIZGw67L+gEyHcrc X-Received: by 2002:a05:6402:65a:: with SMTP id u26mr6646388edx.86.1568751295138; Tue, 17 Sep 2019 13:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568751295; cv=none; d=google.com; s=arc-20160816; b=DSPUeKFtsMY0cYuJpeckKFMZDC+qZa18PTVbw/X+OyRoW/Mi/frkHNZqW4GaaD4NzU zUlsE5dPB+GnvjZLA8WiBrhE8hxwsnTXc6aHtLadm4MmOVvstFAjxLyTBYzuo0/hsj6T xl16v3ommesztejvVKNaoFnsBWp/Ezpxp6HeJS1dpzwRIxh9RFYN4yCiTGBlTZiJ1eUg IkGzwu5nHOUdFhSYcHWP2sR8KY5rERSaOR0eL5IuGrU0tVn3YKeb6psR0xuQF8+4u94L aDK30rQwkA/o75DACTxpgn/XrJu8T8m3iDJWLzj87nRBUJUAPVpBf+mQFjoeKQFKQita bWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wFyIAu8VvUFc07O877j4hJg95GjLCdMLcOJaL+G82gY=; b=avSXUZBQvE1sDXLSoYxZyGOQFjO6V3sO51/ZidB5GnXCgMqbHwa9i4sk5jqE3Kr30o yaQAJcn3Ao5zmSCNjgV5RF1g0lhCyAW0p0SNRqdAcBAvBbUZ7EdC9jm/vl1Tt2ynCcni qSu3Fu7zC27Y2rhHZquw9ZQ0RYVuLZSeSP6LTZJIIbnJri86xZPitsyaAEwfZFFOsKgH T7yn7exl7JTorhWFQ6XOnrCeGXxV9SVIT/z03vr8HZTY8C/QVH5orG6Z/Rph8lwdvo87 t6Fkfomhvs0NqjfwbNb0XP613PU+PsgAFzB4RRYRwBOwOX6BIFZ7SYYpqaq1Pbge3yQ8 D9Ig== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si1847533edr.429.2019.09.17.13.14.30; Tue, 17 Sep 2019 13:14:55 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728387AbfIQTnI (ORCPT + 99 others); Tue, 17 Sep 2019 15:43:08 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44008 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfIQTnG (ORCPT ); Tue, 17 Sep 2019 15:43:06 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 8F21C28DE06 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: corbet@lwn.net, kernel@collabora.com, =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH 2/2] kernel-doc: add support for ____cacheline_aligned_in_smp attribute Date: Tue, 17 Sep 2019 16:41:46 -0300 Message-Id: <20190917194146.35642-3-andrealmeid@collabora.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190917194146.35642-1-andrealmeid@collabora.com> References: <20190917194146.35642-1-andrealmeid@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subroutine dump_struct uses type attributes to check if the struct syntax is valid. Then, it removes all attributes before using it for output. `____cacheline_aligned_in_smp` is an attribute that is not included in both steps. Add it, since it is used by kernel structs. Signed-off-by: André Almeida --- scripts/kernel-doc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index f1faa036ee59..5505750261d7 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1062,7 +1062,7 @@ sub dump_struct($$) { my $x = shift; my $file = shift; - if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { + if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|____cacheline_aligned_in_smp|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) { my $decl_type = $1; $declaration_name = $2; my $members = $3; @@ -1077,6 +1077,7 @@ sub dump_struct($$) { $members =~ s/\s*__aligned\s*\([^;]*\)/ /gos; $members =~ s/\s*__packed\s*/ /gos; $members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos; + $members =~ s/\s*____cacheline_aligned_in_smp/ /gos; # replace DECLARE_BITMAP $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos; # replace DECLARE_HASHTABLE -- 2.23.0