get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807990,
    "url": "http://patchwork.ozlabs.org/api/patches/807990/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504138732-65383-7-git-send-email-f.fainelli@gmail.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1504138732-65383-7-git-send-email-f.fainelli@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-31T00:18:50",
    "name": "[RFC,net-next,6/8] net: dsa: Expose dsa_slave_dev_check and dsa_slave_dev_port_num",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "e6d8d347db823fdd8c21a2d4cbedadadd33ee5a2",
    "submitter": {
        "id": 2800,
        "url": "http://patchwork.ozlabs.org/api/people/2800/?format=api",
        "name": "Florian Fainelli",
        "email": "f.fainelli@gmail.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1504138732-65383-7-git-send-email-f.fainelli@gmail.com/mbox/",
    "series": [
        {
            "id": 728,
            "url": "http://patchwork.ozlabs.org/api/series/728/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=728",
            "date": "2017-08-31T00:18:44",
            "name": "net: dsa: Multi-queue awareness",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/728/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807990/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807990/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"st8KQUjt\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjNVT0F41z9s83\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 10:27:13 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751387AbdHaA1J (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 20:27:09 -0400",
            "from mail-wr0-f193.google.com ([209.85.128.193]:34230 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750814AbdHaA1I (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 20:27:08 -0400",
            "by mail-wr0-f193.google.com with SMTP id z91so5007465wrc.1\n\tfor <netdev@vger.kernel.org>; Wed, 30 Aug 2017 17:27:08 -0700 (PDT)",
            "from stb-bld-04.irv.broadcom.com ([192.19.255.250])\n\tby smtp.gmail.com with ESMTPSA id\n\te74sm5296636wmg.39.2017.08.30.17.27.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 30 Aug 2017 17:27:06 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=MWrHomd8Xc8cNOBhB6we7Ia66dxWB6C679Agomig77Q=;\n\tb=st8KQUjtcpSBj3CpIA47eVY88RLaMWS0TA6RVAcR1esFcSmvxSyA5mblNNxNwJ0dr6\n\txpaX4wSQo9PwYD9ThWBojx48tD7QwiZJlpHlbcvVW8yYIV7mMLdCpoXUNQLb0tyyDlz+\n\tOOJryo/jjeVk40556DEO40cilCOL2SRnAVH3eRiq8XpxY8zLuMnGZy0O8PDBf/1vNN79\n\trYgRfFaEFYG1vnEPdOpyw52deNLTB3Cubk7Lksd4PpOvL5PL7FJVVczvxbSGnos8ndqJ\n\tzZjGNRJlYjiK0TLUZUpsnVSFgGFkzBgqPeUbJdGAo3AaUj8CWPtY+ZqBAIb15PIEO1/I\n\txJPw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=MWrHomd8Xc8cNOBhB6we7Ia66dxWB6C679Agomig77Q=;\n\tb=SibREiQNAP0iFxczR9qFVjmWyp/vx5I0+/K21gcYZJrdm9qaosc6vm9R0ywMklaBOq\n\tfD1hSnelVLyGYD2wmzbuFKzkhTYIg3cANxaZ5pIN15Li1f15nNdVR98HUYsbaDtIOuUg\n\tMLkADGs2qBmtK2CY2kMiDVzznDWqkyRNoNPeOUbunYDEdwD/zGCNBi4urGFkCgm34Tf6\n\to2YD0xQ4BkeRs3kjHXZ/0ySyOnorEI0cOCGEZUtRBMipI+LfQzpo0GGtbkQUOPdXKmxw\n\tSOXP14pD8SjCMciYgIYTAD7O/E5s6laUdEQlrDDaJaWDG67rV2bOJPRuT7BmQheqt/SS\n\tbK8g==",
        "X-Gm-Message-State": "AHYfb5iyjmD9tdOv8YfWQxrP0c6uAATsE+QUpUOSs7eG5RJWN0f7AB8E\n\tRAiRC5SjdwnoG9ot4vw=",
        "X-Received": "by 10.223.133.36 with SMTP id 33mr2235368wrh.51.1504139227481;\n\tWed, 30 Aug 2017 17:27:07 -0700 (PDT)",
        "From": "Florian Fainelli <f.fainelli@gmail.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "jiri@resnulli.us, jhs@mojatatu.com, davem@davemloft.net,\n\txiyou.wangcong@gmail.com, andrew@lunn.ch,\n\tvivien.didelot@savoirfairelinux.com,\n\tFlorian Fainelli <f.fainelli@gmail.com>",
        "Subject": "[RFC net-next 6/8] net: dsa: Expose dsa_slave_dev_check and\n\tdsa_slave_dev_port_num",
        "Date": "Wed, 30 Aug 2017 17:18:50 -0700",
        "Message-Id": "<1504138732-65383-7-git-send-email-f.fainelli@gmail.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1504138732-65383-1-git-send-email-f.fainelli@gmail.com>",
        "References": "<1504138732-65383-1-git-send-email-f.fainelli@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Expose two helper functions:\n* one to verify if a net_device is a DSA slave network device\n* one to obtain the physical port number associated with a DSA slave\n  network device\n\nSigned-off-by: Florian Fainelli <f.fainelli@gmail.com>\n---\n include/net/dsa.h | 15 +++++++++++++++\n net/dsa/slave.c   | 12 +++++++++---\n 2 files changed, 24 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/include/net/dsa.h b/include/net/dsa.h\nindex b10e8da3f8d7..649bd06f9fe4 100644\n--- a/include/net/dsa.h\n+++ b/include/net/dsa.h\n@@ -459,6 +459,21 @@ static inline bool netdev_uses_dsa(struct net_device *dev)\n \treturn false;\n }\n \n+#if IS_ENABLED(CONFIG_NET_DSA)\n+bool dsa_slave_dev_check(struct net_device *dev);\n+unsigned int dsa_slave_dev_port_num(struct net_device *dev);\n+#else\n+static inline bool dsa_slave_dev_check(struct net_device *dev)\n+{\n+\treturn false;\n+}\n+\n+static inline dsa_slave_dev_port_num(struct net_device *dev)\n+{\n+\treturn DSA_MAX_PORTS;\n+}\n+#endif\n+\n struct dsa_switch *dsa_switch_alloc(struct device *dev, size_t n);\n void dsa_unregister_switch(struct dsa_switch *ds);\n int dsa_register_switch(struct dsa_switch *ds);\ndiff --git a/net/dsa/slave.c b/net/dsa/slave.c\nindex bfd7173a3c6a..302ae3326e3a 100644\n--- a/net/dsa/slave.c\n+++ b/net/dsa/slave.c\n@@ -25,8 +25,6 @@\n \n #include \"dsa_priv.h\"\n \n-static bool dsa_slave_dev_check(struct net_device *dev);\n-\n /* slave mii_bus handling ***************************************************/\n static int dsa_slave_phy_read(struct mii_bus *bus, int addr, int reg)\n {\n@@ -1346,10 +1344,18 @@ void dsa_slave_destroy(struct net_device *slave_dev)\n \tfree_netdev(slave_dev);\n }\n \n-static bool dsa_slave_dev_check(struct net_device *dev)\n+bool dsa_slave_dev_check(struct net_device *dev)\n {\n \treturn dev->netdev_ops == &dsa_slave_netdev_ops;\n }\n+EXPORT_SYMBOL_GPL(dsa_slave_dev_check);\n+\n+unsigned int dsa_slave_dev_port_num(struct net_device *dev)\n+{\n+\tstruct dsa_slave_priv *p = netdev_priv(dev);\n+\treturn p->dp->index;\n+}\n+EXPORT_SYMBOL_GPL(dsa_slave_dev_port_num);\n \n static int dsa_slave_changeupper(struct net_device *dev,\n \t\t\t\t struct netdev_notifier_changeupper_info *info)\n",
    "prefixes": [
        "RFC",
        "net-next",
        "6/8"
    ]
}