get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2230182/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2230182,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2230182/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260429122617.7324-4-ilpo.jarvinen@linux.intel.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260429122617.7324-4-ilpo.jarvinen@linux.intel.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260429122617.7324-4-ilpo.jarvinen@linux.intel.com/",
    "date": "2026-04-29T12:26:09",
    "name": "[03/11] PCI: Consolidate add_list (aka realloc_head) empty sanity checks",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "ee9c7417cfb3596ee12b04e38b215ab3792769a2",
    "submitter": {
        "id": 83553,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/83553/?format=api",
        "name": "Ilpo Järvinen",
        "email": "ilpo.jarvinen@linux.intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260429122617.7324-4-ilpo.jarvinen@linux.intel.com/mbox/",
    "series": [
        {
            "id": 502049,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/502049/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=502049",
            "date": "2026-04-29T12:26:06",
            "name": "PCI: pci_resource_alignment() improvement + cleanups",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502049/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230182/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230182/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-20279-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=kRcA+KM5;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-20279-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=192.198.163.18",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=kRcA+KM5;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.intel.com\n (client-ip=192.198.163.18; helo=mgamail.intel.com;\n envelope-from=ilpo.jarvinen@linux.intel.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5GlJ4WKtz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 22:27:08 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g5GlJ3Cjhz2yql;\n\tWed, 29 Apr 2026 22:27:08 +1000 (AEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.18])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g5GlF46txz2ySf\n\tfor <linuxppc-dev@lists.ozlabs.org>; Wed, 29 Apr 2026 22:27:05 +1000 (AEST)",
            "from fmviesa006.fm.intel.com ([10.60.135.146])\n  by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Apr 2026 05:27:01 -0700",
            "from ijarvine-mobl1.ger.corp.intel.com (HELO localhost)\n ([10.245.245.212])\n  by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Apr 2026 05:26:58 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777465628;\n\tcv=none;\n b=LAGmn9u4O3dbnr/nVbQveP0lwiWnyb8iE/Es0WVdIS33tw2vBU5i4jbFOK2nJs7uUF2ysPL3cbS0hwYxKxEMuayru7NRCwkJLMetMeAC48SoXKUwRxPuBtOqhS5C2fv/VWiKqkT1DifeuGbFkwB7VacnZ/aAuRFGyBfIt9MrX+Qw+yT6NryY5DGJc04RHtNrun9921ZwNMEfZ/wIoiRmDkX90IEWXXj3+Fc0KvaS8IOZokzE+TNmW5bXj4BEdqyaFI1wLcPL2lcu/OeUaDnYD4xHe1Xt2ejRB1ozwqkNZID1Mjwz4U+QfUNo5of7bxIRNupoUtBjz1WAduYH8FZe9Q==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777465628; c=relaxed/relaxed;\n\tbh=QoVRHD6ikHXXVqy8TWHuiRhxDDfq2bW3MrQdIr323Gs=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=YLSVATw2rj6dk+FSwpvWVisetS+BfGgct4MDigwExBuNUYXWDLkKMexAmcLb0/KvUvyiK5oatw4XYjjkytCriu7Enmjm7iyn1OQFxfNdX1WIjSFE5zEy50+AYQ84aDu+5pLHDOM5GcToo/878gHP60ouB79yoRR/4wAki+4QMInQOZ5hDJX5xPVtRN5yBM6jhd95E0XpIS12hahHEV6pUjgO2GGWVUNdPjz1DvXtXDGhbLGaFMV+ulIaLgzQp/UeYaDuENHtYi+g7XgU5a6oaij9+lu3n0nZkJShK4pYBy3/iXQCrcHsqVA+hCng4TumJy25DP4ts5dIwzUwy30kRg==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.intel.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=kRcA+KM5; dkim-atps=neutral;\n spf=pass (client-ip=192.198.163.18; helo=mgamail.intel.com;\n envelope-from=ilpo.jarvinen@linux.intel.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.intel.com",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777465626; x=1809001626;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=ymmlvQuMfjumemqUjGxrBNk55P+HxOLWdjtwtwvgzpE=;\n  b=kRcA+KM5aUfKo1gFZQOwhr5+maSGk+CSVH2npno2YGGTDlRWEaWbf5fI\n   +8EgtY9RgU6oFVx72sgdoqvWu4GGsI94V7/Mtr1JECKyeboSwhQtG+Zy/\n   81QjKm29rz+mhNCOtU9KwPJgdWQfqEjjOe4kNvP6PYcVj7aKOsaqLEIQY\n   IMJmc+lbVpCCZrF4OwSNq99S9vMbuO5RWIaCzoylMdyCSqn7ClijEP3rF\n   iuXs5FR9MxJq1xXmgiq3pvGkBcjn1mpptGwdJtaPcL0BExqko/nJkOnxf\n   IAWcQH+Mq2+RARv6i1OpUJSTPfl6xfAsy1W+/fC7QQcB7V54qEyAIPaTt\n   Q==;",
        "X-CSE-ConnectionGUID": [
            "EMknbreGR5WICE5Bi+PF9A==",
            "fNI/Y3zKR6KPwPYP7o+w8w=="
        ],
        "X-CSE-MsgGUID": [
            "ono/YxMwRwGxhGb6MfJjMQ==",
            "JPHHKUAmRmO30ZkLOgV5fQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11770\"; a=\"77557721\"",
            "E=Sophos;i=\"6.23,206,1770624000\";\n   d=\"scan'208\";a=\"77557721\"",
            "E=Sophos;i=\"6.23,206,1770624000\";\n   d=\"scan'208\";a=\"229669749\""
        ],
        "X-ExtLoop1": "1",
        "From": "=?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>",
        "To": "linux-pci@vger.kernel.org,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tShawn Jin <shawn.jin@asteralabs.com>,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tlinux-kernel@vger.kernel.org",
        "Cc": "=?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>",
        "Subject": "[PATCH 03/11] PCI: Consolidate add_list (aka realloc_head) empty\n sanity checks",
        "Date": "Wed, 29 Apr 2026 15:26:09 +0300",
        "Message-Id": "<20260429122617.7324-4-ilpo.jarvinen@linux.intel.com>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<20260429122617.7324-1-ilpo.jarvinen@linux.intel.com>",
        "References": "<20260429122617.7324-1-ilpo.jarvinen@linux.intel.com>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,\n\tDKIM_VALID,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "Callers of __pci_bridge_assign_resources() and\n__pci_bus_assign_resources() perform\nWARN_ON_ONCE(list_empty(add_list))) checks to sanity check that all\noptional sizes were processed (and removed) from the list. The empty\nlist sanity check is duplicated code so the more appropriate place for\nit would be inside the called function.\n\nPlacing the empty list check into __pci_bus_assign_resources() also\nensures all callsites do perform the sanity check which currently is\nnot the case when being called from enable_slot(). This inconsistency\nwas noted by Sashiko though only inside its in depth log but not\nflagged as a real problem, possibly because this is only a sanity check\nthat should never fire. Nonetheless, this sanity check has been very\nuseful to catch problems early in the past so it's good to do it\nconsistenty everywhere.\n\nAs __pci_bus_assign_resources() is recursive function, it needs to be\nrenamed to __pci_bus_assign_resources_one() to only perform the empty\nlist check at the end of processing the entire hierarchy in\n__pci_bus_assign_resources().\n\nSuggested-by: sashiko.dev # Sanity check missing from enable_slot()\nSigned-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>\n---\n drivers/pci/setup-bus.c | 29 +++++++++++++++++------------\n 1 file changed, 17 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c\nindex 3765693e95f0..1e0e28efe8b8 100644\n--- a/drivers/pci/setup-bus.c\n+++ b/drivers/pci/setup-bus.c\n@@ -1501,9 +1501,9 @@ static void pdev_assign_fixed_resources(struct pci_dev *dev)\n \t}\n }\n \n-void __pci_bus_assign_resources(const struct pci_bus *bus,\n-\t\t\t\tstruct list_head *add_list,\n-\t\t\t\tstruct list_head *fail_head)\n+static void __pci_bus_assign_resources_one(const struct pci_bus *bus,\n+\t\t\t\t\t   struct list_head *add_list,\n+\t\t\t\t\t   struct list_head *fail_head)\n {\n \tstruct pci_bus *b;\n \tstruct pci_dev *dev;\n@@ -1517,7 +1517,7 @@ void __pci_bus_assign_resources(const struct pci_bus *bus,\n \t\tif (!b)\n \t\t\tcontinue;\n \n-\t\t__pci_bus_assign_resources(b, add_list, fail_head);\n+\t\t__pci_bus_assign_resources_one(b, add_list, fail_head);\n \n \t\tswitch (dev->hdr_type) {\n \t\tcase PCI_HEADER_TYPE_BRIDGE:\n@@ -1537,6 +1537,16 @@ void __pci_bus_assign_resources(const struct pci_bus *bus,\n \t}\n }\n \n+void __pci_bus_assign_resources(const struct pci_bus *bus,\n+\t\t\t\tstruct list_head *add_list,\n+\t\t\t\tstruct list_head *fail_head)\n+{\n+\t__pci_bus_assign_resources_one(bus, add_list, fail_head);\n+\n+\tif (WARN_ON_ONCE(add_list && !list_empty(add_list)))\n+\t\tpci_dev_res_free_list(add_list);\n+}\n+\n void pci_bus_assign_resources(const struct pci_bus *bus)\n {\n \t__pci_bus_assign_resources(bus, NULL, NULL);\n@@ -1641,6 +1651,9 @@ static void __pci_bridge_assign_resources(const struct pci_dev *bridge,\n \t\t\t pci_domain_nr(b), b->number);\n \t\tbreak;\n \t}\n+\n+\tif (WARN_ON_ONCE(add_list && !list_empty(add_list)))\n+\t\tpci_dev_res_free_list(add_list);\n }\n \n static void pci_bridge_release_resources(struct pci_bus *bus,\n@@ -2205,8 +2218,6 @@ void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus)\n \n \t\t/* Depth last, allocate resources and update the hardware. */\n \t\t__pci_bus_assign_resources(bus, add_list, &fail_head);\n-\t\tif (WARN_ON_ONCE(add_list && !list_empty(add_list)))\n-\t\t\tpci_dev_res_free_list(add_list);\n \t\ttried_times++;\n \n \t\t/* Any device complain? */\n@@ -2268,8 +2279,6 @@ void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge)\n \t\tpci_bridge_distribute_available_resources(bridge, &add_list);\n \n \t\t__pci_bridge_assign_resources(bridge, &add_list, &fail_head);\n-\t\tif (WARN_ON_ONCE(!list_empty(&add_list)))\n-\t\t\tpci_dev_res_free_list(&add_list);\n \t\ttried_times++;\n \n \t\tif (list_empty(&fail_head))\n@@ -2339,8 +2348,6 @@ static int pbus_reassign_bridge_resources(struct pci_bus *bus, struct resource *\n \n \t__pci_bus_size_bridges(bridge->subordinate, &add_list);\n \t__pci_bridge_assign_resources(bridge, &add_list, &failed);\n-\tif (WARN_ON_ONCE(!list_empty(&add_list)))\n-\t\tpci_dev_res_free_list(&add_list);\n \n \tif (!list_empty(&failed)) {\n \t\tif (pci_required_resource_failed(&failed, type))\n@@ -2473,7 +2480,5 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus)\n \t\t\t__pci_bus_size_bridges(dev->subordinate, &add_list);\n \tup_read(&pci_bus_sem);\n \t__pci_bus_assign_resources(bus, &add_list, NULL);\n-\tif (WARN_ON_ONCE(!list_empty(&add_list)))\n-\t\tpci_dev_res_free_list(&add_list);\n }\n EXPORT_SYMBOL_GPL(pci_assign_unassigned_bus_resources);\n",
    "prefixes": [
        "03/11"
    ]
}