get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 958766,
    "url": "http://patchwork.ozlabs.org/api/patches/958766/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20180817102645.3839621-14-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-14-arnd@arndb.de>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20180817102645.3839621-14-arnd@arndb.de/",
    "date": "2018-08-17T10:26:43",
    "name": "[RFC,13/15] PCI: turn pcibios_alloc_irq into a callback",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "53b6dd534756aa21c6c5c81df3a90d67fb7d31c5",
    "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-14-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/958766/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/958766/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 [203.11.71.2])\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 41sKyQ4q9vz9s4c\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 17 Aug 2018 21:01:34 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41sKyQ3f0TzF12M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 17 Aug 2018 21:01:34 +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 41sKV71DYvzF0h9\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 17 Aug 2018 20:40:30 +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\t0LopY3-1gNDhj20RX-00glB0; Fri, 17 Aug 2018 12:27:20 +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 13/15] PCI: turn pcibios_alloc_irq into a callback",
        "Date": "Fri, 17 Aug 2018 12:26:43 +0200",
        "Message-Id": "<20180817102645.3839621-14-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:vGOxD5cso1fRX7vOFpg6264LHD7qp984mQlv5MPT6s07XrS4K2q\n\tIxzfk8bDO/hDFJUEyLUy4cqBFvWycxqJfqu8myqpu+DeGzm1WHg70Dm0VhCWS3UfXdQMZUh\n\tvCVDLDNLy0TIi89lHJhy6GxOzRcS4zgTlQr8KfLRoWv/eaypGIooBRH9J0jTanPDmePlu2G\n\typ3nrpbGuNd8g0mqp4zsg==",
        "X-UI-Out-Filterresults": "notjunk:1; V01:K0:49iudi3bBaI=:kBMubrQJiekBrRn4GS1zwv\n\t9uv03XXdyQQioh/MXWDqx8qGJsDX2a+D4BydEYisG6pnTnsQmDY5p2EfpEw4IPJc+uBN+xwLx\n\t8rDvoRbkuxpbLImx05ZCMs0KPqjTctrI9J2w14ZQKIjP1AqqHyNoXaOguv0yZtPP6QJqroPbE\n\tvVjJYpoC2R/xuRH7MEUeJtx2+vJ1CP0rgW29LOhPM1IdR7vsi1twBKnZH8rvVbaC1TAohySwk\n\t4qf9gXSUfsnkEE+Grp0I+IeBPIPK826Fzuo0XIt4t5Os9n8eNax31SJKuMf8iK3EXVILHv8Un\n\t+mhrxxcJYNVznlDFWvkE54CU/1PeGPc0R4iZBGFTTd3hC/JwcqJ7ojW40bivDYYXFl9fovxHN\n\t0BaXRXZNVzQaZtW+AlVodcddIga1p3m2lqD9f25ZwjBbP/23jdG4mQwNO/9jg2T1hyO2TCw+8\n\tNElUJR0/DVVpatF6O9eUnqoV3wWo0T1wzA5jr4itg8u9n6ATUkPiyAdPrqQ+lTeGwpGbzucr8\n\txNc+8Ldx/cHO4dyjgeIq9x2+MsD0JWPIvhIhlRdySF+e5AFeoUn65lT41D59f3T2NB00BE4IQ\n\t1fxrfP1ihDdZRgK+lR1K6+IofWJIJt4e1iXBOx3H2Yd6M+UOSstw0OqfGJCzB3tLqM2LosSzm\n\tmQCRV83X5IW1iNFyijhsw14do98ph1ULftDKxeHDfwj0/uTu5J31lrUL58YNjH7EQ9v4=",
        "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": "Weak functions are a bit confusing, and we can better deal with\nthis using a callback function. pcibios_free_irq() is actually\ncompletely unused, but it seems better to treat it the same way\nas the allocation, unless we want to remove it completely.\n\nSigned-off-by: Arnd Bergmann <arnd@arndb.de>\n---\n arch/arm64/kernel/pci.c  | 16 +++-------------\n drivers/pci/pci-driver.c | 13 +++++++++++--\n include/linux/pci.h      |  2 ++\n 3 files changed, 16 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c\nindex 0e2ea1c78542..3d196c68e362 100644\n--- a/arch/arm64/kernel/pci.c\n+++ b/arch/arm64/kernel/pci.c\n@@ -22,19 +22,6 @@\n #include <linux/pci-ecam.h>\n #include <linux/slab.h>\n \n-#ifdef CONFIG_ACPI\n-/*\n- * Try to assign the IRQ number when probing a new device\n- */\n-int pcibios_alloc_irq(struct pci_dev *dev)\n-{\n-\tif (!acpi_disabled)\n-\t\tacpi_pci_irq_enable(dev);\n-\n-\treturn 0;\n-}\n-#endif\n-\n /*\n  * raw_pci_read/write - Platform-specific PCI config space access.\n  */\n@@ -93,6 +80,9 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)\n \n \t\tACPI_COMPANION_SET(&bridge->dev, adev);\n \t\tset_dev_node(bus_dev, acpi_get_node(acpi_device_handle(adev)));\n+\n+\t\t/* Try to assign the IRQ number when probing a new device */\n+\t\tbridge->alloc_irq = acpi_pci_irq_enable;\n \t}\n \n \treturn 0;\ndiff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c\nindex bef17c3fca67..c96bc7bd56da 100644\n--- a/drivers/pci/pci-driver.c\n+++ b/drivers/pci/pci-driver.c\n@@ -387,13 +387,22 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)\n \treturn error;\n }\n \n-int __weak pcibios_alloc_irq(struct pci_dev *dev)\n+int pcibios_alloc_irq(struct pci_dev *dev)\n {\n+\tstruct pci_host_bridge *bridge = pci_find_host_bridge(dev->bus);\n+\n+\tif (bridge->alloc_irq)\n+\t\treturn bridge->alloc_irq(dev);\n+\n \treturn 0;\n }\n \n-void __weak pcibios_free_irq(struct pci_dev *dev)\n+void pcibios_free_irq(struct pci_dev *dev)\n {\n+\tstruct pci_host_bridge *bridge = pci_find_host_bridge(dev->bus);\n+\n+\tif (bridge->free_irq)\n+\t\tbridge->free_irq(dev);\n }\n \n #ifdef CONFIG_PCI_IOV\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex d1072690cb4f..1296d9fcc5da 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -476,6 +476,8 @@ struct pci_host_bridge {\n \tint (*map_irq)(const struct pci_dev *, u8, u8);\n \tvoid (*release_fn)(struct pci_host_bridge *);\n \tvoid (*bus_add_device)(struct pci_dev *pdev);\n+\tint (*alloc_irq)(struct pci_dev *);\n+\tint (*free_irq)(struct pci_dev *);\n \tvoid\t\t*release_data;\n \tstruct msi_controller *msi;\n \tunsigned int\tignore_reset_delay:1;\t/* For entire hierarchy */\n",
    "prefixes": [
        "RFC",
        "13/15"
    ]
}