Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2197673/?format=api
{ "id": 2197673, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197673/?format=api", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/1.0/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<b5785eaa2531a115b4afc1aa42502459d14ab9b2.1771408406.git.mchehab+huawei@kernel.org>", "date": "2026-02-18T10:12:59", "name": "[29/38] docs: xforms_lists.py: use CFuntion to handle all function macros", "commit_ref": null, "pull_url": null, "state": "handled-elsewhere", "archived": false, "hash": "228b1bec14b1ccbd7a9e941e128442aca8421703", "submitter": { "id": 78235, "url": "http://patchwork.ozlabs.org/api/1.0/people/78235/?format=api", "name": "Mauro Carvalho Chehab", "email": "mchehab+huawei@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/b5785eaa2531a115b4afc1aa42502459d14ab9b2.1771408406.git.mchehab+huawei@kernel.org/mbox/", "series": [ { "id": 492532, "url": "http://patchwork.ozlabs.org/api/1.0/series/492532/?format=api", "date": "2026-02-18T10:12:30", "name": "docs: several improvements to kernel-doc", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492532/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197673/checks/", "tags": {}, "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=AEi2Dbnm;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fGC5j034Mz1xwr\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 21:13:45 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 3036D60806;\n\tWed, 18 Feb 2026 10:13:42 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id vYk0lczIhkbO; Wed, 18 Feb 2026 10:13:41 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 889956080C;\n\tWed, 18 Feb 2026 10:13:41 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists1.osuosl.org (Postfix) with ESMTP id 1CA6C438\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Feb 2026 10:13:32 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id F27C2407F9\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Feb 2026 10:13:31 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 9WS-5iX_tdsP for <intel-wired-lan@lists.osuosl.org>;\n Wed, 18 Feb 2026 10:13:31 +0000 (UTC)", "from tor.source.kernel.org (tor.source.kernel.org\n [IPv6:2600:3c04:e001:324:0:1991:8:25])\n by smtp4.osuosl.org (Postfix) with ESMTPS id F11CE40755\n for <intel-wired-lan@lists.osuosl.org>; Wed, 18 Feb 2026 10:13:30 +0000 (UTC)", "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id 0AE326132F;\n Wed, 18 Feb 2026 10:13:30 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id B37E0C19425;\n Wed, 18 Feb 2026 10:13:29 +0000 (UTC)", "from mchehab by mail.kernel.org with local (Exim 4.99.1)\n (envelope-from <mchehab+huawei@kernel.org>)\n id 1vseYi-00000000Ltl-00lG; Wed, 18 Feb 2026 11:13:28 +0100" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 889956080C", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org F11CE40755" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1771409621;\n\tbh=1Z7/GDRtkpGROAr4KZDI7hTpLETDjKGDYser7ir+W94=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=AEi2DbnmOh15elpE/UDJCSOdayFBVV/LI2mlSPcyekuU88ZzgyVNzCLhv/M1SNnqi\n\t Ik0NXXt6h0nQOh1EMbBzCJtFEtfMmrTBd/YpkCe+sjmsWxYovAByr83+rzEEl+0PlV\n\t J661Y5bPMGkR7mJijUz9CyoN6pw8ITPpAQXatoPBfa64TMp4j1pPyK1+YFn/kFZv5k\n\t f4Y5l1Z3OHpYLjnXzW481bKSQFtFewA4w0bxSKAwdpV6mBOoNQHM1CEXtLymrg3eXU\n\t 4MshG6PqOUkXS5NdegT8tekePyxyHrHfbgIL71caysYa9IF70ZNQvMyKbpxizShjwe\n\t aDD9BeHMMY8jw==", "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org;\n envelope-from=mchehab+huawei@kernel.org; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org F11CE40755", "From": "Mauro Carvalho Chehab <mchehab+huawei@kernel.org>", "To": "Jonathan Corbet <corbet@lwn.net>, Kees Cook <kees@kernel.org>,\n Linux Doc Mailing List <linux-doc@vger.kernel.org>", "Cc": "Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,\n intel-wired-lan@lists.osuosl.org, linux-hardening@vger.kernel.org,\n linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n \"Gustavo A. R. Silva\" <gustavoars@kernel.org>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>", "Date": "Wed, 18 Feb 2026 11:12:59 +0100", "Message-ID": "\n <b5785eaa2531a115b4afc1aa42502459d14ab9b2.1771408406.git.mchehab+huawei@kernel.org>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<cover.1771408406.git.mchehab+huawei@kernel.org>", "References": "<cover.1771408406.git.mchehab+huawei@kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=kernel.org; s=k20201202; t=1771409609;\n bh=nnw4ho1Olbx2RNuzp7w4U3GO/hs4rZPbQud6YRRjsxc=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=AK77plCta9vdDWs0GEdINAHrUCAngMqf6VZJyUomLt0co3NpFjHCzl8X/SOBb+kzj\n gu/QhDCEDIuY1g5GiD0hd9noakpnLqeTu2GPBMn7DZuYs+6D22tucysb8NImprYMCH\n b4qrA+1YNUKgx902q1T82wzYYT6nAjNgTflIP5AHqiMTjKYWLrEun7jeyytDvLmgQ5\n /6BrJcks8501xdmWQLiSGmRyYBNgehet/QEVblPoJs0myVj2wKBaLtHjcsoul7o0j0\n Bg87zgXi1/JU1nEYSrf0y9csToMd2D2Z1TVLayclgl5PmesyY3Azvcbee+edpWi2Vy\n +A/86Otj5WHTA==", "X-Mailman-Original-Authentication-Results": [ "smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org", "smtp4.osuosl.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.a=rsa-sha256 header.s=k20201202 header.b=AK77plCt" ], "Subject": "[Intel-wired-lan] [PATCH 29/38] docs: xforms_lists.py: use CFuntion\n to handle all function macros", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "The new CFunction class handles better macros, as it works the same\nway C compilers do, handling delimiters tha right way.\n\nThis allows removing complex regular expressions, placing instead\njust a simple one with the name(s) of the functions to be replaced.\n\nDoing a before/after check using \"kernel-doc -man .\" shows only\ncosmetic changes (whitespaces, mostly).\n\nSigned-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>\n---\n tools/lib/python/kdoc/xforms_lists.py | 71 ++++++++++++---------------\n 1 file changed, 31 insertions(+), 40 deletions(-)", "diff": "diff --git a/tools/lib/python/kdoc/xforms_lists.py b/tools/lib/python/kdoc/xforms_lists.py\nindex 2e7b470c4e65..6455850fee2d 100644\n--- a/tools/lib/python/kdoc/xforms_lists.py\n+++ b/tools/lib/python/kdoc/xforms_lists.py\n@@ -17,51 +17,38 @@ class CTransforms:\n \n #: Transforms for structs and unions.\n struct_xforms = [\n- # Strip attributes\n- (KernRe(r\"__attribute__\\s*\\(\\([a-z0-9,_\\*\\s\\(\\)]*\\)\\)\", flags=re.I | re.S, cache=False), ' '),\n- (KernRe(r'\\s*__aligned\\s*\\([^;]*\\)', re.S), ' '),\n- (KernRe(r'\\s*__counted_by\\s*\\([^;]*\\)', re.S), ' '),\n- (KernRe(r'\\s*__counted_by_(le|be)\\s*\\([^;]*\\)', re.S), ' '),\n- (KernRe(r'\\s*__guarded_by\\s*\\([^\\)]*\\)', re.S), ' '),\n- (KernRe(r'\\s*__pt_guarded_by\\s*\\([^\\)]*\\)', re.S), ' '),\n+ (CFunction(\"__attribute__\"), ' '),\n+ (CFunction('__aligned'), ' '),\n+ (CFunction('__counted_by'), ' '),\n+ (CFunction('__counted_by_(le|be)'), ' '),\n+ (CFunction('__guarded_by'), ' '),\n+ (CFunction('__pt_guarded_by'), ' '),\n+\n (KernRe(r'\\s*__packed\\s*', re.S), ' '),\n (KernRe(r'\\s*CRYPTO_MINALIGN_ATTR', re.S), ' '),\n (KernRe(r'\\s*__private', re.S), ' '),\n (KernRe(r'\\s*__rcu', re.S), ' '),\n (KernRe(r'\\s*____cacheline_aligned_in_smp', re.S), ' '),\n (KernRe(r'\\s*____cacheline_aligned', re.S), ' '),\n- (KernRe(r'\\s*__cacheline_group_(begin|end)\\([^\\)]+\\);'), ''),\n+\n+ (CFunction('__cacheline_group_(begin|end)'), ''),\n \n (CFunction('struct_group'), r'\\2'),\n (CFunction('struct_group_attr'), r'\\3'),\n (CFunction('struct_group_tagged'), r'struct \\1 \\2; \\3'),\n (CFunction('__struct_group'), r'\\4'),\n \n- #\n- # Replace macros\n- #\n- # TODO: use CFunction on all FOO($1, $2, ...) matches\n- #\n- # it is better to also move those to the CFunction logic,\n- # to ensure that parentheses will be properly matched.\n- #\n- (KernRe(r'__ETHTOOL_DECLARE_LINK_MODE_MASK\\s*\\(([^\\)]+)\\)', re.S),\n- r'DECLARE_BITMAP(\\1, __ETHTOOL_LINK_MODE_MASK_NBITS)'),\n- (KernRe(r'DECLARE_PHY_INTERFACE_MASK\\s*\\(([^\\)]+)\\)', re.S),\n- r'DECLARE_BITMAP(\\1, PHY_INTERFACE_MODE_MAX)'),\n- (KernRe(r'DECLARE_BITMAP\\s*\\(' + struct_args_pattern + r',\\s*' + struct_args_pattern + r'\\)',\n- re.S), r'unsigned long \\1[BITS_TO_LONGS(\\2)]'),\n- (KernRe(r'DECLARE_HASHTABLE\\s*\\(' + struct_args_pattern + r',\\s*' + struct_args_pattern + r'\\)',\n- re.S), r'unsigned long \\1[1 << ((\\2) - 1)]'),\n- (KernRe(r'DECLARE_KFIFO\\s*\\(' + struct_args_pattern + r',\\s*' + struct_args_pattern +\n- r',\\s*' + struct_args_pattern + r'\\)', re.S), r'\\2 *\\1'),\n- (KernRe(r'DECLARE_KFIFO_PTR\\s*\\(' + struct_args_pattern + r',\\s*' +\n- struct_args_pattern + r'\\)', re.S), r'\\2 *\\1'),\n- (KernRe(r'(?:__)?DECLARE_FLEX_ARRAY\\s*\\(' + struct_args_pattern + r',\\s*' +\n- struct_args_pattern + r'\\)', re.S), r'\\1 \\2[]'),\n- (KernRe(r'DEFINE_DMA_UNMAP_ADDR\\s*\\(' + struct_args_pattern + r'\\)', re.S), r'dma_addr_t \\1'),\n- (KernRe(r'DEFINE_DMA_UNMAP_LEN\\s*\\(' + struct_args_pattern + r'\\)', re.S), r'__u32 \\1'),\n- (KernRe(r'VIRTIO_DECLARE_FEATURES\\(([\\w_]+)\\)'), r'union { u64 \\1; u64 \\1_array[VIRTIO_FEATURES_U64S]; }'),\n+ (CFunction('__ETHTOOL_DECLARE_LINK_MODE_MASK'), r'DECLARE_BITMAP(\\1, __ETHTOOL_LINK_MODE_MASK_NBITS)'),\n+ (CFunction('DECLARE_PHY_INTERFACE_MASK',), r'DECLARE_BITMAP(\\1, PHY_INTERFACE_MODE_MAX)'),\n+ (CFunction('DECLARE_BITMAP'), r'unsigned long \\1[BITS_TO_LONGS(\\2)]'),\n+\n+ (CFunction('DECLARE_HASHTABLE'), r'unsigned long \\1[1 << ((\\2) - 1)]'),\n+ (CFunction('DECLARE_KFIFO'), r'\\2 *\\1'),\n+ (CFunction('DECLARE_KFIFO_PTR'), r'\\2 *\\1'),\n+ (CFunction('(?:__)?DECLARE_FLEX_ARRAY'), r'\\1 \\2[]'),\n+ (CFunction('DEFINE_DMA_UNMAP_ADDR'), r'dma_addr_t \\1'),\n+ (CFunction('DEFINE_DMA_UNMAP_LEN'), r'__u32 \\1'),\n+ (CFunction('VIRTIO_DECLARE_FEATURES'), r'union { u64 \\1; u64 \\1_array[VIRTIO_FEATURES_U64S]; }'),\n ]\n \n #: Transforms for function prototypes.\n@@ -86,12 +73,14 @@ class CTransforms:\n (KernRe(r\"__sched +\"), \"\"),\n (KernRe(r\"_noprof\"), \"\"),\n (KernRe(r\"__always_unused *\"), \"\"),\n- (KernRe(r\"__printf\\s*\\(\\s*\\d*\\s*,\\s*\\d*\\s*\\) +\"), \"\"),\n- (KernRe(r\"__(?:re)?alloc_size\\s*\\(\\s*\\d+\\s*(?:,\\s*\\d+\\s*)?\\) +\"), \"\"),\n- (KernRe(r\"__diagnose_as\\s*\\(\\s*\\S+\\s*(?:,\\s*\\d+\\s*)*\\) +\"), \"\"),\n- (KernRe(r\"DECL_BUCKET_PARAMS\\s*\\(\\s*(\\S+)\\s*,\\s*(\\S+)\\s*\\)\"), r\"\\1, \\2\"),\n (KernRe(r\"__no_context_analysis\\s*\"), \"\"),\n (KernRe(r\"__attribute_const__ +\"), \"\"),\n+\n+ (CFunction('__printf'), \"\"),\n+ (CFunction('__(?:re)?alloc_size'), \"\"),\n+ (CFunction(\"__diagnose_as\"), \"\"),\n+ (CFunction(\"DECL_BUCKET_PARAMS\"), r\"\\1, \\2\"),\n+\n (CFunction(\"__cond_acquires\"), \"\"),\n (CFunction(\"__cond_releases\"), \"\"),\n (CFunction(\"__acquires\"), \"\"),\n@@ -109,9 +98,11 @@ class CTransforms:\n var_xforms = [\n (KernRe(r\"__read_mostly\"), \"\"),\n (KernRe(r\"__ro_after_init\"), \"\"),\n- (KernRe(r'\\s*__guarded_by\\s*\\([^\\)]*\\)', re.S), \"\"),\n- (KernRe(r'\\s*__pt_guarded_by\\s*\\([^\\)]*\\)', re.S), \"\"),\n- (KernRe(r\"LIST_HEAD\\(([\\w_]+)\\)\"), r\"struct list_head \\1\"),\n+\n+ (CFunction('__guarded_by'), \"\"),\n+ (CFunction('__pt_guarded_by'), \"\"),\n+ (CFunction(\"LIST_HEAD\"), r\"struct list_head \\1\"),\n+\n (KernRe(r\"(?://.*)$\"), \"\"),\n (KernRe(r\"(?:/\\*.*\\*/)\"), \"\"),\n (KernRe(r\";$\"), \"\"),\n", "prefixes": [ "29/38" ] }