get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 958750,
    "url": "http://patchwork.ozlabs.org/api/patches/958750/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20180817102645.3839621-3-arnd@arndb.de/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/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": "<20180817102645.3839621-3-arnd@arndb.de>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20180817102645.3839621-3-arnd@arndb.de/",
    "date": "2018-08-17T10:26:32",
    "name": "[RFC,02/15] PCI: move pci_scan_bus into callers",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "cb4fe188f5fd52f16ae561ff8b5080a52bd558fe",
    "submitter": {
        "id": 30,
        "url": "http://patchwork.ozlabs.org/api/people/30/?format=api",
        "name": "Arnd Bergmann",
        "email": "arnd@arndb.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20180817102645.3839621-3-arnd@arndb.de/mbox/",
    "series": [
        {
            "id": 61229,
            "url": "http://patchwork.ozlabs.org/api/series/61229/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=61229",
            "date": "2018-08-17T10:26:32",
            "name": "PCI: turn some __weak functions into callbacks",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/61229/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/958750/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/958750/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41sKM15trDz9s3Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 17 Aug 2018 20:34:21 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41sKM14Z7VzF0yB\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 17 Aug 2018 20:34:21 +1000 (AEST)",
            "from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41sKK45cX4zDr5p\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 17 Aug 2018 20:32:40 +1000 (AEST)",
            "from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de\n\t(mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id\n\t0M9oN6-1fjzDA0HrE-00B3KP; Fri, 17 Aug 2018 12:27:16 +0200"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de",
            "lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de",
            "lists.ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=arndb.de\n\t(client-ip=212.227.17.24; helo=mout.kundenserver.de;\n\tenvelope-from=arnd@arndb.de; receiver=<UNKNOWN>)",
            "lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de"
        ],
        "From": "Arnd Bergmann <arnd@arndb.de>",
        "To": "linux-pci@vger.kernel.org,\n\tBjorn Helgaas <bhelgaas@google.com>",
        "Subject": "[RFC 02/15] PCI: move pci_scan_bus into callers",
        "Date": "Fri, 17 Aug 2018 12:26:32 +0200",
        "Message-Id": "<20180817102645.3839621-3-arnd@arndb.de>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<20180817102645.3839621-1-arnd@arndb.de>",
        "References": "<20180817102645.3839621-1-arnd@arndb.de>",
        "X-Provags-ID": "V03:K1:LWXnCU+7Z6xUjdeuzFbZ45bQvgVeaaHfbEf3zC3L26Zzk+q2P/M\n\teBqWnJgU7gwLWWrQHzKtQNFZcb0iVWb27FKaSLk3FaYqvRDAS8Fc4O+kVUSdbViQeydnUMw\n\th7NpiAMFG72dNFXfPHSVlJ0LvhHR19fn798oy2WXLztnZxxmtfjsh5iUmx/CcbOiGkUFKfA\n\t9U53X0yWkPqyToR2KeuMw==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:i52elxbByfA=:zby/nqAY9+e5yB3sPpAwYv\n\tXLGsWsbrJP8EnEyYsf7aWdz+YQwQ06Ay+C2xJ5V8q/Z5WbutiLIkDZsmtklPkwbb7VCHQtmNc\n\thtBAhFuY5icvQ7ZSlxEM+0cGgKZ6I3KOhTvVIAI1hTJZCc+BkIF9BYnyKn0Yp+PCGgxGDQc9M\n\tz2qGTvyaoqU2FTh0gNlCN4py088cSrcuWuOyS7lrUNN+yexf76tAyIai6J/Qpo1nTPKfX4UaC\n\ta/AVBf3VrEDHfcR6l+BV8i7N5LVgln2sjTmuo8Yg0ZW5xLMpvJQQ7LDbTff8GLoJHdL/v9vSL\n\tl9M5feuoSNoq08gOtnzB7oh0V9yrObBfHyHyzIj2cw4sWC9u++uFOAaRAtFMZN94PM8BJ3wos\n\tj9q5FETIOSk9yTticaNzrsQkjVgxSCp0V7yo94oM1lVcK9JZiJ//fG1W8/rU5B2Re2dDyMPqj\n\tz8OF1cfeU1Uk4B22sF2AA9+660U331pPJxrV17EIAM6i/2TpX8dlrUBkXabg7pquF9KiJOSFI\n\tiLwaWs2BlcB74LMmqnjgmIPZ9LpA2kF2IE9kVlqdkJ3iltoUzxWxMatjJZJTVH4aB0puA0L8Z\n\t3E4j6jwjkz1DogegisuGl2kt9gbdDITkq6aqv9vgGww9e/6hPek/b5d4mHT/kyli11fgFtW4G\n\t2bcIKPNIenX30apnEBsXNGgTE7pq3vgJD97ENKj+H4O9bz1RK2rxVEgLDfx8bQnPwmJE=",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.27",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tArnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org,\n\tChristoph Hellwig <hch@infradead.org>, linux-acpi@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "There are only two remaining callers of the old pci_scan_bus()\ninterface. Since we want to expose the pci_host_bridge structure\neverywhere and discourage users from calling the old interfaces,\nlet's move the implementation into the respective callsites.\n\nWhile this duplicates the source code, it makes the object code\nsmaller for all users by avoiding the global implementation,\nand it allows further cleanup of the two callers.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\n arch/sparc/kernel/pcic.c          | 35 ++++++++++++++++++++++++++++++\n drivers/pci/hotplug/ibmphp_core.c | 35 ++++++++++++++++++++++++++++++\n drivers/pci/probe.c               | 36 -------------------------------\n include/linux/pci.h               |  1 -\n 4 files changed, 70 insertions(+), 37 deletions(-)",
    "diff": "diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c\nindex ee4c9a9a171c..0197b80fe590 100644\n--- a/arch/sparc/kernel/pcic.c\n+++ b/arch/sparc/kernel/pcic.c\n@@ -387,6 +387,41 @@ int __init pcic_probe(void)\n \treturn 0;\n }\n \n+static struct resource busn_resource = {\n+\t.name\t= \"PCI busn\",\n+\t.start\t= 0,\n+\t.end\t= 255,\n+\t.flags\t= IORESOURCE_BUS,\n+};\n+\n+static struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,\n+\t\t\t\t\tvoid *sysdata)\n+{\n+\tstruct pci_host_bridge *bridge;\n+\tint error;\n+\n+\tbridge = pci_alloc_host_bridge(0);\n+\tif (!bridge)\n+\t\treturn NULL;\n+\n+\tpci_add_resource(&bridge->windows, &ioport_resource);\n+\tpci_add_resource(&bridge->windows, &iomem_resource);\n+\tpci_add_resource(&bridge->windows, &busn_resource);\n+\tbridge->sysdata = sysdata;\n+\tbridge->busnr = bus;\n+\tbridge->ops = ops;\n+\n+\terror = pci_scan_root_bus_bridge(bridge);\n+\tif (error < 0)\n+\t\tgoto err;\n+\n+\treturn bridge->bus;\n+\n+err_res:\n+\tpci_free_host_bridge(bridge);\n+\treturn NULL;\n+}\n+\n static void __init pcic_pbm_scan_bus(struct linux_pcic *pcic)\n {\n \tstruct linux_pbm_info *pbm = &pcic->pbm;\ndiff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c\nindex 4ea57e9019f1..d35463ee96ba 100644\n--- a/drivers/pci/hotplug/ibmphp_core.c\n+++ b/drivers/pci/hotplug/ibmphp_core.c\n@@ -717,6 +717,41 @@ static void ibm_unconfigure_device(struct pci_func *func)\n \tpci_unlock_rescan_remove();\n }\n \n+static struct resource busn_resource = {\n+\t.name\t= \"pci busn\",\n+\t.start\t= 0,\n+\t.end\t= 255,\n+\t.flags\t= IORESOURCE_BUS,\n+};\n+\n+static struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,\n+\t\t\t\t\tvoid *sysdata)\n+{\n+\tstruct pci_host_bridge *bridge;\n+\tint error;\n+\n+\tbridge = pci_alloc_host_bridge(0);\n+\tif (!bridge)\n+\t\treturn NULL;\n+\n+\tpci_add_resource(&bridge->windows, &ioport_resource);\n+\tpci_add_resource(&bridge->windows, &iomem_resource);\n+\tpci_add_resource(&bridge->windows, &busn_resource);\n+\tbridge->sysdata = sysdata;\n+\tbridge->busnr = bus;\n+\tbridge->ops = ops;\n+\n+\terror = pci_scan_root_bus_bridge(bridge);\n+\tif (error < 0)\n+\t\tgoto err;\n+\n+\treturn bridge->bus;\n+\n+err:\n+\tpci_free_host_bridge(bridge);\n+\treturn NULL;\n+}\n+\n /*\n  * The following function is to fix kernel bug regarding\n  * getting bus entries, here we manually add those primary\ndiff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex b0f666271245..12c3aa63c34d 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -3078,42 +3078,6 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,\n }\n EXPORT_SYMBOL(pci_scan_root_bus);\n \n-static struct resource busn_resource = {\n-\t.name\t= \"PCI busn\",\n-\t.start\t= 0,\n-\t.end\t= 255,\n-\t.flags\t= IORESOURCE_BUS,\n-};\n-\n-struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,\n-\t\t\t\t\tvoid *sysdata)\n-{\n-\tstruct pci_host_bridge *bridge;\n-\tint error;\n-\n-\tbridge = pci_alloc_host_bridge(0);\n-\tif (!bridge)\n-\t\tgoto err;\n-\n-\tpci_add_resource(&bridge->windows, &ioport_resource);\n-\tpci_add_resource(&bridge->windows, &iomem_resource);\n-\tpci_add_resource(&bridge->windows, &busn_resource);\n-\tbridge->sysdata = sysdata;\n-\tbridge->busnr = bus;\n-\tbridge->ops = ops;\n-\n-\terror = pci_scan_root_bus_bridge(bridge);\n-\tif (error < 0)\n-\t\tgoto err;\n-\n-\treturn bridge->bus;\n-\n-err:\n-\tpci_free_host_bridge(bridge);\n-\treturn NULL;\n-}\n-EXPORT_SYMBOL(pci_scan_bus);\n-\n /**\n  * pci_rescan_bus_bridge_resize - Scan a PCI bus for devices\n  * @bridge: PCI bridge for the bus to scan\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex e72ca8dd6241..d77ce35a2b33 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -905,7 +905,6 @@ void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res,\n void pcibios_scan_specific_bus(int busn);\n struct pci_bus *pci_find_bus(int domain, int busnr);\n void pci_bus_add_devices(const struct pci_bus *bus);\n-struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);\n struct pci_bus *pci_create_root_bus(struct device *parent, int bus,\n \t\t\t\t    struct pci_ops *ops, void *sysdata,\n \t\t\t\t    struct list_head *resources);\n",
    "prefixes": [
        "RFC",
        "02/15"
    ]
}