get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810319,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/810319/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504653683-11543-1-git-send-email-jschoenh@amazon.de/",
    "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": "<1504653683-11543-1-git-send-email-jschoenh@amazon.de>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1504653683-11543-1-git-send-email-jschoenh@amazon.de/",
    "date": "2017-09-05T23:21:22",
    "name": "[1/2] PCI: Remove reset argument from pci_iov_{add, remove}_virtfn()",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "869cf302216d9c84f34754068e0b1a1064f2cb38",
    "submitter": {
        "id": 72300,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72300/?format=api",
        "name": "Jan H. Schönherr",
        "email": "jschoenh@amazon.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504653683-11543-1-git-send-email-jschoenh@amazon.de/mbox/",
    "series": [
        {
            "id": 1665,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/1665/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=1665",
            "date": "2017-09-05T23:21:23",
            "name": "[1/2] PCI: Remove reset argument from pci_iov_{add, remove}_virtfn()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1665/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810319/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810319/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 [103.22.144.68])\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 3xn3005fb6z9s7h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  6 Sep 2017 09:32:00 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xn3004PX0zDqYx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  6 Sep 2017 09:32:00 +1000 (AEST)",
            "from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com\n\t[207.171.184.29])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xn2nK3DDGzDqh4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  6 Sep 2017 09:22:45 +1000 (AEST)",
            "from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO\n\temail-inbound-relay-62006.pdx2.amazon.com) ([10.47.22.38])\n\tby smtp-border-fw-out-9102.sea19.amazon.com with\n\tESMTP/TLS/DHE-RSA-AES256-SHA; 05 Sep 2017 23:22:01 +0000",
            "from u28d244cd5724546b2f74.ant.amazon.com\n\t(pdx2-ws-svc-lb17-vlan2.amazon.com [10.247.140.66])\n\tby email-inbound-relay-62006.pdx2.amazon.com (8.14.7/8.14.7) with\n\tESMTP id v85NLl5A010177\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);\n\tTue, 5 Sep 2017 23:21:48 GMT",
            "from u28d244cd5724546b2f74.ant.amazon.com (localhost [127.0.0.1])\n\tby u28d244cd5724546b2f74.ant.amazon.com\n\t(8.14.4/8.14.4/Debian-2ubuntu2.1) with\n\tESMTP id v85NLiAA011630; Wed, 6 Sep 2017 01:21:45 +0200",
            "(from jschoenh@localhost)\n\tby u28d244cd5724546b2f74.ant.amazon.com (8.14.4/8.14.4/Submit) id\n\tv85NLhv4011623; Wed, 6 Sep 2017 01:21:43 +0200"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amazon.de header.i=@amazon.de\n\theader.b=\"XipSuZSy\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=amazon.de header.i=@amazon.de\n\theader.b=\"XipSuZSy\"; dkim-atps=neutral",
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=amazon.com\n\t(client-ip=207.171.184.29; helo=smtp-fw-9102.amazon.com;\n\tenvelope-from=prvs=414b27ec5=jschoenh@amazon.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=amazon.de header.i=@amazon.de\n\theader.b=\"XipSuZSy\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209;\n\tt=1504653766; x=1536189766;\n\th=from:to:cc:subject:date:message-id:mime-version:\n\tcontent-transfer-encoding;\n\tbh=A/U/Y9KmEmjpZX1Bsln3ipwnwSBrhPq/77fjLDd6hwI=;\n\tb=XipSuZSyT5c6k5/+y0nVWbvYIDlWQdwf2tOJOJIToTnCDh0R6bEBbsOn\n\tKHQ+Rp5K5YEDqNH83gC9B5ukk47Drt3oRoYeLMZsDLgkCwsw4Eswn8DX2\n\tr1axyeYPzQIzY3tFn24hnTzinY89e73Esn/BJNo3PGh6o2aic6xr9AtMe M=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,481,1498521600\"; d=\"scan'208\";a=\"564468386\"",
        "From": "=?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?= <jschoenh@amazon.de>",
        "To": "Bjorn Helgaas <bhelgaas@google.com>",
        "Subject": "[PATCH 1/2] PCI: Remove reset argument from pci_iov_{add,\n\tremove}_virtfn()",
        "Date": "Wed,  6 Sep 2017 01:21:22 +0200",
        "Message-Id": "<1504653683-11543-1-git-send-email-jschoenh@amazon.de>",
        "X-Mailer": "git-send-email 2.3.1.dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Wed, 06 Sep 2017 09:28:43 +1000",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "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": "linux-pci@vger.kernel.org, =?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?=\n\t<jschoenh@amazon.de>,  linuxppc-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": "The reset argument passed to pci_iov_add_virtfn() and\npci_iov_remove_virtfn() is always zero since commit 46cb7b1bd86fc227a\n(\"PCI: Remove unused SR-IOV VF Migration support\").\n\nRemove the argument together with the associated code.\n\nSigned-off-by: Jan H. Schönherr <jschoenh@amazon.de>\n---\n arch/powerpc/kernel/eeh_driver.c |  4 ++--\n drivers/pci/iov.c                | 18 +++++-------------\n include/linux/pci.h              |  8 ++++----\n 3 files changed, 11 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c\nindex c405c79..23ea86f 100644\n--- a/arch/powerpc/kernel/eeh_driver.c\n+++ b/arch/powerpc/kernel/eeh_driver.c\n@@ -441,7 +441,7 @@ static void *eeh_add_virt_device(void *data, void *userdata)\n \t}\n \n #ifdef CONFIG_PPC_POWERNV\n-\tpci_iov_add_virtfn(edev->physfn, pdn->vf_index, 0);\n+\tpci_iov_add_virtfn(edev->physfn, pdn->vf_index);\n #endif\n \treturn NULL;\n }\n@@ -499,7 +499,7 @@ static void *eeh_rmv_device(void *data, void *userdata)\n #ifdef CONFIG_PPC_POWERNV\n \t\tstruct pci_dn *pdn = eeh_dev_to_pdn(edev);\n \n-\t\tpci_iov_remove_virtfn(edev->physfn, pdn->vf_index, 0);\n+\t\tpci_iov_remove_virtfn(edev->physfn, pdn->vf_index);\n \t\tedev->pdev = NULL;\n \n \t\t/*\ndiff --git a/drivers/pci/iov.c b/drivers/pci/iov.c\nindex 120485d..21b55ca 100644\n--- a/drivers/pci/iov.c\n+++ b/drivers/pci/iov.c\n@@ -113,7 +113,7 @@ resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno)\n \treturn dev->sriov->barsz[resno - PCI_IOV_RESOURCES];\n }\n \n-int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)\n+int pci_iov_add_virtfn(struct pci_dev *dev, int id)\n {\n \tint i;\n \tint rc = -ENOMEM;\n@@ -157,9 +157,6 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)\n \t\tBUG_ON(rc);\n \t}\n \n-\tif (reset)\n-\t\t__pci_reset_function(virtfn);\n-\n \tpci_device_add(virtfn, virtfn->bus);\n \n \tpci_bus_add_device(virtfn);\n@@ -187,7 +184,7 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)\n \treturn rc;\n }\n \n-void pci_iov_remove_virtfn(struct pci_dev *dev, int id, int reset)\n+void pci_iov_remove_virtfn(struct pci_dev *dev, int id)\n {\n \tchar buf[VIRTFN_ID_LEN];\n \tstruct pci_dev *virtfn;\n@@ -198,11 +195,6 @@ void pci_iov_remove_virtfn(struct pci_dev *dev, int id, int reset)\n \tif (!virtfn)\n \t\treturn;\n \n-\tif (reset) {\n-\t\tdevice_release_driver(&virtfn->dev);\n-\t\t__pci_reset_function(virtfn);\n-\t}\n-\n \tsprintf(buf, \"virtfn%u\", id);\n \tsysfs_remove_link(&dev->dev.kobj, buf);\n \t/*\n@@ -317,7 +309,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn)\n \tpci_cfg_access_unlock(dev);\n \n \tfor (i = 0; i < initial; i++) {\n-\t\trc = pci_iov_add_virtfn(dev, i, 0);\n+\t\trc = pci_iov_add_virtfn(dev, i);\n \t\tif (rc)\n \t\t\tgoto failed;\n \t}\n@@ -329,7 +321,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn)\n \n failed:\n \twhile (i--)\n-\t\tpci_iov_remove_virtfn(dev, i, 0);\n+\t\tpci_iov_remove_virtfn(dev, i);\n \n \tpcibios_sriov_disable(dev);\n err_pcibios:\n@@ -355,7 +347,7 @@ static void sriov_disable(struct pci_dev *dev)\n \t\treturn;\n \n \tfor (i = 0; i < iov->num_VFs; i++)\n-\t\tpci_iov_remove_virtfn(dev, i, 0);\n+\t\tpci_iov_remove_virtfn(dev, i);\n \n \tpcibios_sriov_disable(dev);\n \ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex f958d07..4acf321 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -1903,8 +1903,8 @@ int pci_iov_virtfn_devfn(struct pci_dev *dev, int id);\n \n int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);\n void pci_disable_sriov(struct pci_dev *dev);\n-int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset);\n-void pci_iov_remove_virtfn(struct pci_dev *dev, int id, int reset);\n+int pci_iov_add_virtfn(struct pci_dev *dev, int id);\n+void pci_iov_remove_virtfn(struct pci_dev *dev, int id);\n int pci_num_vf(struct pci_dev *dev);\n int pci_vfs_assigned(struct pci_dev *dev);\n int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);\n@@ -1921,12 +1921,12 @@ static inline int pci_iov_virtfn_devfn(struct pci_dev *dev, int id)\n }\n static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)\n { return -ENODEV; }\n-static inline int pci_iov_add_virtfn(struct pci_dev *dev, int id, int reset)\n+static inline int pci_iov_add_virtfn(struct pci_dev *dev, int id)\n {\n \treturn -ENOSYS;\n }\n static inline void pci_iov_remove_virtfn(struct pci_dev *dev,\n-\t\t\t\t\t int id, int reset) { }\n+\t\t\t\t\t int id) { }\n static inline void pci_disable_sriov(struct pci_dev *dev) { }\n static inline int pci_num_vf(struct pci_dev *dev) { return 0; }\n static inline int pci_vfs_assigned(struct pci_dev *dev)\n",
    "prefixes": [
        "1/2"
    ]
}