From patchwork Sat Mar 20 13:36:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 405431 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2187518jai; Sat, 20 Mar 2021 06:39:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRqbGu9mrXqv2d2GzxFmWPJZ35bhB550nKqa4E+RaCwM2RK1gL6hsvPM8nau7bNo1u1BgP X-Received: by 2002:a25:4a84:: with SMTP id x126mr12695099yba.408.1616247559741; Sat, 20 Mar 2021 06:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616247559; cv=none; d=google.com; s=arc-20160816; b=nhiczsXZupic1Y2EAiftXQCB3UvXZKcwbLPpqbn11q4FhTeKZpYZ7r+Gvn2XUGE5Ar hsgkKjCi99jpUb74jfOytTPtRiKK92/Dws6XxGTA+DbuUFvTdNRfZZZsQzyHNltWJ9W3 qywk3bDAO/fKHkd74kOX6peM9JDAutAroZAepNAUr9cjCqoZ4nOGkg+GzCJeJybMy8Xa TFO19yEz2xIEwX58oMSrTYIT+eHRprWyHAXp/26mfhV1OVvFcMOWLXoOMEZ3Q1LRLNAp fYWG9nqpsDtmPJ8ZPIJiFmg+aAgHPwLyS0+W8dRHnUUdCgaD4kfH+kP46kwKfgRPIMWp ySXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CCjBtNHV/27BIqfm5dJoDvU/LJdm3qeSBui9tlj/n/s=; b=Ok3G28VFsSyWG2tFY/paxRvZ6uQUrqOAZ4+LNiOLJkQP8fo1V0fR5n9ZcarlkjV7LH niFKYsTgCMIYRqKwdEyMLNf9yYAh2MD/fwmzr2XcmrZ/Fn6v1IPvndseEmYfdFKYZMU7 VOvV9MJ+ERbIvhV0QV3guf/aOjAC4whZHmoKOzhVKzWj7oi8AobzNGwjKog9x6yVvwXH Vid1dSTEAPDOyfOJSGKZUFox+zI8FU+hm4nfhrM2JeCNTWeZAzqcbT54Vftusi6HsUUX t8CBHbC687vop30jBAMgO8R2xbDKoY/WGq6HeOq12xX977PIq7mXoTxKEfECHJUc1n/a A3FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WH2HOUpp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a7si7276283ybp.480.2021.03.20.06.39.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Mar 2021 06:39:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WH2HOUpp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNbp1-00032d-3x for patch@linaro.org; Sat, 20 Mar 2021 09:39:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNbn4-00032D-3G for qemu-devel@nongnu.org; Sat, 20 Mar 2021 09:37:18 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:41547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNbn0-0004EF-49 for qemu-devel@nongnu.org; Sat, 20 Mar 2021 09:37:17 -0400 Received: by mail-ej1-x629.google.com with SMTP id u5so14057817ejn.8 for ; Sat, 20 Mar 2021 06:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CCjBtNHV/27BIqfm5dJoDvU/LJdm3qeSBui9tlj/n/s=; b=WH2HOUppdSfGcPB6C2W+jWVmQ4Wyzeu27UvxMoqs3QJzOcLQJTpQXTTTr/FSX7lGOe GZv08gknIjva5crlXW0uWLjkwmZyDXMt/BTS/XQzNwKnO1nTeucWITwrJiz9cRZsDEFm HGRS7bvzXQsEGpsYbGsOkmj3pTqVhhjQD8dDJCQNHtq69WeyjSBbdydcmiCG4xYbeIfP wgJ36SwP0v2/Ph1nz2zhCxR5zXEK7iSpHav9rWoEgVZ9hTXoAutNTMqZ9UHEznk8/nNt iTr+UbftlM7iHV0FX3dqZHGDyibLWiVR+GE5GXGBg537k9nkoETCtUAQqw/cS+pBoZ+K h25Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CCjBtNHV/27BIqfm5dJoDvU/LJdm3qeSBui9tlj/n/s=; b=ZoRQ1ECGthf/jo0BjFUJOjg6VT3W+l0rUxgl9KmgCALARpeiE9i5bY1k4owA0Bn5M5 O3jkhuDRPvrkbI1SU55zuzHEdVIV1WkthwkxyZWhg/KXVGOEn+guxciUABP+whjzhX5z 5xGGHMGKolmGzE8EV2WXR7v8ltOWDyPaCdvYVHvKcdXrHhLHq/gR7MADZLEA0OACmcVn PLkxpQNUalvV/4Gt8Yts+YLvy8IJcTtIRCZfr3y41UoTMuhxghaIl+2immIHS12GFZn9 oEXUV7/ntxmGN91lZIfKkijUTp+5psQXzcKUBvyZbA/TM60rp5yq01KD43Lk1morGFqn naaw== X-Gm-Message-State: AOAM530NikgV1SQK/PBbKtfbnQknV4vyLHamuN5Cbp/BrnA/qtYJ3SaD pBoFjCwZBvrZPmsGBV0/OItxvw== X-Received: by 2002:a17:906:1a44:: with SMTP id j4mr9883109ejf.401.1616247428722; Sat, 20 Mar 2021 06:37:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id be27sm6288678edb.47.2021.03.20.06.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Mar 2021 06:37:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CA0091FF87; Sat, 20 Mar 2021 13:37:06 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/14] scripts/kernel-doc: strip QEMU_ from function definitions Date: Sat, 20 Mar 2021 13:36:53 +0000 Message-Id: <20210320133706.21475-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210320133706.21475-1-alex.bennee@linaro.org> References: <20210320133706.21475-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Some packaged versions of Sphinx (fedora33/alpine so far) have issues with the annotated C code that kernel-doc spits out. Without knowing about things like QEMU_PLUGIN_EXPORT it chokes trying to understand the code. Evidently this is a problem for the kernel as well as the long stream of regex substitutions we add to in this patch can attest. Fortunately we have a fairly common format for all our compiler shenanigans as applied to functions so lets just filter them all out. Signed-off-by: Alex Bennée --- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4b19851b2d..240923d509 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1745,6 +1745,9 @@ sub dump_function($$) { )+ \)\)\s+//x; + # Strip QEMU specific compiler annotations + $prototype =~ s/QEMU_[A-Z_]+ +//; + # Yes, this truly is vile. We are looking for: # 1. Return type (may be nothing if we're looking at a macro) # 2. Function name