Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112278/?format=api
http://patches.dpdk.org/api/patches/112278/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220602161324.1123926-2-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220602161324.1123926-2-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220602161324.1123926-2-bruce.richardson@intel.com", "date": "2022-06-02T16:13:21", "name": "[v2,1/4] cocci: add script for zero-length arrays in structs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "53945f7774758bc796f90f8470ddd008ee64af81", "submitter": { "id": 20, "url": "http://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220602161324.1123926-2-bruce.richardson@intel.com/mbox/", "series": [ { "id": 23309, "url": "http://patches.dpdk.org/api/series/23309/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23309", "date": "2022-06-02T16:13:20", "name": "clean up zero-length arrays", "version": 2, "mbox": "http://patches.dpdk.org/series/23309/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/112278/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/112278/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B63CEA0548;\n\tThu, 2 Jun 2022 18:13:44 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A3C1040DF7;\n\tThu, 2 Jun 2022 18:13:43 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id ADF0B40DDE\n for <dev@dpdk.org>; Thu, 2 Jun 2022 18:13:42 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Jun 2022 09:13:41 -0700", "from silpixa00401385.ir.intel.com (HELO\n silpixa00401385.ger.corp.intel.com.) ([10.237.222.171])\n by orsmga007.jf.intel.com with ESMTP; 02 Jun 2022 09:13:39 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1654186422; x=1685722422;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=8vM6zCWXWvM6jCv4ceAwu+gaWLu7yZur8gZYmDzRxYw=;\n b=DqH0Et7ZStWSjsETjfFt5/Wk/i58BMrpZhWkE9XI88KHox6c8asLmRY3\n Z2XOHNBv7x+IcYSUUG24cUKyDcm4JRnyeZH+BI4qAn9a0nUIXboSrqs1K\n GGpSmv1R9Fbj/KH0Ah4xBb+8slZRmhVPfKvdk4SoAyUUMUKq2A2fHmyTl\n J4zwv0ZjkClEnAXBkEtkE9Q+rlNVBnnsQCNpSqDY2JQwt0i72WpS4YLE7\n s9WnH+DvV2jtQaU3yfl2ChyqMZlBImTNvs8tR46ai3zqknGri7dUUyHaY\n UPZZfQ3S0xejHkIeVbv9s495w+e3G+VOPEJdO85PSl+XNuaybdC+fqCmb g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10366\"; a=\"276005628\"", "E=Sophos;i=\"5.91,271,1647327600\"; d=\"scan'208\";a=\"276005628\"", "E=Sophos;i=\"5.91,271,1647327600\"; d=\"scan'208\";a=\"577575009\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Stephen Hemminger <stephen@networkplumber.org>", "Subject": "[PATCH v2 1/4] cocci: add script for zero-length arrays in structs", "Date": "Thu, 2 Jun 2022 17:13:21 +0100", "Message-Id": "<20220602161324.1123926-2-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220602161324.1123926-1-bruce.richardson@intel.com>", "References": "<20220602150834.643745-1-bruce.richardson@intel.com>\n <20220602161324.1123926-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Add script to replace [0] with [] when used at the end of a struct.\nThe script also includes an additional struct member to match against so\nas to avoid issues with arrays with only a single zero-length element.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n devtools/cocci/zero_length_array.cocci | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n create mode 100644 devtools/cocci/zero_length_array.cocci", "diff": "diff --git a/devtools/cocci/zero_length_array.cocci b/devtools/cocci/zero_length_array.cocci\nnew file mode 100644\nindex 0000000000..de8783bc7a\n--- /dev/null\n+++ b/devtools/cocci/zero_length_array.cocci\n@@ -0,0 +1,21 @@\n+// Replace zero-length array members with []\n+@@\n+identifier st, member, arr;\n+type T1, T2;\n+@@\n+struct st {\n+\t...\n+\tT1 member;\n+-\tT2 arr[0];\n++\tT2 arr[];\n+};\n+@@\n+identifier st, member, arr, id;\n+type T1, T2;\n+@@\n+struct st {\n+\t...\n+\tT1 member;\n+-\tT2 arr[0];\n++\tT2 arr[];\n+} id;\n", "prefixes": [ "v2", "1/4" ] }{ "id": 112278, "url": "